android tsm

26
twincling.org August 8th, 2009 Hyderabad, India Mobile Application Development

Upload: arafath-cherukuri

Post on 30-May-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 1/26

twincling.org

August 8th, 2009Hyderabad, India

Mobile Application Development

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 2/26

twincling.org

We appreciate

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 3/26

twincling.org

Outline

● Hello Android World

●  Android Architecture

●  Android SDK Overview

● UI Development

● 3D with OpenGL

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 4/26

twincling.org

What is Android?

 An Open Platform for Mobile Development

●  A hardware reference design for mobiles

●  A Linux operating system kernel

● Open source libraries

●  A run time environment

●  An application framework and UI framework

Some pre-installed applications and

● Software Development Kit

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 5/26

twincling.org

 Android SDK ●

No licensing, distribution, or development fees● Hardware access like network, Camera, accelerometer

● GSM, EDGE, and 3G networks

● GPS with location-based services

● Full multimedia hardware control including playback and recording using the

camera and microphone●  Accelerometer and compass hardware

● IPC message passing

● Shared data stores

●  An integrated open source WebKit-based browser

●  Applications that integrate Map controls as part of their user interface

● Peer-to-peer (P2P) support using Google Talk

● Mobile-optimized hardware-accelerated graphics, both 2D and 3D

● Optimized memory and process management

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 6/26

twincling.org

Software Stack

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 7/26

twincling.org

 Android Application

●  Activity Manager

●  Views

● Notification Manager

Content Providers

● Resource Manager

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 8/26

twincling.org

 Android Libraries●

android.util – string formatters, XML

● android.os – message passing, IPC, clock, debugging

● android.graphics – canvas, colors, primitives

● android.text – display, parse text

android.database – cursors, database● android.content – data access, content providers

● android.view – user interface

● android.widget – buttons, text boxes, list boxes etc

● com.google.android.maps – Google Maps

● android.app – Application, Activity and Services

● android.provider – standard content provider like Contacts

● android.telephony – phone stack

● android.webkit – Web-based content

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 9/26

twincling.org

 Android Advanced Libraries

● android.location – Location access

● android.media – Audio and Video

● android.opengl – OpenGL ES API for 3D

android.hardware – Camera, Accelerometer, Compass

● android.bluetooth - Bluetooth

● android.net.wifi - WiFi

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 10/26

twincling.org

SDK includes..

●  Android APIs

●  Android project development tools

●  Android executable(.dex ) and packaging(.apk) tools

 Android Emulator

● Dalvik Debug Monitoring Service (DDMS)

● Documentation and Sample Code

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 11/26

twincling.org

SDK Setup

● http://code.google.com/android/download.html

●  Android pluging available for Eclipse, Netbeans and

IntelliJ with JDK 5 or later

 Android Development Toolkit (ADT) pluginhttps://dl-ssl.google.com/android/eclipse/

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 12/26

twincling.org

Types of Android apps

● Foreground Activity

● Background Service

● Intermittent Activity

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 13/26

twincling.org

Component of an application

●  Activities

● Services

● Content Providers

Intents

● Broadcast Receivers

● Notifications

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 14/26

twincling.org

Process States and Priority

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 15/26

twincling.org

 Activity Stack

i li

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 16/26

twincling.org

 Activity States

 Active

● Paused

● Stopped

Inactive

t i li

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 17/26

twincling.org

State Changes

t i li

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 18/26

twincling.org

In code.

package org.twincling.hello;

import android.app.Activity;import android.os.Bundle;

public class HelloWorld extends Activity {/** Called when the activity is first created. */// Called at the start of the full lifetime.@Overridepublic void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);// Initialize activity.setContentView(R.layout.main );

}

// Called after onCreate has finished, use to restore UI state@Overridepublic void onRestoreInstanceState(Bundle savedInstanceState) {

super.onRestoreInstanceState(savedInstanceState);// Restore UI state from the savedInstanceState.// This bundle has also been passed to onCreate.

}

twincling org

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 19/26

twincling.org

//Called before subsequent visible lifetimes//for an activity process.@Overridepublic void onRestart(){

super.onRestart();//Load changes knowing that the activity has already//been visible within this process.

}

//Called at the start of the visible lifetime.@Overridepublic void onStart(){

super.onStart();//Apply any required UI change now that the Activity is visible.

}//Called at the start of the active lifetime.@Overridepublic void onResume(){

super.onResume();

//Resume any paused UI updates, threads, or processes required//by the activity but suspended when it was inactive.

}//Called to save UI state changes at the//end of the active lifecycle.@Override

twincling org

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 20/26

twincling.org

//Called to save UI state changes at the//end of the active lifecycle.@Overridepublic void onSaveInstanceState(Bundle savedInstanceState) {

//Save UI state changes to the savedInstanceState.// This bundle will be passed to onCreate if the process is// killed and restarted.super.onSaveInstanceState(savedInstanceState);

}// Called at the end of the active lifetime.

@Overridepublic void onPause(){// Suspend UI updates, threads, or CPU intensive processes// that don’t need to be updated when the Activity isn’t// the active foreground activity.super.onPause();

}

twincling org

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 21/26

twincling.org

// Called at the end of the visible lifetime.@Overridepublic void onStop(){

// Suspend remaining UI updates, threads, or processing// that aren’t required when the Activity isn’t visible.// Persist all edits or state changes// as after this call the process is likely to be killed.super.onStop();

}// Called at the end of the full lifetime.

@Overridepublic void onDestroy(){// Clean up any resources including ending threads,// closing database connections etc.super.onDestroy();

}}

twincling org

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 22/26

twincling.org

Summary / Take home

 Android overview● Get started on mobile app development

twincling.org

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 23/26

twincling.org

Resources

 Android

http://developer.android.com/

twincling.org

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 24/26

twincling.org

Books

twincling.org

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 25/26

c g o g

 AppLabs Pvt. Ltd.

http://www.applabs.com/

Special thanks

twincling.org

8/14/2019 Android Tsm

http://slidepdf.com/reader/full/android-tsm 26/26

g g

freedom of   innovation5,000+ members

TSM (2nd Sat)BoF HackathonWorkshops

95+ college sessionsand workshops

Industry – Studentinteraction

7-member

board of directors

Largest independentsociety in A.P.twincling.org

[email protected]

Hyderabad, A. P.India