Android (2009.12.30) Frank Ducrest
Android 2 Android mobile operating system based on a monolithic Linux kernel (all OS operations take place in the kernel space) suited to Java apps by design (Dalvik Virtual Machine); developers write code in the Java language using Googledeveloped Java libraries open source history: started by Android Inc., which was purchased by Google, then later by the Open Handset Alliance current stable version (as of this writing): 2.0.1, Release 1 / 2009 12 03 http://www.android.com/
Android 3 Android (continued) Motorola Droid first device supporting v2.0, November 6, 2009 28 current devices support Android with 15 announced in works (as of this writing) industry predictions include Android consumer devices knocking iproducts out of second place within two years (based on cost and expected availability of unlocked phones) Eclipse 3.2 or later is the official IDE (uses the Android Development Tools (ADT) Plugin) http://www.android.com/
Android 4 Android Intent provide a framework for your app so that your app does not interfere with other system functions; i. e. doesn't crash the phone allow programming to take place in a manner similar to programming for traditional devices common capabilities of Android devices include access to local storage full range of network connectivity play and record audio and video GPS phone services
Android 5 Android Concepts project application under development application android; app; finished executable product activity building block of user interface content provider abstraction level to provide access to data stored on the device service process mean to be continuously run intent system messages for notification (information, event occurrence)
Android 6 Distribution APK archive of all necessary files and a manifest file (AndroidManifest.xml)
Android 7 Example AndroidManifest.xml File <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="himom.bozo" android:versioncode="1" android:versionname="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".himom" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> </application> <uses-sdk android:minsdkversion="6" /> </manifest>
Android 8 Android Eclipse Project project directory AndroidManifest.xml default.properties assets directory for static files bin directory for binaries; includes APK gen directory for auto generated code libs directory for 3 rd party JARS scr Java source code res directory for various resources; holds icons, layouts tests directory for a separate project used for testing the enclosing project
Android 9 Android Ant Project same as Eclipse project, but includes build.xml ant script file local.properties
Android 10 Example Android Project Java Code package himom.bozo; import android.app.activity; import android.os.bundle; import android.widget.textview; public class himom extends Activity { /** Called when the activity is first created. */ @Override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); TextView tv = new TextView(this); tv.settext("hello, Mom!"); setcontentview(tv); } }
Android 11 Example Android Project File Structure himom3 -- AndroidManifest.xml -- assets -- bin -- classes.dex -- himom `-- bozo -- R$attr.class -- R$drawable.class -- R$layout.class -- R$string.class -- R.class `-- himom.class -- himom3.apk `-- resources.ap_ -- default.properties -- gen `-- himom `-- bozo `-- R.java
Android 12 Example Android Project File Structure (continued) -- res -- drawable-hdpi `-- icon.png -- drawable-ldpi `-- icon.png -- drawable-mdpi `-- icon.png -- layout `-- main.xml `-- values `-- strings.xml `-- src `-- himom `-- bozo `-- himom.java
Android 13 Example App Run in Emulator