Android TCJUG
Upcoming SlideShare
Loading in...5
×
 

Android TCJUG

on

  • 6,164 views

Presentation of Android at the Twin Cities Java User's Group.

Presentation of Android at the Twin Cities Java User's Group.
Source code at: http://is.gd/TZFP
Video at: http://is.gd/U4Zr

Statistics

Views

Total Views
6,164
Views on SlideShare
6,148
Embed Views
16

Actions

Likes
2
Downloads
217
Comments
0

5 Embeds 16

http://192.168.50.8 12
http://www.slideshare.net 1
http://www.linkedin.com 1
https://www.linkedin.com 1
http://www.slideee.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Android TCJUG Android TCJUG Presentation Transcript

    • Summary About Me What is Android Anatomy of Android Setting up the environment Let's Code! quot;Contractoidquot; Deploy to the Market
    • About Me Name: Justin Grammens Owner Localtone Interactive - http://www.localtone.com Focus on mobile, internet and voice applications Support and advocate for open formats (ogg, odf) Background in Java Working in Ruby/Rails/Grails on/off for the past 2 years Enjoy working in new technologies VoIP Asterisk Adhearsion Mobile Android iPhone Started MobileTC - http://mobiletwincities.com
    • 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 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.
    • != Android is NOT the G1!
    • What is Android? A Project of the Open Handset Alliance (OHA) - More than 30 technology companies Source: Presentation by Sean Sullivan - http://mobileportland.com/content/introduction-google-android
    • Anatomy of Android Built on the Linux kernel Uses the Dalvik virtual machine Register Based VM written by Dan Bornstein Very low memory footprint Core and 3rd party applications have equal access Multiple applications able to run at the same time Copy and Paste functionality Background services Able to embed HTML, Javascript and stylesheets 100% fully customizable Handles native and streaming playback of mutimedia Currently supports developing apps in Java
    • What's the big deal? Truly open and FREE development platform. No quot;pay to playquot; developer agreement. Freely available tools (Eclipse) and no restrictions on OS you need to be on to develop. Component based architecture that can be extended Built in services out of the box. Location based (Gmail, Maps, Contacts) Multimedia - supports OGG! SQLite Database. Automatic management of application lifecycle. Portability across current and future hardware. Supports and plans for input from either trackball, keyboard or touch. Write your apps using Java!
    • Anatomy of Android
    • Anatomy of Android 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.
    • Anatomy of Android 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) { } }
    • Anatomy of Android Activity Lifecycle source: Hello, Android by Pragmatic Programmers
    • Anatomy of Android 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(quot;http://localtone.comquot;));
    • Anatomy of Android 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() { } }
    • Anatomy of Android 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
    • Anatomy of Android Various types of Layouts - Similar to Java 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.
    • Anatomy of Android XML file layout - About.xml <LinearLayout xmlns:android=quot;http://schemas.android. com/apk/res/androidquot; android:orientation=quot;verticalquot; android:layout_width=quot;fill_parentquot; android:layout_height=quot;fill_parentquot;> <TextView android:id=quot;@android:id/helloquot; android:layout_width=quot;wrap_contentquot; android:layout_height=quot;wrap_contentquot; android:text=quot;@string/helloquot; /> </LinearLayout>
    • Anatomy of Android Declarative - In XML Task: Define text in an quot;Aboutquot; screen File: res/layout/about.xml <TextView android:id=quot;@+id/about_contentquot; android:layout_width=quot;wrap_contentquot; android:layout_height=quot;wrap_contentquot; android:text=quot;@string/about_textquot; /> File: About.java protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.about); }
    • Anatomy of Android Procedural - In Code Create a TextView object, set the text and behavior TextView pressMe = new TextView(context); pressMe.setText(quot;Press Mequot;); addView(mDialogue, new LinearLayout.LayoutParams( FILL_PARENT, WRAP_CONTENT));
    • Anatomy 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 android:name=quot;android. permission.INTERNETquot; /> <activity android:name=quot;.Resultquot; Class name android:label=quot;@string/resultquot; of the Activity android:layout_width=quot;fill_parentquot;> </activity>
    • Development Environment Develop using Windows, Linux or Mac. Free to develop and deploy to your device. Recommend using to Eclipse IDE and Android Plugin Download IDE and from IDE - http://eclipse.org Install Android plugin through the Eclipse Plug-in Manager SDK http://code.google.com/android/intro/installing.html
    • Android Market
    • Android Market
    • Resources Books Hello, Android by Pragmatic Programmers Free PDF by AndDev.org - http://href.to/AB1 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
    • Let's Code! Source code of Contractoid at: http://github. com/justingrammens/contract oid/tree/master or at: http://is.gd/TZFP Video of this presentation at: http://is.gd/U4Zr
    • Thank you