Google Android Development James Williams BarCamp SD
What is Google Android? Building blocks of an Android App Demo
What is Android? Software stack for mobile devices (based on Linux) Uses Java source code for applications* All features of the hardware are accessible to the developer First device is T-Mobile G1, others due next year
Building Blocks Activities Intent Permissions Services Content Providers
Activity Life Cycle
Views Objects that know how to draw themselves on the screen Equivalent to Java Swing components Can layout in code or in XML
Sample Layout <LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;  android:layout_width=&quot;wrap_content&quot;  android:layout_height=&quot;wrap_content&quot; android:orientation=&quot;vertical&quot; android:paddingLeft=&quot;6dip&quot; android:paddingRight=&quot;6dip&quot; android:paddingBottom=&quot;3dip&quot;> <EditText android:id=&quot;@+id/title&quot;  android:maxLines=&quot;1&quot;  android:layout_marginTop=&quot;2dip&quot; android:layout_width=&quot;wrap_content&quot; android:ems=&quot;25&quot; android:layout_height=&quot;wrap_content&quot;  android:autoText=&quot;true&quot; android:capitalize=&quot;sentences&quot; android:scrollHorizontally=&quot;true&quot; /> <Button android:id=&quot;@+id/ok&quot; android:layout_width=&quot;wrap_content&quot;  android:layout_height=&quot;wrap_content&quot;  android:layout_gravity=&quot;right&quot; android:text=&quot;@string/button_ok&quot; /> </LinearLayout>
Intents A declaration to the OS that you want to do something (pre-defined action) VIEW (url, contact, pictures) PICK  EDIT DIAL
Permissions Provide low-level access to features (like SMS, GPS, Internet, etc) Declared by the dev at creation time Users are prompted by Android Market when installing the app
Android Market (Beta) $25 per developer/entity for unlimited apps Only free apps for the moment Upgrades aren't seamless Paid app alternatives Only Android:  http://onlyandroid.mobihand.com/ Handago: http://www.handango.com
Demo
Resources Android http://www.android.com Android Market http://www.android.com/market DroidDraw Construct GUIs visually -  http://www.droiddraw.org/ Twitter/FriendFeed: @ecspike

Android Development

  • 1.
    Google Android DevelopmentJames Williams BarCamp SD
  • 2.
    What is GoogleAndroid? Building blocks of an Android App Demo
  • 3.
    What is Android?Software stack for mobile devices (based on Linux) Uses Java source code for applications* All features of the hardware are accessible to the developer First device is T-Mobile G1, others due next year
  • 4.
    Building Blocks ActivitiesIntent Permissions Services Content Providers
  • 5.
  • 6.
    Views Objects thatknow how to draw themselves on the screen Equivalent to Java Swing components Can layout in code or in XML
  • 7.
    Sample Layout <LinearLayoutxmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; android:layout_width=&quot;wrap_content&quot; android:layout_height=&quot;wrap_content&quot; android:orientation=&quot;vertical&quot; android:paddingLeft=&quot;6dip&quot; android:paddingRight=&quot;6dip&quot; android:paddingBottom=&quot;3dip&quot;> <EditText android:id=&quot;@+id/title&quot; android:maxLines=&quot;1&quot; android:layout_marginTop=&quot;2dip&quot; android:layout_width=&quot;wrap_content&quot; android:ems=&quot;25&quot; android:layout_height=&quot;wrap_content&quot; android:autoText=&quot;true&quot; android:capitalize=&quot;sentences&quot; android:scrollHorizontally=&quot;true&quot; /> <Button android:id=&quot;@+id/ok&quot; android:layout_width=&quot;wrap_content&quot; android:layout_height=&quot;wrap_content&quot; android:layout_gravity=&quot;right&quot; android:text=&quot;@string/button_ok&quot; /> </LinearLayout>
  • 8.
    Intents A declarationto the OS that you want to do something (pre-defined action) VIEW (url, contact, pictures) PICK EDIT DIAL
  • 9.
    Permissions Provide low-levelaccess to features (like SMS, GPS, Internet, etc) Declared by the dev at creation time Users are prompted by Android Market when installing the app
  • 10.
    Android Market (Beta)$25 per developer/entity for unlimited apps Only free apps for the moment Upgrades aren't seamless Paid app alternatives Only Android: http://onlyandroid.mobihand.com/ Handago: http://www.handango.com
  • 11.
  • 12.
    Resources Android http://www.android.comAndroid Market http://www.android.com/market DroidDraw Construct GUIs visually - http://www.droiddraw.org/ Twitter/FriendFeed: @ecspike