getting started with android 1.5
DESCRIPTION
Android Presentation in Xebia's XKE sessionTRANSCRIPT
Android
By: Gaurav Kohli
Agenda
http://www.xebia.com
History
• In July 2005, Google acquired Android, Inc., a small startup company based in Palo Alto, CA.
• Android's co-founders who went to work at Google included Andy Rubin (co-founder of Danger), Rich Miner (co-founder of Wildfire Communications, Inc.), Nick Sears (once VP at T-Mobile), and Chris White (one of the first engineers at WebTV).
http://www.xebia.com
Introduction- What is Android ?
http://www.xebia.com
Android is a software platform for mobile devices, powered by the Linux operating system, initially developed by Google and later the Open Handset Alliance[1].It allows developers to write managed code in the Java language, controlling the device via Google-developed Java libraries.
[1] http://en.wikipedia.org/wiki/Google_Android
Introduction- Why Android ?
http://www.xebia.com
Mobile Computing is next big thing
Google is behind it
Not limited to mobiles only
Open-Handset Alliance
Community support
Open/Free/Java Syntax/Tools support
Open Handset alliance
Architecture of Android
Architecture of Android
• Linux Kernel based• Libraries (Open sourced/ Custom)
• Open GL • Android Runtime
• Dalvik VM• Application Framework• Applications
• Highly optimized VM, compiled byte is optimized for mobile devices
• End result is NOT the same byte code as Java,o dx in the sdk takes compiled Java class files and converts them into .dex
• No JIT• Built with security and performances (battery life) in mind
Dalvik VM
Applications
http://www.xebia.com
• SDK o Available at http://developer.android.com/sdk/1.1_r1/index.html
• Eclipseo 3.3(Europa) or 3.4 (Ganymede)
• Eclipse Plugino XP,Vista, Linux, x86 Mac 10.4.8 or latero http://developer.android.com/sdk/1.1_r1/installing.html
• Leave the emulator running! o Exact opposite to J2ME and BREW, your app will be deployed each
subsequent run or debug
Installing and Using the SDK
http://www.xebia.com
Building Blocks of Application
Activity An activity presents a visual user interface for one focused endeavor the user can undertake.
Intent An intent is an abstract description of an operation to be performed. It can be used with startActivity to launch an Activity, broadcastIntent to send it to any interested BroadCastReceiver components
Services A service doesn't have a visual user interface, but rather runs in the background for an indefinite period of time
Content Provider A content provider makes a specific set of the application's data available to other applications.
• Emulator (comes with SDK)
• Eclipse Plugin
• Android SDK
http://www.xebia.com
Developer Tool Chain
First Simple Application
package com.example.hello;
import android.app.Activity;import android.os.Bundle;import android.widget.TextView;
public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) {
……….
} }
http://www.xebia.com
Android Development flow
Android Manifest
• Describes the Application• Describes the building blocks of an application that it
exposes: activities, services, broadcast receivers and content providers
• Intent filters allow the platform to find the best application for the request
Comparison to other platforms
• Iphone
• Symbian
• Palm Pre
Advantages / Disadvantages
• iPhone o has a lot of iHype, easier to get publicity in the short termo only allows one application to run at a given timeo Apple are the gatekeepero no telephony access from within the SDK
• Androido Content providers and intents allow applications to
communicate with each othero GPS as a content provider o unregulated marketplaceo Potential hardware fragmentation
• Android 1.5 SDK Released.
• Samsung I7500 annouced yesterday.
• Aceratec to release an android Notebook.
• HTC planning to launch G1 in India soon.
http://www.xebia.com
Latest News
Google groups:For application development: http://groups.google.com/group/android-developers
For platform development:http://groups.google.com/group/android-platform
IRC: #android on freenode
anddev.org is a good source for example and tutorials
References
Q&A
http://www.xebia.com