Android App Development Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore
Mobile devices (e.g., smartphone, tablet PCs, etc.) are increasingly becoming an essential part of human life as the most effective and convenient communication tools not bounded by time and place. Welcome to Mobile App Development
Overview of android development How to use the power of java to build the applications for the android platform Adding various UI controls, custom layout, themes, styles Adding audio/video to your apps Making them location aware by incorporating GPS and maps Course Contents
OOP programming concepts Some experience with java Experience with Eclipse environment (helpful) Knowledge of Android capabilities (helpful) An Android smart phone to test your Apps What you should know
A simple and powerful SDK No licensing, distribution, or development fees Development over many platform Linux, Mac OS, Windows Excellent documentation Thriving developer community Why Android
Android is a software stack for mobile devices that includes an operating system, middleware and key applications What is Android?
Software platform from Google and the Open Handset Alliance July 2005, Google acquired Android, Inc. November 2007, Open Handset Alliance formed to develop open standards for mobile devices October 2008, Android available as open source December 2008, 14 new members joined Android project Introduction to Android
Android 1.5 Cupcake (API level 3) Android 1.6 Donut (API level 4) Android 2.0/2.1 Eclair (API level 6/7) Android 2.2 Froyo (API level 8) Android 2.3 Gingerbread (API level 9) Android 3.0 Honeycomb (targeted at tablet devices) (API level 11) Android 4.0 Ice Cream Sandwich (API level 14) Combination of Gingerbread and Honeycomb The most recent major Android update was Jelly Bean 4.2 (API level 17), which was released on commercial devices in November 2012 As of 2013, over 500 million active devices use the Android OS worldwide Android 5.0 Key Lime Pie (Under development) Android versions
Runs on top of Linux 2.6 Dalvik virtual machine optimized for mobile devices Integrated browser on the WebKit engine Optimized graphics with OpenGL ES SQLite database for structured data storage Android Architecture
Android Architecture
Works as a HAL Device drivers Memory management Process management Networking Linux Kernel
C/C++ libraries Interface through Java Surface manager Handling UI Windows 2D and 3D graphics Media codecs, SQLite, Browser engine Libraries
Dalvik VM, Dex files Compact and efficient than class files Limited memory and battery power Core Libraries Java 5 Std edition Collections, I/O etc. Android Runtime
API interface Activity manager manages application life cycle Application Framework
Built in and user apps Can replace built in apps Applications
Application are written in Java programming language Compiled into an Android package file (.apk) Each application runs in its own sandbox and Linux process Application consists of components, a manifest file and resources Components: 1) Activities 2) Services 3) Content providers 4) Broadcast receivers Application Fundamentals
An activity represents a single screen with a user interface Most applications contain multiple activities When a new activity starts, it is pushed onto the back stack User interface can be built with XML or in Java Monitor lifespan through callback methods like onstart(), onpause(), etc. Activities
Services perform long-running operations in the background Does not contain a user interface Useful for things like network operations, playing music, etc. Runs independently of the component that created it Can be bound to by other application components, if allowed Services
Used to store and retrieve data and make it accessible to all application Are the only way to share data across applications Exposes a public URI that uniquely identifies its data set Data is exposed as a simple table on a database model Android contains many provider for things like contacts, media, etc. Content providers
A components that responds to system-wide broadcast announcements Examples include when the screen turns off, the battery is low, etc. Applications can also initiate their own broadcasts Broadcast receivers contain no user interface They can create status bar notification to alert the user Broadcast receivers
Applications must have an AdroidManifest.xml file in its root directory Presents information about the application to the Android system Describes the components used in the application Declares the permission required to run the application Declares the minimum Android API level that the application requires Android Manifest file
THANKS