18
Android

Android

Embed Size (px)

DESCRIPTION

Android

Citation preview

Android

What is Android?

Android is a open source and linux based operating system.

It’s seen primary in tablets and smart phones.

Based on a Linux kernel. Applications are Java Based

Developed by the open handset Alliance, led by Google & other companies.

Features Of Android

Beautiful UI.

Connectivity.

Storage.

Media Support.

Multi tasking.

Multi touch.

Resizable widgets.

Web browser.

Environment Setup Need either of the following operating system:

Microsoft windows XP or later version. Mac OS X 10.5.8 or later version. Linux Following is list of software , we need for Android

Application programming:

JDK5 or JDK6 Android SDK Eclipse ADT Plug-in

Android Architecture

Linux kernel:

It’s the bottom layer. This provides basic functionality like process management, memory management, device management like camera, keypad, display etc.

Libraries:

On top of Linux kernel there is a set of libraries including open-source Web browser engine WebKit, well known library libc, SQLite database which is a useful repository for storage and sharing of application data, libraries to play and record audio and video, SSL libraries responsible for Internet security etc.

Application Framework:

The Application Framework layer provides many higher-level services to applications in the form of Java classes. Application developers are allowed to make use of these services in their applications. .

Applications:

We will find all the Android application at the top layer. We will write the application to be installed on this layer only. Examples of such applications are Contacts Books, Browser, Games etc.

Application Components

Activities. Services. Broadcast Receivers. Content providers.

Activities : Dictate the UI and handle the user

interaction to the Smartphone screen Services: Handle background processing associated

with an application. Broadcast Receivers : Handle communication

between Android OS and applications. Content Providers : Handle data and database

management issues.

Creating a Project

Need

the

items

circled

Then

click

Finish

Project Components

src – your source code gen – auto-generated code (usually just R.java) Included libraries Resources Drawables

Layouts

Values (like strings)

Manifest file

XML

Used to define some of the resources: Layouts (UI),Strings

Manifest file Shouldn’t usually have to edit it directly,

Eclipse can do that. Preferred way of creating UIs.Separates

the description of the layout from any actual code that controls it.Can easily take a UI from one platform to another

R Class

Auto-generated: We shouldn’t edit it Contains IDs of the project resources Enforces good software engineering Use findViewById and Resources object to

get access to the resources Ex. Button b = (Button)findViewById(R.id.button1)

Ex. getResources().getString(R.string.hello));

Layouts

Eclipse has a great UI creator. It generates the XML.

Composed of View objects Can be specified for portrait and

landscape mode Use same file name, so can make completely different UIs for the

orientations without modifying any code

Google fees

To sell an application, one must have a Google Checkout account.

Google charges 20 dollars for the account. Google also charges 3% to withdraw your profits. This is in addition to the 30% cut for selling an app.

In the end, Google consumes 33% of your sale price.

Android Market Share is growing

http://arstechnica.com/gadgets/news/2011/01/android-beats-nokia-apple-rim-in-2010-but-firm-warns-about-2011.ars

Issues with Android Development

The strength of Google Android platform is its flexibility. Anyone can put their version of Android. This is a pain for developers.

Random amount of RAM, different CPUs, screen sized and manufacture changes to the phone make it almost impossible to make completely compatible applications.