0% found this document useful (0 votes)
158 views

Android Application Development: Umang Kejriwal

Android is an open source operating system based on Linux. It was developed by Android Inc. and later acquired by Google. Android allows developers to build applications using Java and distribute them through Google Play. The core application building blocks in Android are activities, services, content providers, and broadcast receivers. Activities display user interface screens, services perform background tasks, content providers manage shared data, and broadcast receivers respond to system-wide notifications.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views

Android Application Development: Umang Kejriwal

Android is an open source operating system based on Linux. It was developed by Android Inc. and later acquired by Google. Android allows developers to build applications using Java and distribute them through Google Play. The core application building blocks in Android are activities, services, content providers, and broadcast receivers. Activities display user interface screens, services perform background tasks, content providers manage shared data, and broadcast receivers respond to system-wide notifications.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Android Application

Development
Umang Kejriwal
[email protected]
What is Android..??
 Android is a open source operating system based on Linux Kernel.
 It is designed primarily for touch screen mobile devices such as smart
phones and tablet computers.
 It was initially developed by Android Inc. and later on it was purchased by
Google on 17th Aug,2005 in conjunction with the Open Handset Alliance(a
group of 84 hardware, software and telecommunication companies like
HTC, Intel etc.)
 It was officially unveiled in 2007.
 Fast application development in Java
Android Evolution
Other Mobile OS
 iOS by Apple
 Windows by Microsoft
 Blackberry by RIM
 Java by Oracle
 Symbian by Nokia
 and many more………
iOS vs Android…Which is Better??
iOS
 Positive Points….
 Secure integration of software and hardware.
 Fewer hardware and software configuration required.
 Apple actively checks for app quality.

 Negative Points...
 Mac-only development environment.
 Apple may reject applications.
Why only Android..??
 Positive Points….
 The one big reason for choosing Android Application development is
the low level investment is needed to get started.
 The SDK and all associated development tools are free.
 The number of game engines are free.
All you really need is a Computer and Brain !!
 Negative Points...
 Make money less than on iOS.
 Many more hardware and software configuration to be worried about.
 Absence of screening process that causes
 More Spams
 Lower Quality apps and games
Application Building Blocks
Intent
Activity Services

Broadcast Content
Reciever Provider
Activity-Typically A Screen

Login Activity News Feed


Activity
Activity Lifecycle
Activity Lifecycle
1) Starting State:
When an activity does not yet exist in memory, it is in the starting state.
2) Resumed/Running State:
An activity that is in the foreground is in the running state. Any activity that is currently on the screen
and interacting with the user is the running activity at that particular point in time. It exists at the top of
the Activity stack.
3) Paused State:
When an activity is not in focus (i.e. not interacting with the user), but is still visible on the screen, it is
in the Paused state.
4) Stopped State:
An activity that is not visible on the screen, but exists in the memory is in the Stopped State.
5) Destroyed State:
A Destroyed activity results from the removal of an activity (that is no longer required) from the
memory. Such removals generally occur, when the activity manager decides that there is no use for such
activities anymore.
Activity Methods
 OnCreate()
 OnStart()
 OnResume()

 OnPause()
 OnStop()
 OnDestroy()
 OnRestart()
Intent-Switching Between Activities

Login Activity News Feed


Activity
Services-Background Jobs

 Faceless components running in


background.
E.g.- Network Download, Notifications and
friend requests in Facebook etc…

Service Lifecycle
Content Providers
 Enables sharing of data across
applications.
E.g.- Address book, photo gallery

 Provide uniform API’s for:


1) Querying
2) Delete
3) Update
4) Insert
Broadcast Receiver-Dormant Observer

Registers for Intent to observe

Android Broadcast
System Receiver

Get Notification when Intent Occurs


Android Architecture
How to Develop Apps
 We require following things…
 Java JDK
 Eclipse IDE
 Android SDK
Eclipse IDE

Java Android
Coding Eclipse IDE App

XML Coding
Installation

Eclipse Installation
And
Android SDK Configure
Installation

Double-click the shortcut that you just created to run Eclipse


Installation
Set your workspace.
Installation
 Choose Window 
Preferences in Eclipse

 Select Android in the left


pane
.
 Give the path of the
Android SDK in SDK
Location box

 Click Apply then OK.


Installation

Click On
Android Virtual
Device Manager
Installation
Click the New button.
Installation
 For this AVD, in the Name field, type any
Name say 2_2_Default_HVGA

 In the Target box, select Android 2.2 — API


Level 8.

 In the SD Card section, leave the fields blank.

 Leave the Skin option set to Default (HVGA).

 Don’t select any new features in the Hardware


section.

 Click the Create AVD button.


Installation
Select the new AVD and
Click on Start
Installation
PORT No.

AVD NAME

Emulator
Installation
Default_HVGA emulator.
Installation
Click and drag to the
right side of the
screen to
Unlock the Emulator
Project Structure
Project Structure
 src - Directory for your app's main source files. By default, it includes
an Activity class that runs when your app is launched using the app icon.

 gen - It contains auto generated code like R.java

 res - It contains several sub directories for app resources -

 drawable-hdpi/ldpi/mdpi --Directory for drawable objects (such as


bitmaps) that are designed for high-density (hdpi) ,low-density (ldpi)
and medium-density (mdpi) screens. 
Project Structure
 Layout - Directory for files that define your app's user interface.

 Values - Directory for other various XML files that contain a collection
of resources, such as string definitions.

 Manifest file - The manifest file describes the fundamental characteristics of


the app and defines each of its components. 
Thank U !!

You might also like