Made Simple
Who am I?


  Gabriel Dogaru

     –   Ex software developer at Synygy

     –   Ex software engineer at Amazon

     –   Co-founder TAGonSoft
Agenda

   ●   Why Android
   ●   Small Android overview
   ●   Leverage the power of java frameworks with Android
What is Android?



 “Android is a software stack for mobile devices
 that includes an operating system, middleware
 and key applications”
Why Android?
Why Android?




               ●
               ●   http://www.guardian.co.uk/technology/appsblog/2012/aug/16/android-winning-apps-china-smartphone is Android?
                   http://www.guardian.co.uk/technology/appsblog/2012/aug/16/android-winning-apps-china-smartphone is Android?
Why Android?




               ●
               ●   http://www.guardian.co.uk/technology/appsblog/2012/aug/16/android-winning-apps-china-smartphone is Android?
                   http://www.guardian.co.uk/technology/appsblog/2012/aug/16/android-winning-apps-china-smartphone is Android?
Why write native Android?
Why Native Android?




                      Indeed job trends 28.10.2012
Why Native Android?




                      Indeed job trends 28.10.2012
Why Native Android?




                  Respect your user
Who is Android?
Who is Android?
Who is Android?
Who is Android?
Android Architecture
Android Architecture
Android Kernel
Native libraries
Android Runtime
Application Framework
Applications
Building Blocks

   ●   Activity
   ●   Intent Receiver
   ●   Service
   ●   ContentProvider
Activity

    ●   A single, focused thing that the user can do
    ●   Provides a screen with which users can interact in order
        to do something
Intent Receiver
●




    ●   Handle the broadcast intents
Service

   ●   Can perform long-running operations in the background
       and does not provide a user interface
   ●   A component can bind to a service to interact with it
Content provider

   ●   Enable applications to share data
Intent

   ●   Passive data structure holding an abstract description of
       an operation to be performed
   ●   Used to start your activities
   ●   Used to start external applications
That's just old stuff from 2008

   ●   http://developer.android.com
   ●   http://www.youtube.com/results?search_query=androidology
   ●   blogs++
How about my handy Java frameworks?
The Best Programmers Are Lazy and Dumb ?!?!?
Android annotations
Helps with activities


 @NoTitle
 @Fullscreen
 @EActivity(R.layout.bookmarks)
 public class BookmarksToClipboardActivity extends Activity {

   @ViewById
   ListView bookmarkList;
   @ViewById
   EditText search;

   @AfterViews
   void initBookmarkList() {
     search.setText(??);//.....
   }
Helps with events

 //.....


 @Click( {R.id.button1, R.id.button2})
 void updateBookmarksClicked() {
     searchAsync(search.getText().toString(),userid);
 }


 @ItemClick
 void bookmarkListItemClicked(Bookmark selectedBookmark) {
     clipboardManager.setText(selectedBookmark.getUrl());
 }
 //.....
Helps with preferences
 @SharedPref
 public interface MyPrefs {
  @DefaultString("John")
     String name();


    @DefaultInt(42)
    int age();

    long lastUpdated();
 }
 …...............................
 @EActivity
 public class MyActivity extends Activity {
     @Pref
     MyPrefs_ myPrefs;
 }
Helps with Rest Services

 @Rest("http://tagonsoft.ro/")
 public interface CodecampClient {


     @Get("codecamp.php")
     @Accept(MediaType.APPLICATION_JSON)
     Codecamp getEventData();

     @Post("feedback.php")
     void sendFeedback(Feedback feedback);


     RestTemplate getRestTemplate();
 }
Got ORM? OrmLite
 @DatabaseTable(tableName = "sessions")
 public class Session {
     @DatabaseField(id = true, columnName = "_id")
     long id;
 //....
 }

 //....
 TableUtils.createTable(connectionSource, Session.class);



 //....
 dbHelper.getSessionDao().create(session);
 dbHelper.getSessionDao().queryForId(sessionID);
And it all builds up
So?
      ●   Android is the world's most popular mobile platform
      ●   Writing Android code can be fun and easy
      ●   developer.android.com is your friend
      ●   You can download example Codecamp app source code from
             https://bitbucket.org/gdogaru/codecamp_android
Thank You!




                                                 gdogaru@gmail.com
                                                 gabrieldogaru.com
tagonsoft.ro

               Please fill in the evaluation forms

Android Made Simple

  • 1.
  • 2.
    Who am I? Gabriel Dogaru – Ex software developer at Synygy – Ex software engineer at Amazon – Co-founder TAGonSoft
  • 3.
    Agenda ● Why Android ● Small Android overview ● Leverage the power of java frameworks with Android
  • 4.
    What is Android? “Android is a software stack for mobile devices that includes an operating system, middleware and key applications”
  • 5.
  • 6.
    Why Android? ● ● http://www.guardian.co.uk/technology/appsblog/2012/aug/16/android-winning-apps-china-smartphone is Android? http://www.guardian.co.uk/technology/appsblog/2012/aug/16/android-winning-apps-china-smartphone is Android?
  • 7.
    Why Android? ● ● http://www.guardian.co.uk/technology/appsblog/2012/aug/16/android-winning-apps-china-smartphone is Android? http://www.guardian.co.uk/technology/appsblog/2012/aug/16/android-winning-apps-china-smartphone is Android?
  • 8.
  • 9.
    Why Native Android? Indeed job trends 28.10.2012
  • 10.
    Why Native Android? Indeed job trends 28.10.2012
  • 11.
    Why Native Android? Respect your user
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
    Building Blocks ● Activity ● Intent Receiver ● Service ● ContentProvider
  • 24.
    Activity ● A single, focused thing that the user can do ● Provides a screen with which users can interact in order to do something
  • 25.
    Intent Receiver ● ● Handle the broadcast intents
  • 26.
    Service ● Can perform long-running operations in the background and does not provide a user interface ● A component can bind to a service to interact with it
  • 27.
    Content provider ● Enable applications to share data
  • 28.
    Intent ● Passive data structure holding an abstract description of an operation to be performed ● Used to start your activities ● Used to start external applications
  • 29.
    That's just oldstuff from 2008 ● http://developer.android.com ● http://www.youtube.com/results?search_query=androidology ● blogs++
  • 30.
    How about myhandy Java frameworks?
  • 31.
    The Best ProgrammersAre Lazy and Dumb ?!?!?
  • 32.
  • 33.
    Helps with activities @NoTitle @Fullscreen @EActivity(R.layout.bookmarks) public class BookmarksToClipboardActivity extends Activity { @ViewById ListView bookmarkList; @ViewById EditText search; @AfterViews void initBookmarkList() { search.setText(??);//..... }
  • 34.
    Helps with events //..... @Click( {R.id.button1, R.id.button2}) void updateBookmarksClicked() { searchAsync(search.getText().toString(),userid); } @ItemClick void bookmarkListItemClicked(Bookmark selectedBookmark) { clipboardManager.setText(selectedBookmark.getUrl()); } //.....
  • 35.
    Helps with preferences @SharedPref public interface MyPrefs { @DefaultString("John") String name(); @DefaultInt(42) int age(); long lastUpdated(); } …............................... @EActivity public class MyActivity extends Activity { @Pref MyPrefs_ myPrefs; }
  • 36.
    Helps with RestServices @Rest("http://tagonsoft.ro/") public interface CodecampClient { @Get("codecamp.php") @Accept(MediaType.APPLICATION_JSON) Codecamp getEventData(); @Post("feedback.php") void sendFeedback(Feedback feedback); RestTemplate getRestTemplate(); }
  • 37.
    Got ORM? OrmLite @DatabaseTable(tableName = "sessions") public class Session { @DatabaseField(id = true, columnName = "_id") long id; //.... } //.... TableUtils.createTable(connectionSource, Session.class); //.... dbHelper.getSessionDao().create(session); dbHelper.getSessionDao().queryForId(sessionID);
  • 38.
    And it allbuilds up
  • 39.
    So? ● Android is the world's most popular mobile platform ● Writing Android code can be fun and easy ● developer.android.com is your friend ● You can download example Codecamp app source code from https://bitbucket.org/gdogaru/codecamp_android
  • 41.
    Thank You! gdogaru@gmail.com gabrieldogaru.com tagonsoft.ro Please fill in the evaluation forms