33
Yarl IT Hub Community Meet Up Android Presentation S.Vanjikumaran

Hello androidforyarlmeetup

Embed Size (px)

Citation preview

Page 1: Hello androidforyarlmeetup

Yarl IT Hub Community Meet Up 2

Android Presentation

S.Vanjikumaran

Page 2: Hello androidforyarlmeetup

Agenda

• Mobile Application Development (MAD)• Intro to Android platform• Platform architecture• Application building blocks• Development tools• Hello Android Live Demo• hackathon!• Advance programming with Database

Page 3: Hello androidforyarlmeetup

Few reasons to go MAD…

• Smart Phones– Internet access anywhere– Social networking

• Millions of mobile users• Open standards• Market Share

Page 4: Hello androidforyarlmeetup

Few reasons to go MAD - Market Share

Page 5: Hello androidforyarlmeetup

Open Standards - Open Handset Alliance

• A business alliance(OHA) consisting of 47 companies to develop open standards for mobile devices

Page 6: Hello androidforyarlmeetup

What is Android?

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

Page 7: Hello androidforyarlmeetup

Android Architecture

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

Page 8: Hello androidforyarlmeetup

Android Architecture

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

Page 9: Hello androidforyarlmeetup

Android Architecture

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

Page 10: Hello androidforyarlmeetup

Android Architecture

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

Page 11: Hello androidforyarlmeetup

Android Architecture

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications. Android S/W Stack - Application

Page 12: Hello androidforyarlmeetup

Android S/W Stack - Application

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications. Android S/W Stack - Application

• Android provides a set of core applications: Email Client SMS Program Calendar Maps Browser Contacts Etc

• All applications are written using the Java language.

Page 13: Hello androidforyarlmeetup

Android S/W Stack - Application

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications. • Enabling and simplifying the reuse of

componentsDevelopers have full access to the same

framework APIs used by the core applications.Users are allowed to replace components.

Page 14: Hello androidforyarlmeetup

Android S/W Stack - Libraries

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

• Including a set of C/C++ libraries used by components of the Android system• Exposed to developers through the Android

application framework

Page 15: Hello androidforyarlmeetup

Android S/W Stack - Runtime

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

• Core LibrariesProviding most of the functionality available in the core libraries of

the Java languageAPIs

Data StructuresUtilitiesFile AccessNetwork AccessGraphicsEtc

Page 16: Hello androidforyarlmeetup

Android S/W Stack – Runtime (Cont)

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

• Dalvik Virtual MachineProviding environment on which every Android

application runsEach Android application runs in its own process, with

its own instance of the Dalvik VM.Dalvik has been written such that a device can run

multiple VMs efficiently.

Register-based virtual machine

Page 17: Hello androidforyarlmeetup

Android S/W Stack – Runtime (Cont)

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

• Dalvik Virtual Machine (Cont)Executing the Dalvik Executable (.dex) format

.dex format is optimized for minimal memory footprint.Compilation

Relying on the Linux Kernel for:ThreadingLow-level memory management

Page 18: Hello androidforyarlmeetup

Android S/W Stack – Linux Kernel

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications. Relying on Linux Kernel 2.6 for core system services

Memory and Process Management

Network Stack

Driver Model

Security

Providing an abstraction layer between the H/W and the rest of the S/W stack

Page 19: Hello androidforyarlmeetup

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

Page 20: Hello androidforyarlmeetup

• Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

Page 21: Hello androidforyarlmeetup

Hello Yarl!

Hello Yarl

Page 22: Hello androidforyarlmeetup

Application Building Blocks

• Activity• IntentReceiver• Service• ContentProvider

Page 23: Hello androidforyarlmeetup

Activities

• Represents the presentation layer of an Android application, e.g. a screen which the user sees. An Android application can have several activities and it can be switched between them during runtime of the application. But, they can:– Be faceless– Be in a floating window– Return a value

Page 24: Hello androidforyarlmeetup

IntentReceivers

• Components that respond to broadcast ‘Intents’

• Way to respond to external notification or alarms

• Apps can invent and broadcast their own Intent

Page 25: Hello androidforyarlmeetup

Intents

• Think of Intents as a verb and object; a description of what you want done– E.g. VIEW, CALL, PLAY etc..

• System matches Intent with Activity that can best provide the service

• Activities and Intent Receivers describe what Intents they can service

Page 26: Hello androidforyarlmeetup

Intents (cont..)

GMail

Contacts

Home

Blogger

Chat Client component makes a request for a specific action

“Pick photo”

Picasa

System picks best component for that action

New components can use existing functionality

Blogger

Photo Gallery

Page 27: Hello androidforyarlmeetup

Services

• Faceless components that run in the background– E.g. music player, network download etc…

Page 28: Hello androidforyarlmeetup

ContentProviders

• Enables sharing of data across applications– E.g. address book, photo gallery

• Provides uniform APIs for:– querying– delete, update and insert.

• Content is represented by URI and MIME type

Page 29: Hello androidforyarlmeetup

Development Tools

• Eclipse• Android SDK 1.0-2.0

developer.android.com

Page 30: Hello androidforyarlmeetup

The Emulator

• QEMU-based ARM emulator• Runs the same image as the

device

• Limitations:– No Camera support

http://en.wikipedia.org/wiki/QEMU

Page 31: Hello androidforyarlmeetup

Hackathon

Page 32: Hello androidforyarlmeetup

Advance programming with Database

Page 33: Hello androidforyarlmeetup

References

• http://developer.android.com