Android Development



          by Lope Emano
About the author
●   Android developer since 2010
●   Loves open source
●   Average software development skills
●   Survived the "Dark Ages" of Android
    Development
What's this talk about?

●   Basic, Advanced and useful topics
●   Tools used
●   The speaker's experiences
What is Android?

 ●   Based on the linux kernel
 ●   Dalvik Virtual Machine
 ●   700,000 apps as of October 2012
 ●   Has an active open source community
●   First phone sold in 2008
             T Mobile G1
●   Usage share
What are the tools needed?

 ●   Eclipse IDE
 ●   Android SDK
 ●   Android Plugin
 ●   Device not needed
What does an Android Project look like?
  ● src/
     Where your .java files are stored
  ● gen/
     Where your R.java file is stored
  ● assets/
     Where your raw resources are stored
  ● bin/
     Where your compiled files will be stored
  ● res/
     Where your layouts, image assets are stored
What does an Android Project look like?
  ● res/drawable
     drawable-xhdpi, drawable-hdpi, drawable-mdpi
  ● res/layout
     layouts are expressed in xml format
  ● res/values
     colors, text copies
  ● AndroidManifest.xml
     basically android's configuration file
What are the basic parts of an android app?
Activity
  - Android's version of a form

  - Must be mentioned in AndroidManifest.xml to be
  invoked

  - Has its own lifecycle

  - Applications are made up of activities
Advanced Tools Overview

 ●   Build Management
 ●   ORM Mapping
 ●   Dependency Injection
 ●   Porting stuff from ICS to Gingerbread
 ●   Web tools
Build Management
Maven
 ●   Dependency management
Build Management
●   Build profiles

mvn clean package -Ptest
mvn clean package -Pprod
mvn android:apk android:deploy android:run

● Archetypes/quickstarts
mvn archetype:generate
Build Management
Maven
 ●   Great for teams
 ●   Great for libraries
 ●   Slow but reliable
 ●   Great with Jenkins CI Server
O/R Mapping
 ORMLite
   like hibernate for android development
ORMLite + Maven
 Want ORMLite? Use Maven!
Dependency Injection
Roboguice
  like spring injection for android
development
Web Tools

 ●   Android Asset Studio
 ●   Action bar style generator
 ●   Holo colors generator
 ●   More..
Porting ICS to Gingerbread


 Jake Wharton
  ○   Champion of the "Dark Ages"

  ○   Author of open source, ICS support projects for
      android

  ○   Actively replies in forums and #android-dev
Porting ICS to Gingerbread
   Actionbar Sherlock
Porting ICS to Gingerbread
    View Pager Indicator
Porting ICS to Gingerbread
   HoloEverywhere
Porting ICS to Gingerbread
   Android UI Patterns
Tips and experiences
●   Don't be afraid to do it yourself
●   Be careful with legal issues
●   If you don't have a senior, #android-dev will
    suffice
●   Android users are very nice
●   More ICS users than gingerbread
●   Use dips, 48dip for your clickables
References
 http://developer.android.com

 http://www.slideshare.net/mdesjardins/android-
 development-the-basics

 http://www.techrepublic.com/blog/app-builder/a-newbies-
 guide-to-android-development/1216

 http://en.wikipedia.org/wiki/Android_%
 28operating_system%29

Android development

  • 1.
    Android Development by Lope Emano
  • 2.
    About the author ● Android developer since 2010 ● Loves open source ● Average software development skills ● Survived the "Dark Ages" of Android Development
  • 3.
    What's this talkabout? ● Basic, Advanced and useful topics ● Tools used ● The speaker's experiences
  • 4.
    What is Android? ● Based on the linux kernel ● Dalvik Virtual Machine ● 700,000 apps as of October 2012 ● Has an active open source community
  • 5.
    First phone sold in 2008 T Mobile G1
  • 6.
    Usage share
  • 7.
    What are thetools needed? ● Eclipse IDE ● Android SDK ● Android Plugin ● Device not needed
  • 8.
    What does anAndroid Project look like? ● src/ Where your .java files are stored ● gen/ Where your R.java file is stored ● assets/ Where your raw resources are stored ● bin/ Where your compiled files will be stored ● res/ Where your layouts, image assets are stored
  • 9.
    What does anAndroid Project look like? ● res/drawable drawable-xhdpi, drawable-hdpi, drawable-mdpi ● res/layout layouts are expressed in xml format ● res/values colors, text copies ● AndroidManifest.xml basically android's configuration file
  • 10.
    What are thebasic parts of an android app? Activity - Android's version of a form - Must be mentioned in AndroidManifest.xml to be invoked - Has its own lifecycle - Applications are made up of activities
  • 12.
    Advanced Tools Overview ● Build Management ● ORM Mapping ● Dependency Injection ● Porting stuff from ICS to Gingerbread ● Web tools
  • 13.
    Build Management Maven ● Dependency management
  • 14.
    Build Management ● Build profiles mvn clean package -Ptest mvn clean package -Pprod mvn android:apk android:deploy android:run ● Archetypes/quickstarts mvn archetype:generate
  • 15.
    Build Management Maven ● Great for teams ● Great for libraries ● Slow but reliable ● Great with Jenkins CI Server
  • 16.
    O/R Mapping ORMLite like hibernate for android development
  • 17.
    ORMLite + Maven Want ORMLite? Use Maven!
  • 18.
    Dependency Injection Roboguice like spring injection for android development
  • 19.
    Web Tools ● Android Asset Studio ● Action bar style generator ● Holo colors generator ● More..
  • 20.
    Porting ICS toGingerbread Jake Wharton ○ Champion of the "Dark Ages" ○ Author of open source, ICS support projects for android ○ Actively replies in forums and #android-dev
  • 21.
    Porting ICS toGingerbread Actionbar Sherlock
  • 22.
    Porting ICS toGingerbread View Pager Indicator
  • 23.
    Porting ICS toGingerbread HoloEverywhere
  • 24.
    Porting ICS toGingerbread Android UI Patterns
  • 25.
    Tips and experiences ● Don't be afraid to do it yourself ● Be careful with legal issues ● If you don't have a senior, #android-dev will suffice ● Android users are very nice ● More ICS users than gingerbread ● Use dips, 48dip for your clickables
  • 26.
    References http://developer.android.com http://www.slideshare.net/mdesjardins/android- development-the-basics http://www.techrepublic.com/blog/app-builder/a-newbies- guide-to-android-development/1216 http://en.wikipedia.org/wiki/Android_% 28operating_system%29