Android framework How to use it and extend it Android has got in the past three years an explosive growth: it has reached in Q1 2011 the goal of 100M of Activations world wide with a number of daily activations which overcome 500K in Q3 2011. These numbers are the result of a complex mixture between OEMs needs and the Open Philosophy which has allowed OEMs and an Open Community to participate proficiently at one of the bigger Open Source project in the world. Within this course we will dig into the Android Application Framework: from application's bound entities (such as Activities, Services, Intents, BroadcastReceivers, ), to the innovative, distributed-like, IPC model passing through the key features of this framework which enables quality applications within the mobile/embedded environment. The framework analysis will be taken forward showing how an example feature has been designed from the Java API down to the Android driver stub, enabling the student to extend the Android framework and to export its dedicated SDK. Total hours 30 hours in total where 16 of frontal lessons and 14 of hands on laboratory. Reference book: Mainly no books will be taken as reference, all the course material (Slides, code examples, ) will be available on-line for the students. Suggested readings could be: Learning Android, Marko Gargenta, O'Reilly Prerequisites OO programming. Having seen Java before helps a lot. Exam Project: choose one of the proposed ones or agree your proposal. 1/5
Detailed program Lesson 1: Introduction Introducing the course Little History of Android Web coordinates of Android documentation Android sources Mobile device environment Resource limitation (Memory/CPU/Power) Peripherals richness (As a PC but with much more: Sensors, Modem...) Android stack from bottom to top. Interesting comparison between dalvik/native/ajax How do I code thee Lesson 2: Application environment How Android manage applications: All starts from Zygote Foreground entities (Activities) Background entities (Services, Broadcast receivers, Content providers) Intents, intents filters, intent resolution explicit vs implicit, default among the set, resolvability Bundles to pass small data Tasks, Application stack and low memory management. Persist Activity state over low memory kills Lesson 3: Application environment 2 Application User Interface and Resources XML as the mother way to enhace the application development 2/5
Define UI layout Solve transparently the Localization problem Gives out of the box solutions to typical needs How to design UI Different Layouts and Views Design for portability. Drawables (static, stretchable, state by state) Tools to check/optimize layouts Lesson 4: All the ways to persist data: Flat files Shared Preferences DB based (SQL Lite) Data management / Fast UI Lists and Adapters to show sets of data From a simple static list to CursorAdapters How to expose data sets with ContentProviders Test case: how to solve the high latency problem when displaying data from an Internet service. Lesson 5: Async tasks Using handlers Interactive Services Messengers Bound Services IPC in Android. Complex Services and IPC Binder as a local distribute communication model 3/5
Lesson 6: Runtime Security in Android Runtime App isolation through linux processes Data protection through fine grained UID assignment System level ACL through GIDs for having access to system features (Camera, Wifi, SD Card) How to save securely user credentials Platform wide Lesson 7: The developer takes its own risk with App signing No applications can gain critical permissions Apps vs. Great Apps How to enhance the user experience taking care of: Lesson 8: Latencies and unpredictability UI Optimization Power consumption vs data readiness Java caveats Hardware feature from top to bottom How the Camera API is designed from Java to the Android driver stub 4/5
Laboratories should start after Lesson 2 Lab 1: Lab 2: Lab 3: Lab 4: Lab 5: Lab 6: First impact to Android app development Code versioning manage Android Source code Practice Android data management Binding to system services Apply tips to the on developing project Android build system 5/5