Escolar Documentos
Profissional Documentos
Cultura Documentos
6/12/12
AGENDA
General Overview - ANDROID Features Of Android Prerequisites Android Architecture Anatomy of an Android Application Android Project Structure
Root Contents The magic R.java AndroidManifest.xml
6/12/12
Ways to Develop Mobile Application Creating a new Android Hello World Project
GENERAL OVERVIEW - ANDROID What is an Android? Android is a software stack for mobile devices that includes an operating system, middleware and key applications.
The OHA( Open Handset Alliance) released the Google Android is built on the open Linux Kernel. The open architecture based on Intents. It utilizes Dalvik virtual machine (DalvikVM). Which is a register based virtual machine difference to DalvikVM optimize memory and hardware resources in
6/12/12 a mobile
Gingerbread
Android 4.0+
Honeycomb
Android 3.0-3.2
6/12/12
6/12/12
Features Of Android
A simple and powerful SDK No licensing, distribution, or development fees Development over many platform Linux, Mac OS, Excellent documentation Thriving developer community For us Java-based, easy to import 3rdparty Java library Funding (40+ G1 phones) Prize (amazonskindle) Job opportunity
6/12/12
windows
Features Of Android
Application framework enabling reuse and Dalvik virtual machine optimized for mobile devices Integrated browser based on the open source Optimized graphics powered by a custom 2D OpenGL ES
replacement of components
WebKit engine
graphics library; 3D graphics based on the SQLite for structured data storage
Media support for common audio, video, and still AAC, AMR, JPG,
Prerequisites
Eclipse 3.6. Android SDK, version 14 or later See http://developer.android.com/sdk/installing.html Android ADT (Android Development Tools) plug-in for Eclipse, See
In order to run the application in the Emulator, you need to set Android Virtual Device (AVD) that targets.
up at least one
6/12/12
Download Android SDK and extract the zip file to an http://androidappdocs.appspot.com/sdk/index.html E.g.: extract to C:\ The SDK will be used by ADT in eclipse
arbitrary folder
6/12/12
6/12/12
Eclipse must be J2EE edition, 3.5 recommended Update site: https://dl-ssl.google.com/android/eclipse/ Install all the plugins in the repository Restart needed after installation
6/12/12
Configure ADT Plug-in Open eclipse Window->Preferences, select Android Setup the SDK location as the folder where you extracted the downloaded SDK zip file
6/12/12
Setup Emulators (AVD) After SDK APIs installation, click Virtual Devices Click new, there will be a dialog input a name choose a running target and a skin specify the SD card size
6/12/12
6/12/12
Android Architecture
6/12/12
Email Client SMS Program Calendar Maps Browser Contacts Etc 1616
6/12/12
Developers have full access to the same framework APIs used by the core applications. Users are allowed to replace components.
6/12/12
1717
Notification Enabling all applications to display customer alerts in the Manager status bar Activity Manager Managing the lifecycle of applications and providing a common navigation backstack
6/12/12
1818
Including
a set of C/C++ libraries used by components of the Android system to developers through the Android application framework
Exposed
6/12/12
1919
Core Libraries
Providing most of the functionality available in the core libraries of the Java language APIs
Data Structures Utilities File Access Network Access Graphics
6/12/12
Etc
2020
6/12/12
2121
footprint.
Compilation
6/12/12
6/12/12
Activity
An activity is usually a single screen in your application. Each activity is implemented as a single class that extends the Activity base class. Most applications consist of multiple screens. E.g Text message send 1) write the message. 2)choose contact etc Each of these screens would be implemented as an activity. to another screen is accomplished by a
6/12/12 Moving
Intent
An Intent is a special Android class. Intent describe what an application wants done. Two most important parts of the intent 1) the action & 2)the data to act upon Typical values for action are MAIN (the front door of the application), VIEW, PICK, EDIT, etc new Intent(android.content.Intent.VIEW_ACTION, ContentURI.create("http://anddev.org"));
6/12/12
Intent Receiver
an IntentReceiver when you want code in your application to execute in reaction to an external event. for example, when the phone rings, or when the data network is available Your application does not have to be running for its intent receivers to be called. the system will start your application, if necessary. For call An intent receiver is triggered
6/12/12
Service
A Service is code that is long-lived and runs without a UI. E.g a media player playing songs from play list. An activity starts a service using Context.startService() to run in background. you can connect to a service (and start it if it's not already running) with the Context.bindService() method.
6/12/12
Content Provider
A content provider is a class that implements a standard set of methods . other applications store and retrieve the type of data with content provider is useful if you want your application's data to be shared with other applications.
6/12/12
6/12/12
Is an auto-generated file indexing all the resources of your project as a sort of short-hand way to refer to resources you've included in your project
6/12/12
Build
Activity
6/12/12
3131
Select HelloWorld Project, Run->Run as>Android Application ADT will start a proper AVD and run HelloWorld app on it
6/12/12
3232
6/12/12
THANK YOU
6/12/12