You are on page 1of 25

Android

Agenda:1.

What is Android?

2.

Introducing to Open Handset Alliance.

3.

Understanding android Framework.

4.

What is Dalvik Virtual Machine?

5.

Different version of android OS.

6.

Prominent instruments of android environment.

7.

Android environment programming.

8.

How android manages memory.

9.

Application Development Tool.

What Is Android ?
A software platform and
operating system for mobile
devices

Applications in Android..
1.

Whats App..

2.

Facebook..

3.

We-Chat..

4.

Mx-Player..

5.

Line ..

6.

Times-Of-India..

U can also create ur customized App

What is OHA ?

A BUSINESS ALLIANCE
CONSISTING OF 47
COMPANIES TO DEVELOP
OPEN STANDARDS FOR
MOBILE DEVICES

Framework..

Android 1.5
Cup cake

Android 2.2
Foroyo

Android 1.6
Donut

Android 2.3
Gingerbread

Android 2.1
Eclairs

Android 2.3
Ice-Creame
Sandwich

Setting up
Android
Application
Development

INSTALL
ECLIPSE
INSTALL
ANDROID SDK
(ANDROID
LIBRARIES)
INSTALL ADT
PLUGIN
(ANDROID
DEVELOPMENT
TOOLS)

Programming

Android Applications are written in Java


package com.google.android.helloactivity;
import android.app.Activity;
import android.os.Bundle;
public class HelloActivity extends Activity
{
public void onCreate(Bundle savedinstantstate)
{
super.onCreate(savedinstantstate);
setContentView(R.layout.hello_activity);
}
}

Memory Management
Function..

.java

.class

.dex
Dalvik Virtual
Machine

Before execution, Android


applications are converted into
the compact Dalvik Executable
(.dex) format, which is designed
to be suitable for systems that
are constrained in terms of
memory and processor speed.

Application
Development Tools
Activity
IntentReceiver
Service
ContentProvider

Activity..
Represents the
presentation layer
of an Android
application, e.g. a
screen which the
user sees.

Intent..
Activity 1

These

are
message
passing
mechanism

Activity 2

Services

Faceless components that run


in the background
E.g. music player, network
download etc

Content Provider

Enables sharing of data across


applications
E.g. address book, photo gallery

Working with Eclipse..

Project

Explorer window

Android
version

Directory
name

Java package
Name that appears
on device

Class to
automatically
create

Auto-generated
code

String
constants
UI
layout
Configuration

Hello, Android Applications

HelloWorld.java
1

public class HelloAndroid extends Activity {

/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState)

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

8
9

}
}

Main.xml
<?xml version="1.0" encoding="utf-8"?>
2

<LinearLayout

xmlns:android="http://schemas.android.com/apk/res/android"

android:orientation="vertical"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

7
8
9

>
<TextView
android:layout_width="fill_parent"

10

android:layout_height="wrap_content"

11

android:text="@string/hello "

12

/>

13 </LinearLayout>

Strings.xml
<?xml version="1.0" encoding="utf-8"?>
2

<resources>

<string name="hello">Hello World, Hello


Android!

4
5
6

</string>
<string name="app_name">Hello,
Android</string>
</resources>

AndroidManifest.xml

Final Developed Application:-

Thank You

You might also like