Overview Android Overview (What? & Why?) SDK and Development Tools. Android architecture, building blocks, and security. Applications’ Framework and Components. Comparable Features of Android. Q&A and Demo
What is Android? Modern open-source mobile operating system Full software stack Linux kernel 2.6 Java middleware, framework core applications Google & OHA Goals (Being better, open, and standard) and vision. Latest Release 4.0 (Ice Cream Sandwich)
Why Android? open-source oapache license ocost osetsdevelopers freesolid foundation: Linux kernelgood framework based on Javaempower users oreplace core apps oPersonalizeGoogle stuffhuge opportunity for vendors, developers, users oOS for free, innovate at app levelnot just for phones
SDK & Dev Tools All major platforms supported (linux, windows, and mac) NDK for porting native code OEM USB Driver ADT for Eclipse v 18.0.0SDK Package manager & AVD Manager 33.9 MB for the Starter SDK (core) clean and compact good documentation 4.0.3 latest version Alternative Dev tools
SDK & Dev Tools (cont) Eclipse and ADT Emulator adb tool from the command line o Android Debug Bridge o ex: adb install <path_to_apk> other third party tools for UI generating,sensors readings, etc.
Architecture & Building Blocks Linux 2.6 based Provides hardware management o File System o Memory management o Network (3G, EDGE, Wifi, BT) o Camera o Keyboard o Power Management
Architecture & Building BlocksLibraries Graphics o OpenGL, Scalable Image, Animations Media o Images (.png, .jpeg, etc) o Videos (.mp4, .3gp, .wmv, etc) o Audio (.mp3, .mp4 etc) Local Storage o File System, and SQLite. Security o SSL libraryIntegrated Web Browser o Webkit based oUses Google Chrome oCSS 3, HTML5, Animation, etc
Architecture & Building BlocksAndroid Runtime Dalvik o A virtual machine executing apps o Java development language Provides some supporting libraries o HTTPClient, XML Parsing, JSON, etc
Architecture & Building BlocksApplications Framework Functionality managed by the systemUnderlying framework for your appdevelopment Sharing common functionality. This makes all apps are: o Equal o can use any of the mentioned functionalities o can cooperate together
App Architecture Activity visible screens Service background services Content Provider shared data Broadcast receivers receive and react to broadcasted events Intent activating components AndroidManifest.xml
App Architecture (Cont.)Activity Visual User Interface for one task o ex: list of menu items & input fields Work together to form a cohesive UI One of the activities is marked as thefirst or main starting point.Can use additional UI elements such aspop-ups and dialogue boxes
App Architecture (Cont.) Activity Life-cycleActivity Layout and Life-cycle
App Architecture (Cont.)ServicesRun in the background for an indefiniteperiod of time Interact with services using API or throughUI interfaces. A service starts via a UI element, does notstop even after the activity gets disposed.Difference between Create() & Bind() Can communicate with other services. Examples: o Media player service o Location Monitor Service
App Architecture (Cont.)Broadcast Receiver Receive announcements and react. Examples of System broadcast: Time zone has changed Battery is low, and soon. Applications can also initiate broadcasts ex: Data has been downloaded An app can have many broadcastReceivers Difference between BroadcastReceiver andthe services. o Broadcast intents delivered to all BR. o Some Broadcast intents are sticky.
App Architecture (Cont.)Content Provider Makes app data available to other apps bystoring it to: o File system o SQLite Implement a standard set of methods o Enable other apps to access and store data Apps cannot call methods directly ContentResolver object is used to o communicate with other content provider o Cooperate with the provider to manage any interprocess communication that is involved
App Architecture (Cont.)IntentPassive data structure holding an abstract description of an operation to beperformed Facilitate late run-time binding between components All Activities, Services, and BroadcastReceivers are activated by intents. An intent is passed with its data to the System to start an operation, the systemfinds the appropriate action and performs it. The primary pieces of information in an intent are: o Action: action to be performed (ex: ACTION_VIEW, ACTION_DIAL, etc) o Data: data to operate on (ex: person record from the database) Examples: Intent i = new Intent(this, NameOfClassToTransitTo.class); i.putExtra(“key”, “value”); startActivity(i);
App Architecture (Cont.)An intent filter declares the capabilities of its parent component — what an activityor service can do and what types of broadcasts a receiver can handle
Applications packagingSo what is delivered?zip file (.apk) Java .class converted to .dex XML-files compressed into binary form manifest for app permissions signed with developer private key developer public key included assets packaged as is
Security Android apps run in sandboxed instances Linux user account per app Based on app permissions Apps are signed by developer private key No central authority why signing at all: two sibling apps can share data (process and userid) upgrade also smooth, same key
Other Android Features Open Nature Open Source Freedom of Customisability (Custom ROM, OS Builds, Core App Replacement). User widgets Community Based Development Third Party App Stores Flash Support Seamless Integration with Google Stuff Application framework enabling reusability and replacement of App components SQLite for structured data storage Media Support o Property-based animation and Renderscript 3D graphics. o Support MTP and PTP protocols Full device encryption o DPM policies for encrypted storage and passwords
Android IssuesDrawbacks:FragmentationHardware AccelerationDevelopment environmentSecurity IssueSlow Update processNo Central Point of Control (Security, Updates, Notifications, etc).
Conclusions Android advantages outweigh its drawbacks as mentioned earlier. Android OS is still Consumer focused, no considerable presence in corporatemarket. Fragmentation and Security are the two major concerns in Android. Development tools are evolving. In Future, Android might loose a bit of the share to other OS like Windows 7, butwould still be one of the top Mobile OS. It all depends on how Google Plays it.