android overview

30
Mobile Applications SIG Event: Mobile Applications SIG Event: Developing Developing for the Android OS for the Android OS Presented by: Presented by: Has Taiar Has Taiar

Upload: has-taiar

Post on 06-May-2015

567 views

Category:

Technology


1 download

DESCRIPTION

A brief introduction to Android OS, its libraries, structure, and Application development and framework.

TRANSCRIPT

Page 1: Android overview

Mobile Applications SIG Event: Mobile Applications SIG Event:

Developing Developing for the Android OSfor the Android OS

Presented by: Presented by:

Has TaiarHas Taiar

Page 2: Android overview

Android OS Overview

Page 3: Android overview

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

Page 4: Android overview

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)

Page 5: Android overview

Why Android? open-source

oapache license ocost osets developers free

solid foundation: Linux kernelgood framework based on Javaempower users

oreplace core apps oPersonalize

Google stuff huge opportunity for vendors, developers, users

oOS for free, innovate at app level not just for phones

Page 6: Android overview

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.0 SDK 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

Page 7: Android overview

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.

SDK & Dev Tools (cont)

Page 8: Android overview

So what are the development approaches? Eclipse and ADT Mono for Android HTML 5 & Javascript

o Titanium Appaccelator

o PhoneGap Google App Inventor (MIT) Android App Makers like andromo Wordpress and its alike

SDK & Dev Tools (cont)

Page 9: Android overview

SDK & Dev Tools (cont)

Page 10: Android overview

Architecture & Building Blocks

Page 11: Android overview

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

Page 12: Android overview

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 Storageo File System, and SQLite.

Securityo SSL library

Integrated Web Browsero Webkit based oUses Google ChromeoCSS 3, HTML5, Animation, etc

Page 13: Android overview

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

Page 14: Android overview

Architecture & Building Blocks

Applications Framework Functionality managed by the system Underlying framework for your app development Sharing common functionality. This makes all apps are:

o Equal

o can use any of the mentioned functionalities

o can cooperate together

Page 15: Android overview

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

Page 16: Android overview

App Architecture (Cont.)

Activity

Visual User Interface for one tasko ex: list of menu items & input fields

Work together to form a cohesive UI One of the activities is marked as the first or main starting point. Can use additional UI elements such as pop-ups and dialogue boxes

Page 17: Android overview

App Architecture (Cont.)Activity Life-cycle

Activity Layout and Life-cycle

Page 18: Android overview

App Architecture (Cont.)Services

Run in the background for an indefinite period of time Interact with services using API or through UI interfaces. A service starts via a UI element, does not stop even after the activity gets disposed.Difference between Create() & Bind() Can communicate with other services. Examples:

o Media player serviceo Location Monitor Service

Page 19: Android overview

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 and the services.

o Broadcast intents delivered to all BR.o Some Broadcast intents are sticky.

Page 20: Android overview

App Architecture (Cont.)Content Provider Makes app data available to other apps by storing it to:

o File systemo SQLite

Implement a standard set of methodso Enable other apps to access and store data

Apps cannot call methods directly ContentResolver object is used to

o communicate with other content providero Cooperate with the provider to manage any interprocess communication that is involved

Page 21: Android overview

App Architecture (Cont.)

Intent Passive data structure holding an abstract description of an operation to be performed 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 system finds 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);

Page 22: Android overview

App Architecture (Cont.)

An intent filter declares the capabilities of its parent component — what an activity or service can do and what types of broadcasts a receiver can handle

Page 23: Android overview

App Architecture (Cont.)AndroidManifest.xml

Page 24: Android overview

Applications packaging

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

So what is delivered?

Page 25: Android overview

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

Page 26: Android overview

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 encryptiono DPM policies for encrypted storage and passwords

Page 27: Android overview

Android Issues

Drawbacks:FragmentationHardware AccelerationDevelopment environment Security IssueSlow Update processNo Central Point of Control (Security, Updates, Notifications, etc).

Page 28: Android overview

Conclusions

Android advantages outweigh its drawbacks as mentioned earlier. Android OS is still Consumer focused, no considerable presence in corporate market. 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, but would still be one of the top Mobile OS. It all depends on how Google Plays it.

Page 29: Android overview

References http://developer.android.com/ http://en.wikipedia.org/wiki/Android_(operating_system) http://www.slideshare.net/clement.escoffier/android-a-linuxbased-os-for-mobile-phone http://lifehacker.com/5801862/top-10-awesome-android-features-that-the-iphone-doesnt-have http://www.slideshare.net/atomi/android-overview http://androidandme.com/2012/04/opinions/the-future-of-android-in-2012/

Page 30: Android overview

Demo & Q&A