Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android application development: a crash course

Soham Mondal
November 03, 2012

Android application development: a crash course

An Android basics session at Droidcon 2012

Soham Mondal

November 03, 2012
Tweet

More Decks by Soham Mondal

Other Decks in Technology

Transcript

  1. Soham  Mondal   ANDROID ON GOOGLE TV The  same  android

     codebase  can  run  on  android  phones,   android  tablets  and  now  even  on  televisions  running   Google  TV  
  2. SOME MORE HIGHLIGHTS New Cameras from Nikon and Sasmung expected

    to run Android, to make “intelligent” devices Android have been deployed on intelligent kiosks, cars and even household electronics devices Asus Nexus 7 tablet launched at $199 running Android 4.1 More Nexus devices expected from multiple manufacturers in October Soham  Mondal  
  3. ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents  

    Views   Content  providers   Services   No=fica=ons   Soham  Mondal  
  4. ANDROID BUILDING BLOCKS Android  manifest.xml   Intents   Views  

    Content  providers   Services   No=fica=ons   Ac=vi=es   Soham  Mondal  
  5. ACTIVITIES •  Provides a screen with which users can interact

    in order to do something Example: dial the phone, take a photo, send an email, or view a map. •  Each activity is given a window in which to draw its user interface. •  An app usually consists of multiple activities •  Typically, one activity in an application is specified as the "main" activity, which is presented to the user when launching the application for the first time. Soham  Mondal  
  6. ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents  

    Views   Content  providers   Services   No=fica=ons   Soham  Mondal  
  7. Ac=vi=es   ANDROID BUILDING BLOCKS Android  manifest.xml   Views  

    Content  providers   Services   No=fica=ons   Intents   Soham  Mondal  
  8. INTENTS •  Intents are used to move from Activity to

    Activity •  describes what the application wants •  provides late runtime binding Soham  Mondal  
  9. ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents  

    Views   Content  providers   Services   No=fica=ons   Soham  Mondal  
  10. Ac=vi=es   ANDROID BUILDING BLOCKS Android  manifest.xml   Intents  

    Content  providers   Services   No=fica=ons   Views   Soham  Mondal  
  11. VIEWS •  Views are UI basic building blocks •  Know

    how to draw themselves •  Respond to events •  Organized as trees to build up GUIs •  Described in XML in layout resources Soham  Mondal  
  12. ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents  

    Views   Content  providers   Services   No=fica=ons   Soham  Mondal  
  13. Ac=vi=es   ANDROID BUILDING BLOCKS Android  manifest.xml   Intents  

    Views   Services   No=fica=ons   Content  providers   Soham  Mondal  
  14. CONTENT PROVIDERS •  Enable applications to store and share data.

    •  Makes a specific set of the application's data available to other applications. •  Date stored in the file system, in an SQLite database or on other platforms Soham  Mondal  
  15. File   Ac=vity  1.1   Ac=vity  1.2   Ac=vity  2.1

      Ac=vity  2.2   Applica'on  2   (wants  phone  number)   Applica'on  1  (contacts  app)   Remote   SQLite   db   Ac=vity  3.1   Ac=vity  3.2   Applica'on  3   Content  Provider   Soham  Mondal  
  16. ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents  

    Views   Content  providers   Services   No=fica=ons   Soham  Mondal  
  17. Ac=vi=es   ANDROID BUILDING BLOCKS Android  manifest.xml   Intents  

    Views   Content  providers   No=fica=ons   Services   Soham  Mondal  
  18. SERVICES •  Faceless task that runs in the background. • 

    No visual user interface •  Runs in the background certain period of time •  For example: Background music Soham  Mondal  
  19. ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents  

    Views   Content  providers   Services   No=fica=ons   Soham  Mondal  
  20. Ac=vi=es   ANDROID BUILDING BLOCKS Android  manifest.xml   Intents  

    Views   Content  providers   Services   No=fica=ons   Soham  Mondal  
  21. NOTIFICATIONS •  Notifies the user about events •  Sent through

    NotificationManager •  Types – persistent icon – sound or vibration Soham  Mondal  
  22. ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents  

    Views   Content  providers   Services   No=fica=ons   Soham  Mondal  
  23. Ac=vi=es   ANDROID BUILDING BLOCKS Intents   Views   Content

     providers   Services   No=fica=ons   Android  manifest.xml   Soham  Mondal  
  24. ANDROID MANIFEST •  It names the Java package for the

    application. •  Components of the application — the activities, services, broadcast receivers, and content providers that the application is composed of. •  Permissions •  Lists the library •  And more Soham  Mondal  
  25.               Shows  the  program

     and   package  structure         Source  of  android  programs  are  shown  here   Shows  various  console  messages,  problems  etc   Outline:   Shows   various   program   elements   Soham  Mondal  
  26. HOW TO INSTALL EVERYTHING? 1.  Eclipse Download and install eclipse

    classic: http://www.eclipse.org/downloads/ 2.  JDK Download and install: http://www.oracle.com/technetwork /java/javase/downloads/index.html 3.  Android SDK starter package Download and install: http://developer.android.com/sdk/index.html 4.  Android development tools (ADT) plugin Download from within Eclipse: https://dl-ssl.google.com/android/eclipse/ 5.  Add platform and other optional components from within eclipse Soham  Mondal  
  27. APP MONETIZATION Free – Ad supported Premium – Pay per

    title Trial – Upgrade to Premium Freemium – In app billing Paymium – Premium + In-app billing Trial Paymium – Trial + Paymium Subscription – Auto recurrent payment Soham  Mondal  
  28. ADVERTIZING User launches your app User clicks on add in

    your app You get paid for each click Soham  Mondal