Date post: | 17-May-2015 |
Category: |
Technology |
Upload: | dnnddane |
View: | 5,735 times |
Download: | 0 times |
Build mobile Build mobile application in application in
AndroidAndroid
By: Savot DaneBy: Savot DaneEmail: Email:
[email protected]@gmail.com
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), …
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
Android System Android System ArchitectureArchitecture
Android System Android System ArchitectureArchitectureHome Application
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,..
How Android?How Android?How Applications Work?
Window
How Android?How Android?How Applications Work?
Android
Home App1Act2
Act3
Act4
Act1
Act1 Act2 Act3 Act4
How Android?How Android?Life cycle of an Android activity
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.
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
How Android?How Android?DEMO
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.
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