Build Mobile Application In Android

14
Build mobile Build mobile application in application in Android Android By: Savot Dane By: Savot Dane Email: Email: [email protected] [email protected]

Transcript of Build Mobile Application In Android

Page 1: Build Mobile Application In Android

Build mobile Build mobile application in application in

AndroidAndroid

By: Savot DaneBy: Savot DaneEmail: Email:

[email protected]@gmail.com

Page 2: Build Mobile Application In Android

What Android?What Android?

• Google and the Open Handset Alliance, 2007

• Deploy by many mobile companies, SonyEricsson, HTC, LG, Motorola, Acer, Ramos, …

• Mobile platform: Symbian, Window Mobile, iPhone OS, Java Mobile Edition, Linux Mobile(LiMo), …

Page 3: Build Mobile Application In Android

Why Android?Why Android?

• Open source and SDK.• Automatic memory management and application

life circle. • A component-based architecture (mashups)• Tons of built-in services• High quality graphics, audio and video: 2D,

3D(OpenGL), Various codecs support• Portable platform: Linux Kernel and Optimized

JVM (Dalvik) for Low Memory Requirement

Page 4: Build Mobile Application In Android

Android System Android System ArchitectureArchitecture

Page 5: Build Mobile Application In Android

Android System Android System ArchitectureArchitectureHome Application

Page 6: Build Mobile Application In Android

How Android?How Android?Application Components

Application (program)

1 application can have 1 or more Activities

Activity (UI) A user interface screen

Intent (action) A mechanism for describing a specific action.

Services (running in background)

A service doesn't have a visual user interface.

Content provider (data wrapper)

A class to use share data between applications. Data can be store in text file, SQLite db,..

Page 7: Build Mobile Application In Android

How Android?How Android?How Applications Work?

Window

Page 8: Build Mobile Application In Android

How Android?How Android?How Applications Work?

Android

Home App1Act2

Act3

Act4

Act1

Act1 Act2 Act3 Act4

Page 9: Build Mobile Application In Android

How Android?How Android?Life cycle of an Android activity

Page 10: Build Mobile Application In Android

How Android?How Android?Activity Events

onCreate Called when the activity first starts up.Place where to create user interface

onStart The activity is about to be displayed to the user.

onResume Called when your activity can start interacting with the user. Place to start animations and music.

onPause Called when the activity is about to go into the background.

onStop called when activity is no longer visible tothe user for a while.

onRestart If this method is called, it indicates your activity is being redisplayed to the user from a stopped state.

onDestroy Called right before your activity is destroyed.

Page 11: Build Mobile Application In Android

How Android?How Android?Prepare for Development

Java JDK 5.0+ http://java.sun.com/javase/downloads

Eclipse http://www.eclipse.org/downloads

Android SDK http://d.android.com/sdk

Android Eclipse Plug-In https://dl-ssl.google.com/android/eclipse/http://dl-ssl.google.com/android/eclipse/

Android Platform SDK1.5, 1.6, 2.0, 2.01, 2.1

Update via Android SDK and AVG Manager

Page 12: Build Mobile Application In Android

How Android?How Android?DEMO

Page 13: Build Mobile Application In Android

Measurement UI DesignMeasurement UI Design

• px (pixels): Dots on the screen.

• in (inches): Size as measured by a ruler.

• mm (millimeters): Size as measured by a ruler.

• pt (points): 1/72 of an inch.

• dp (density-independent pixels): An abstract unit basedon the density of the screen. On a display with 160 dotsper inch, 1dp = 1px.

• dip: Synonymfor dp, usedmore often in Google examples.

• sp (scale-independent pixels): Similar to dp but also scaledby the user’s font size preference.

Page 14: Build Mobile Application In Android

ReferencesReferences• Hellow Android by Ed Burnette, Nov 2009

• http://developer.android.com/guide/index.html

• http://android-developers.blogspot.com

Brought to you by:Brought to you by:

SharevisionTeamSharevisionTeam