SlideShare a Scribd company logo
Building an Android client Rohit Nayak Talentica Software
Agenda iPhone and the Mobile App Explosion How mobile apps differ Android philosophy Development Platform Core Android Concepts App Demo App Dissection
The iPhone Phenomenon
http://en.wikipedia.org/wiki/File:IPhone_sales_per_quarter.svg
http://www.techcrunch.com/2009/10/21/how-the-iphone-is-blowing-everyone-else-away-in-charts/
Mobile Limitations Screen size Battery Limitations CPU tick, memory refresh, screen lighting Speed Memory Keyboard
Usage Traits  Universal, Always Available  Small attention span Interruptible (calls, green light!) GPS Tap, Flick, Rotate, Pinch, Shake Accelerometer Voice, Texting Handwriting recognition Dropped calls, lack of coverage
Motorola Droid
Motorola Droid Android 2.0, 256MB 4.56-by-2.36-inch, 0.54 inch thick, 6oz, 480-by-854-pixel, 6hrs Camera: 5MP/4X flash, video rec Slide-out QWERTY keyboard Mail: Gmail, MS Exchange Google Maps Navigation
The Android mobile platform Linux 2.6 kernel Dalvik VM (.dex, .apk) Application framework SQLite, Integrated browser (Webkit) OpenGL graphics Media support  GSM/CDMA, Wireless Camera, GPS, Accelerometer
Core Applications Email client SMS Calendar Maps Contacts
Criticisms / Issues Not a std linux distribution Not Java ME/SE, limited libraries Apps run only from on-board memory Version compatibility Obsolete search results
Android Stack
Demo Android Contacts App
Application Framework Activity Manager: app life cycle, navigation stack Views: layout, widgets Content Providers: data storage/sharing Resource Manager: strings, images Notification Manager: alert mechanisms
Key Building Blocks Activities Services Intents Receivers Content Providers
Intents Describes operation to be performed Action / Data pair ACTION_VIEW  content://contacts/people ACTION_DIAL content://contacts/people/4 ACTION_DIAL tel:9822012345 Category (LAUNCHER, HOME, PREFERENCE) Type (data mime type) Extras (hashmap for custom data)
Activities Application consists of activities Interacts with user Associated with views Requests data or services via Intents Calls other activities  Services Background process MP3 player, polling sub-system
Receivers Broadcast receivers (low battery, call, sms) Intent Receivers Intents registered with Android Content Providers Share data with activities / services Queries in the form of a URI content://contacts/people
 
Installing Dev Environment Java 5/6 Eclipse Android SDK $PATH ADT plugin Install Updates
ADT Plugin Emulator, Device Controls Android Virtual Device Manager Dalvik Debug Monitor Service Debugger, LogCat File Explorer, Threads, Heap Physical Device Testing
Demo App Preview
Poolster Online “football pools” application Entities: Game, User Game    Stake, Option, Ends To join User chooses an Option REST Webservice backend Clients: iPhone, Grails, Android, Silverlight
Inside Poolster Directory Structure Manifest File App Launching Layout Files Menu
Directory Structure /src /res /drawable  (-ldpi, -hdpi) /layout (-small, -large, -land) /menu /raw /values  /bin   .class, .dex, .apk /gen  R.java - constants
AndroidManifest.xml <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; package=&quot;com.talentica.poolster&quot; android:versionCode=&quot;1&quot; android:versionName=&quot;1.0&quot;> <uses-permission android:name=&quot;android.permission.INTERNET&quot;></uses-permission> <application android:icon=&quot;@drawable/icon&quot; android:label=&quot;@string/app_name&quot;> <activity android:name=&quot;.Main&quot; android:label=&quot;@string/app_name&quot;> <intent-filter> <action android:name=&quot;android.intent.action.MAIN&quot; /> <category android:name=&quot;android.intent.category.LAUNCHER&quot; /> </intent-filter> </activity> <activity android:name=&quot;.GamesList&quot; android:label=&quot;@string/app_name&quot;> </activity> <activity android:name=&quot;.Login&quot; android:label=&quot;@string/app_name&quot;> </activity> </application> <uses-sdk android:minSdkVersion=&quot;3&quot; /> </manifest>
The Main activity Intent  Action = android.intent.action.MAIN Category =  android.intent.category.LAUNCHER Set layout Initialise views Set title, menu Launching another activity
Layouts Absolute, Relative, Linear, Table Dips vs pixels Screen size/density Landscape Widgets: TextView , ListView, ImageView, EditText, RadioGroup, Gallery, Button
Inside Poolster - 2 REST Client Xstream  Internationalization Location, Maps Database  Contacts AdMobs Integration
Deploying Join Android Developer Program Eclipse Android Tool “Export Signed Package” Upload .apk file to Android Market
Resources http://developer.android.com Professional Android Application Development (Wrox) Android Application Development (O’Riley) http://www.screaming-penguin.com/AndroidResources
Thanks

More Related Content

Similar to Building an Android client (20)

PDF
Java For Mobile Devices – Building a client application for the Android platform
IndicThreads
 
PDF
Java For Mobile Devices – Building a client application for the Android platform
IndicThreads
 
PDF
Getting Started with Android - OSSPAC 2009
sullis
 
PPT
LA_FUNDAMENTALS OF Android_Unit I ONE.ppt
JeevaMCSEKIOT
 
PDF
Android Application Development Online Training.pdf
SpiritsoftsTraining
 
DOCX
Android Basic Tutorial
Smartmonk
 
PDF
Introduction to Android - Mobile Portland
sullis
 
PPTX
Basic android workshop
Thagatpam Tech
 
PDF
Day1 before getting_started
Ahsanul Karim
 
PPTX
Google Developer Group(GDG) DevFest Event 2012 Android talk
Imam Raza
 
PDF
Android Development...The 20,000-Foot View
CommonsWare
 
PPTX
Intro to android (gdays)
Omolara Adejuwon
 
PPTX
Slideshare android
deepakkumargoyal
 
PPT
PPT Companion to Android
Dharani Kumar Madduri
 
PPT
Android Introduction
aswapnal
 
PPTX
UCD Android Workshop
Sean Murphy
 
KEY
Android sessions gtug ph singapore
mharkus
 
PDF
Android development
Parinda Rajapaksha
 
PDF
Android development - the basics, MFF UK, 2014
Tomáš Kypta
 
PPTX
Seminar on android app development
AbhishekKumar4779
 
Java For Mobile Devices – Building a client application for the Android platform
IndicThreads
 
Java For Mobile Devices – Building a client application for the Android platform
IndicThreads
 
Getting Started with Android - OSSPAC 2009
sullis
 
LA_FUNDAMENTALS OF Android_Unit I ONE.ppt
JeevaMCSEKIOT
 
Android Application Development Online Training.pdf
SpiritsoftsTraining
 
Android Basic Tutorial
Smartmonk
 
Introduction to Android - Mobile Portland
sullis
 
Basic android workshop
Thagatpam Tech
 
Day1 before getting_started
Ahsanul Karim
 
Google Developer Group(GDG) DevFest Event 2012 Android talk
Imam Raza
 
Android Development...The 20,000-Foot View
CommonsWare
 
Intro to android (gdays)
Omolara Adejuwon
 
Slideshare android
deepakkumargoyal
 
PPT Companion to Android
Dharani Kumar Madduri
 
Android Introduction
aswapnal
 
UCD Android Workshop
Sean Murphy
 
Android sessions gtug ph singapore
mharkus
 
Android development
Parinda Rajapaksha
 
Android development - the basics, MFF UK, 2014
Tomáš Kypta
 
Seminar on android app development
AbhishekKumar4779
 

Building an Android client

  • 1. Building an Android client Rohit Nayak Talentica Software
  • 2. Agenda iPhone and the Mobile App Explosion How mobile apps differ Android philosophy Development Platform Core Android Concepts App Demo App Dissection
  • 6. Mobile Limitations Screen size Battery Limitations CPU tick, memory refresh, screen lighting Speed Memory Keyboard
  • 7. Usage Traits Universal, Always Available Small attention span Interruptible (calls, green light!) GPS Tap, Flick, Rotate, Pinch, Shake Accelerometer Voice, Texting Handwriting recognition Dropped calls, lack of coverage
  • 9. Motorola Droid Android 2.0, 256MB 4.56-by-2.36-inch, 0.54 inch thick, 6oz, 480-by-854-pixel, 6hrs Camera: 5MP/4X flash, video rec Slide-out QWERTY keyboard Mail: Gmail, MS Exchange Google Maps Navigation
  • 10. The Android mobile platform Linux 2.6 kernel Dalvik VM (.dex, .apk) Application framework SQLite, Integrated browser (Webkit) OpenGL graphics Media support GSM/CDMA, Wireless Camera, GPS, Accelerometer
  • 11. Core Applications Email client SMS Calendar Maps Contacts
  • 12. Criticisms / Issues Not a std linux distribution Not Java ME/SE, limited libraries Apps run only from on-board memory Version compatibility Obsolete search results
  • 15. Application Framework Activity Manager: app life cycle, navigation stack Views: layout, widgets Content Providers: data storage/sharing Resource Manager: strings, images Notification Manager: alert mechanisms
  • 16. Key Building Blocks Activities Services Intents Receivers Content Providers
  • 17. Intents Describes operation to be performed Action / Data pair ACTION_VIEW content://contacts/people ACTION_DIAL content://contacts/people/4 ACTION_DIAL tel:9822012345 Category (LAUNCHER, HOME, PREFERENCE) Type (data mime type) Extras (hashmap for custom data)
  • 18. Activities Application consists of activities Interacts with user Associated with views Requests data or services via Intents Calls other activities Services Background process MP3 player, polling sub-system
  • 19. Receivers Broadcast receivers (low battery, call, sms) Intent Receivers Intents registered with Android Content Providers Share data with activities / services Queries in the form of a URI content://contacts/people
  • 20.  
  • 21. Installing Dev Environment Java 5/6 Eclipse Android SDK $PATH ADT plugin Install Updates
  • 22. ADT Plugin Emulator, Device Controls Android Virtual Device Manager Dalvik Debug Monitor Service Debugger, LogCat File Explorer, Threads, Heap Physical Device Testing
  • 24. Poolster Online “football pools” application Entities: Game, User Game  Stake, Option, Ends To join User chooses an Option REST Webservice backend Clients: iPhone, Grails, Android, Silverlight
  • 25. Inside Poolster Directory Structure Manifest File App Launching Layout Files Menu
  • 26. Directory Structure /src /res /drawable (-ldpi, -hdpi) /layout (-small, -large, -land) /menu /raw /values /bin .class, .dex, .apk /gen R.java - constants
  • 27. AndroidManifest.xml <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; package=&quot;com.talentica.poolster&quot; android:versionCode=&quot;1&quot; android:versionName=&quot;1.0&quot;> <uses-permission android:name=&quot;android.permission.INTERNET&quot;></uses-permission> <application android:icon=&quot;@drawable/icon&quot; android:label=&quot;@string/app_name&quot;> <activity android:name=&quot;.Main&quot; android:label=&quot;@string/app_name&quot;> <intent-filter> <action android:name=&quot;android.intent.action.MAIN&quot; /> <category android:name=&quot;android.intent.category.LAUNCHER&quot; /> </intent-filter> </activity> <activity android:name=&quot;.GamesList&quot; android:label=&quot;@string/app_name&quot;> </activity> <activity android:name=&quot;.Login&quot; android:label=&quot;@string/app_name&quot;> </activity> </application> <uses-sdk android:minSdkVersion=&quot;3&quot; /> </manifest>
  • 28. The Main activity Intent Action = android.intent.action.MAIN Category = android.intent.category.LAUNCHER Set layout Initialise views Set title, menu Launching another activity
  • 29. Layouts Absolute, Relative, Linear, Table Dips vs pixels Screen size/density Landscape Widgets: TextView , ListView, ImageView, EditText, RadioGroup, Gallery, Button
  • 30. Inside Poolster - 2 REST Client Xstream Internationalization Location, Maps Database Contacts AdMobs Integration
  • 31. Deploying Join Android Developer Program Eclipse Android Tool “Export Signed Package” Upload .apk file to Android Market
  • 32. Resources http://developer.android.com Professional Android Application Development (Wrox) Android Application Development (O’Riley) http://www.screaming-penguin.com/AndroidResources