Docstoc

Domo Arigato Android SDK

Document Sample
Domo Arigato Android SDK Powered By Docstoc
					Domo Arigato Android SDK

             You’re Welcome!
           Android SDK (@ 15000 feet)
•   Environment Setup
•   User Interface Basics
•   Layout Managers
•   Controls
•   Example View
•   Hello Android
•   Services
•   Intents
•   My Opinions
•   Resources
           Environment Setup
1. Install Java SE Development Kit:
   http://bit.ly/bMkbpo
2. Install Android SDK:
   http://developer.android.com/sdk/index.html
3. Install Eclipse:
   http://www.eclipse.org/downloads/
4. Install Android Development Tools for Eclipse:
   https://dl-ssl.google.com/android/eclipse/
User Interface Basics



          View



          Activity
User Interface Basics



          View
          •Basic building block of a User Interface
          •Defined in XML or Code
          •Often composed of other Views


          Activity
          •Contains Presentation logic
          •Defined in Code (Java)
          •Typically associated with 1 or more Views
              Layout Managers
LinearLayout
• Similar to a Silverlight StackPanel
• Supports Horizontal and Vertical orientations
              Layout Managers
TableLayout
• Similar to a Silverlight Grid
• Supports Rows and Columns
               Layout Managers
Other Layout Managers:
• RelativeLayout
  – Controls are laid out relative to the container
  – i.e. android:layout_below,
    android:layout_alignParentTop
• FrameLayout
  – Used to display only a single item at a time
  – Sounds pointless but it’s useful when there are multiple
    items that might be displayed in the same location but
    only one is visible at a time. Think status icons.
Controls
Controls
Example View

 Layout Manager (Linear Layout)
                                   Orientation




                           Child Control
DroidDraw
 DroidDraw
Not A Fan
Hello Android

 [Code Example]
                   Services
• Run in the background without a UI

• Two Types of Services:
  – Local Services are not accessible from other
    applications
  – Remote Services (AIDL) are accessible from other
    applications
                      Intents
• Intents are messages

• Intents can have payload
  – i.e. URI, Phone #, etc.


• Applications can send Intents and register for
  Intents of a specific type
                               Intents
Invoke Web Browser
  Intent intent = new Intent(Intent.ACTION_VIEW);
  intent.setData(Uri.parse("http://www.google.com"));
  activity.startActivity(intent);




Call A Phone Number
  Intent intent = new Intent(Intent.ACTION_CALL);
  intent.setData(Uri.parse(« tel:555-555-5555"));
  activity.startActivity(intent);
   Fantabulous

[Another Code Example]
                 My Opinions
The Android SDK makes me happy because…
• Eclipse is a great IDE
   • autocomplete, debugging support, price (free!)

• Java is a very mature language and very similar to C#

• Rich, full featured API
   • geolocation, data, background services, web, etc.
                 My Opinions
The Android SDK makes me sad because…
• Effectively 0 tooling for building UI’s
   • In my opinion this is Android’s biggest weakness

• Android ecosystem is fragmented

• Supporting custom fonts is very hacky
                 Resources
• See Slide #3 to setup your environment
• DroidDraw: http://www.droiddraw.org
• Developers Guide:
  http://developer.android.com/guide/index.html
Domo Arigato

         Questions?

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:22
posted:9/8/2011
language:English
pages:22