Lecture 1

INTRODUCTION TO ANDROID
BY ABDALLA ADEL ESSA

1

Smart Phone Operating Systems
•Google Android

•Apple iOS
•Symbian •Windows Phone •RIM Blackberry OS

BY ABDALLA ADEL ESSA

2

What’s Android
It is the first truly open and comprehensive platform for mobile devices. without the proprietary obstacles that have hindered mobile innovation.

BY ABDALLA ADEL ESSA

3

Android Design goals
•Openness •Choice •Innovation

BY ABDALLA ADEL ESSA

4

Android platform overview
•Application framework enabling reuse and replacement of components •Dalvik virtual machine optimized for mobile devices •Integrated browser based on the open source WebKit engine •Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional) •SQLite for structured data storage

•Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
•GSM Telephony (hardware dependent) •Bluetooth, EDGE, 3G, and WiFi (hardware dependent)

BY ABDALLA ADEL ESSA

5

Android platform overview
•Camera, GPS, compass, and accelerometer (hardware dependent) •Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE

BY ABDALLA ADEL ESSA

6

Android History

by 2003
Andy Rubin, Rich Miner, Nick Sears and Chris White Aim was to develop smarter mobile devices that are more aware of its owner's location and preferences.
BY ABDALLA ADEL ESSA

7

Android History
2005:
acquired Android

BY ABDALLA ADEL ESSA

8

Android History
2008: Android Open Source Project

BY ABDALLA ADEL ESSA

9

Google and Android business

BY ABDALLA ADEL ESSA

10

Market Share 2012

BY ABDALLA ADEL ESSA

11

Google and Android business :2011

•331million Android devices
•11 billion Market downloads •44.2 % of those in the U.S. have Android-based devices. •More than 900,000 Android activations every day

BY ABDALLA ADEL ESSA

12

Famous Apps
•What’sAPP •AngryBird •By2ollak

BY ABDALLA ADEL ESSA

13

Android Versions
• • • • • • • • • • • • • • • • • • • • • Android alpha Android beta Android 1.0 (API level 1) Android 1.1 (API level 2) Android 1.5 Cupcake (API level 3) Android 1.6 Donut (API level 4) Android 2.0 Eclair (API level 5) Android 2.0.1 Eclair (API level 6) Android 2.1 Eclair (API level 7) Android 2.2–2.2.3 Froyo (API level 8) Android 2.3–2.3.2 Gingerbread (API level 9) Android 2.3.3–2.3.7 Gingerbread (API level 10) Android 3.0 Honeycomb (API level 11) Android 3.1 Honeycomb (API level 12) Android 3.2 Honeycomb (API level 13) Android 4.0–4.0.2 Ice Cream Sandwich (API level 14) Android 4.0.3–4.0.4 Ice Cream Sandwich (API level 15) Android 4.1 Jelly Bean (API level 16) Android 4.2 Jelly Bean (API level 17) Android 4.3 Jelly Bean (API level 18) Android 4.4 KitKat (API level 19)

BY ABDALLA ADEL ESSA

14

Distribution of Devices

http://developer.android.com/resources/dashboard /platform-versions.html

BY ABDALLA ADEL ESSA

15

Android Market (Google Play)

BY ABDALLA ADEL ESSA

16

Android Development Tools
•Eclipse IDE •Android SDK

•ADT Plugin

BY ABDALLA ADEL ESSA

17

Android Development

BY ABDALLA ADEL ESSA

18

Setting up the Environment and Building Hello World App

BY ABDALLA ADEL ESSA

19

Steps
•Download and install eclipse •Download and install ADT

•Download the SDK from the SDK manager or as zip file
•If you downloaded the SDK manually in zip file –Extract it in some folder –Inside Eclipse. Go to window > preferences –Select Android from the left –In the right, beside ―SDK Location‖ Browse for the directory you have extracted the SDK in

BY ABDALLA ADEL ESSA

20

BY ABDALLA ADEL ESSA

21

SDK Manager

BY ABDALLA ADEL ESSA

22

AVG Manager

BY ABDALLA ADEL ESSA

23

Android Emulator

BY ABDALLA ADEL ESSA

24

New Android Project
•Package Name •Activity Name

•Build Target
•Application Name •Minimum API Level

BY ABDALLA ADEL ESSA

25

Project Structure
•Applications are written in Java Language •Compiled into android package file (.apk) •Applications consists of
– Components – Manifest file – Resources

BY ABDALLA ADEL ESSA

26

Application Components
•Activities •Services •Content Providers •Broadcast Receivers

BY ABDALLA ADEL ESSA

27

Activities
•Typically corresponds to single UI screen •Provides a screen with which users can interact in order to do something like making a call, sending email or calculate some thing. •Activity BackStack •Back key and home key •Views are the GUI components •User interface can be built using XML or in Java

BY ABDALLA ADEL ESSA

28

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

–Has methods: startService and stopService
–You can implement a client server model to support communication between activity and the service.

BY ABDALLA ADEL ESSA

29

Content Providers
•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

BY ABDALLA ADEL ESSA

30

Broadcast Receiver
•Components that respond to system-wide broadcast announcements –Screen goes off

–Battery low notification
•Applications can make their own broadcast messages

BY ABDALLA ADEL ESSA

31

Manifest File
•AndroidManifest.xml •Presents essential information about the application to the Android system

•Describes the components of the application — the activities, services, broadcast receivers, and content providers that the application is composed of
•Permissions •Minimum API Level

BY ABDALLA ADEL ESSA

32

AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />

BY ABDALLA ADEL ESSA

33

XML layout resource

xml

BY ABDALLA ADEL ESSA

34

Exercise
Make the First Hello World App

BY ABDALLA ADEL ESSA

35

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.