What Is That Robot Up To?: Justin Grammens Recursive Awesome
What Is That Robot Up To?: Justin Grammens Recursive Awesome
About Me
Name: Justin Grammens Owner Localtone Interactive Co-Founder Recursive Awesome Focus on web & mobile software development Android, Blackberry, iPhone, Palm Background in Java & Ruby/Rails/Grails Spoken at many local meetings on Android Started Mobile Twin Cities User's Group http://mobiletwincities.com
!=
Android is NOT the G1!
!=
Android is NOT the Droid!
Summary
What Is Android Who Is Android Building Blocks Android Market Deploy MobileTC App To Market
What is Android?
Definition: Android is a software platform and operating system for mobile devices, based on the Linux kernel, developed by Google and later the Open Handset Alliance. Source: Wikipedia Would argue that it's not just for mobile devices. Has the potential to be used in all sorts of other areas where memory, cpu and disk is limited.
Devices!
Dell Mini 3
Devices!
Acer Liquid
Devices!
Devices!
HTC - Tattoo
Devices!
Motorola Cliq
Devices!
HTC Magic
Devices!
Samsung i7500
Devices!
LG GW620
Devices!
Samsung Behold 2
Devices!
Devices!
Who Is Android
A Project of the Open Handset Alliance (OHA) - More than 30 technology companies
Exponential Sales
First advertised based Android Phone HTC Dream (G1) Takes roughly 6 months to reach 1MM sales. Second advertised phone HTC Magic (myTouch) Takes roughly 3 months to reach 1 MM sales. Third advertised Android Phone ( Motorola Droid ) 250,000 units first week Android adoption is about to explode, declared CEO Eric Schmidt, explaining that all the necessary conditions are set for growth.
source: Techcrunch
Exponential Growth
Gartner:
Android to grab No. 2 spot by 2012 (Symbian will remain#1, iPhone will remain #3, Windows Mobile will remain #4 and Blackberry willdrop to #5) Multiple device ( including in this building ) manufactures looking to use Android. Don't believe everything you read Not about being an "iPhone killer"
Building Blocks
Basic foundation of an Android application Activity Intent Service Content Provider Your applications will not use all of these, but they will use atleast one.
Building Blocks
Activity Describes a single screen of the application Implemented as a class that extends Activity Activities are pushed on the history stack using an Intent Uses callbacks to trigger events during state changes. public class LocaltoneAndroid extends ListActivity { @Override public void onCreate(Bundle init) { } }
source: http://developer.android.com/reference/android/app/Activity.html
Building Blocks
Intent An Intent describes what you would like to have done. Create new screen using activity and intents Intent i = new Intent(this, MyNewActivity.class); startActivity(i); or open a web page new Intent(android.content.Intent.VIEW_ACTION, ContentURI.create("http://localtone.com"));
Building Blocks
Service
Code that is long running Runs without a UI Media Player is an good example Activity used to choose song Playback handled in a service public class MyService extends Service { public void onCreate() { } }
Building Blocks
Content Provider
Set of data wrapped in a custom API Allow sharing of data between applications Processes register themselves as a Content Provider. Anyone can share data. Google shares contacts, address, phone, etc. can be accessed by applications.
private String[] cols={android.provider.Contacts.PeopleColumns.NAME}; private Cursor cur = managedQuery(android.provider.Contacts.People.CONTENT_URI, cols, null, null);
http://developer.android.com/reference/android/provider/package-summary.html
Face of Android
Various types of Layouts - Similar to Swing Linear Layout Arranges children in a single row/column. The most common type of layout you'll use. FrameLayout Arranges children so they start at the top left. Used mainly for tabbed views. Relative Layout Arranged in relation to eachother ( element X is above/below element Y for example ). TableLayout Arranged in a cells, like HTML table.
Face of Android
About.xml <LinearLayout xmlns:android="http://schemas.android. com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@android:id/hello" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello" /> </LinearLayout>
Face of Android
Declarative - In XML Task: Define text in an "About" screen File: res/layout/about.xml <TextView android:id="@+id/about_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/about_text" /> File: About.java protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.about); }
Face of Android
Procedural - In Code Create a TextView object, set the text and behavior TextView pressMe = new TextView(context); pressMe.setText("Press Me"); addView(mDialogue, new LinearLayout.LayoutParams( FILL_PARENT, WRAP_CONTENT));
Face of Android
Android Manifest.xml What is any good Java program without a manifest file? =) Defines the version and package information Defines the permissions required by the application <uses-permission permission.INTERNET" /> android:name="android.
Website Latest Tweets @mobiletc Discussion List No splash screen Will add in coding session
Final Thoughts
It's not just phones or mobile devices!
Archos - MID
Lets Do It!
Resources
Books Mark Murphy - http://commonsware.com/Android/ Hello, Android by Pragmatic Programmers Sites AndDev.org - Good online forum Google Samples - http://is.gd/knVZ IRC #Android-Dev Google Groups Android Developers http://is.gd/knWK Local Groups! Android Dev MN - http://is.gd/knVO Mobile Twin Cities - http://mobiletwincities.com