IntroductionWhat is Android? • A software platform and operating system for mobile devices • Based on the Linux kernel • Developed by Google and later the Open Handset Alliance (OHA) • Allows writing managed code in the Java language • Android platform was announced on 5th November 2007 with the founding of OHA
AndroidAn Open Handset Alliance Project What is the Open Handset Alliance (OHA)? • OHA is an alliance of nearly 50 organizations devoted to advancing open standards for mobile devices • Develop technologies that will significantly lower the cost of developing and distributing mobile devices and services What’s the Target? • Write apps to run on mobile phones • Will be released as open source http://code.google.com/android
PlatformOperating System(s) • Android uses Linux for its device drivers, memory management, process management, and networking. • The next level up contains the Android native libraries. They are all written in C/C++ internally, but you’ll be calling them through Java interfaces. In this layer you can find the Surface Manager, 2D and 3D graphics, Media codecs, the SQL database (SQLite), and a native web browser engine (WebKit). Call through Java Call through Java Interface Interface C/C++ Native Libraries Surface Manager Surface Manager SQLite SQLite Media Codecs Media Codecs Webkit Webkit
Platform • Dalvik Virtual Machine. Dalvik runs .dex files, which are converted at compile time fromlayoutlayout.xml.xml R.java R.java standard class and jar files. *.class *.class *dex. *dex. • The Dalvik runtime is highly optimized: *.java *.java Run multiple VMs efficiently Each app has its own VM Minimal memory footprint android- android- manifest.xml manifest.xml application. apk file • Android applications are compiled to Dalvik bytecode.
Software Development IDE and Tools Android SDK • Class Library • Developer Tools dx – Dalvik Cross-Assembler aapt – Android Asset Packaging Tool adb – Android Debug Bridge ddms – Dalvik Debug Monitor Service • Emulator and System Images • Documentation and Sample Code Eclipse IDE + ADT (Android Development Tools) • Reduces Development and Testing Time • Makes User Interface-Creation easier • Makes Application Description Easier
Android APIsAndroid-specific packages are easy to identify because they start with android inthe package name. Some of the more important packages are:android.app—Android application model accessandroid.bluetooth—Android’s Bluetooth functionalityandroid.content—Accessing and publishing data in Androidandroid.net—Contains the Uri class, used for accessing contentandroid.gesture—Create, recognize, load, and save gesturesandroid.graphics—Graphics primitivesandroid.location—Location-based services (such as GPS)android.opengl—OpenGL classesandroid.os—System-level access to the Android environmentandroid.provider—ContentProvider-related classesandroid.telephony—Telephony capability access, including support for both Code Division MultipleAccess (CDMA) and Global System for Mobile communication (GSM) devicesandroid.text—Text layoutandroid.util—Collection of utilities for logging and text manipulation, including XMLandroid.view—UI elementsandroid.webkit—Browser functionalityandroid.widget—More UI elements
Android APIsJava packages included in the Android SDK:java.lang—Core Java language classesjava.io—Input/output capabilitiesjava.net—Network connectionsjava.text—Text-handling utilitiesjava.math—Math and number-manipulation classesjavax.net—Network classesjavax.security—Security-related classesjavax.xml—DOM-based XML classesorg.apache.*—HTTP-related classesorg.xml—SAX-based XML classes
Android Building Blocks Activity: It represents a visible Services application component within Android Intents: An Intent in Android Notification describes what you want to do. Content Provider: Views: It helps data sharing between UI elements different Android Applications or between different Activities.