Android Application Development: by Hussain Ratlamwala

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 13

Android Application Development

by Hussain Ratlamwala

Introduction to Android

What is Android
Android is an open source operating system, created by Google specifically for use on mobile devices (cell phones mostly) Linux based (2.6 kernel) Can be programmed in C/C++ but most app development is done in Java (Java access to C Libraries via JNI (Java Native Interface)) Supports Bluetooth, Wi-Fi, and 3G and 4G networking

Software platform from Google and the Open Handset Alliance July 2005, Google acquired Android, Inc. November 2007, Open Handset Alliance formed to develop open standards for mobile devices October 2008, Android available as open source December 2008, 14 new members joined Android project

Background

Reuse and replacement of components Dalvik virtual machine Integrated browser Optimized graphics SQLite Media support GSM Telephony Bluetooth, EDGE, 3G, and WiFi Camera, GPS, compass, and accelerometer Rich development environment

Android Features

Android Architecture

Apps are written in Java Bundled by Android Asset Packaging Tool Every App runs its own Linux process Each process has its own Java Virtual Machine Each App is assigned a unique Linux user ID Apps can share the same user ID to see each others files

Application Fundamentals

Activity

Services

Present a visual user interface for one focused endeavor the user can undertake Example: a list of menu items users can choose from Run in the background for an indefinite period of time Example: calculate and provide the result to activities that need it Receive and react to broadcast announcements Example: announcements that the time zone has changed Store and retrieve data and make it accessible to all applications Example: Android ships with a number of content providers for common data types (e.g., audio, video, images, personal contact information, etc.) Hold the content of a message Example: convey a request for an activity to present an image to the user or let the user edit some text

Broadcast Receivers Content Providers

Intents

Application Components

http://developer.android.com/sdk/installing.html

Preparing your system and system requirements Downloading and Installing the SDK Installing ADT plug-in for Eclipse Adding Platforms and Components Exploring the SDK

Installation

Must have Eclipse IDE installed Must have Android SDK installed Must have knowledge of Java Must have the external Google Maps library installed in your SDK environment. The Maps library is included with the Google APIs add-on, which you can install using the Android SDK and AVD Manager.

Preparing for the Development

Defines the system image and device settings used by the Emulator To create an AVD in Eclipse:
1. Select Window > Android SDK and AVD Manager.
The Android SDK and AVD Manager displays.

2. Make sure the entry for Virtual Devices is selected and click New.
The Create new AVD window displays.

3. 4. 5. 6.

Enter a Name for the AVD. Select Google APIs (API level 3) as the Target. Click Create AVD. Close the Android SDK and AVD Manager.

Create an Android Virtual Device (AVD)

To create the project in Eclipse:


1. Select File > New > Project. 2. Select Android Project in the Android folder and click Next. 3. Enter GPSSimulator as the Project Name. 4. Select Google APIs (Platform 1.5) as the Build Target. 5. Enter GPSSimulator as the Application name. 6. Enter com.android.gpssimulator as the Package name. 7. Enter GPSSimulator as the Activity name. 8. Click Finish.

Create the Android Project

The New Android Project

You might also like