Você está na página 1de 34

Android Application Development

Symbian(.sis) By Nokia
iOS(.ipk) in Apples iPhone
RIM's BlackBerry(.cod)
Windows mobile(.cab) by Microsoft
Android(.apk) by Google
J2ME(.jar) by Oracle Inc
MOBILE OS:-
WHAT IS ANDROID ?
A software stack for handheld devices (like mobile, Tablet
computers) that includes an operating system, middleware and key
applications based on the Linux kernel.

Developed by the OPEN HANDSET ALLIANCE(OHA) lead
by Google in Aug 17, 2005.

2007 Nov 12: Android SDK released by OHA (a consortium of 86
hardware, software, and telecommunication companies like:
Google, Samsung, MTS, HTC, Intel, Motorola, T-Mobile etc)

Java programming/Native programming.







WHY ANDROID ?

A simple, secure and powerful SDK

No licensing, distribution, or development fees

Development over many platform Linux, Mac OS,
windows etc.

Thriving developer community
ANDROID FEATURES

GSM, EDGE, and 4G networks, WiFi, Bluetooth API
Support for Bluetooth, WiFi Ad hoc mode.

Hardware control: Accelerometer, digital compass,
microphone, camera, GPS (Best-Google Maps), tracks a
user movement as he/she changes his/her location.


Mash up Capability
It combines two or more service to create an
application.
Eg . Barcode Scanner: ZXing Teams free Barcode
Scanner app.
1) 2D(SGL)+3D(Open GL/ES)
2) Text Editor + Camera (to get the text from
image).





Linux 2.6 kernel (designed in C)
Security : Its handles security between the application
and the system.

Memory management: Its handles memory
management for you, leaving you free to develop your
app with the help of Process Management.

Network stack: Its handles network communication
(Inter Process Communication).

Android Libraries (in C & C++)
The Android run time: designed to meet the need of
running in embedded environment (limited
battery/memory/processor) & is composed of Java core
libraries( Collection classes, utilities, io etc) and DVM, runs
dex file (enhanced byte code).DVM is memory efficient, &
multiple instances of it can run on the device at the same
time.
Surface Manager: Manage difference windows for different
applications
Media frameworks: These libraries allow you to play and
record audio and video.
SQLite: Embedded relational light weighted database.

Core Lib (in Java)

OpenGL|ES: 3D image engine.
SGL: 2d image graphics.
In the same application we can use both 2D & 3D
FreeType: Bitmap and Vector
WebKit: This open-source Web browser engine
provides the functionality to display Web content
and simplify page loading.
Secure Sockets Layer (SSL): These libraries are
responsible for Internet security.
Libc: c standard lib.

Application framework (written in Java)
The application framework provides the classes
used to create any Android applications.

Activity manager: Manages the activity life cycle.

Package Manager: keeps track of installed
applications.





Content provider: Framework to allow the sharing of data
among applications. Eg. Phone nos, names etc are allowed to
be used by sms application.

Window manager: manages window

Telephony manager :contains api that we use to build the
phone application thats central to the phone experience.

Resource Manager: to store localized string, bitmaps, &
external parts used to create applications . Ex. Images,
audio/video etc.
Location Manager
Installing and Configuring Your Support
Tools

Java JDK: Lays the foundation for the Android SDK.


Android SDK: Provides access to Android libraries
and allows you to develop your application.


Eclipse IDE (integrated development
environment): Brings together Java, the
Android SDK, and the Android ADT (Android
Development Tools) plug-ins, and provides
tools for you to write your Android
programs
Eclipse IDE + ADT (Android Development
Tools) plugin (or NetBeans + NBAndroid P-in)
Reduces Development and Testing Time.
Makes User Interface-Creation easier.
Makes Application Description Easier.


Programming Language(s)
Java officially supported.(JDK)
C/C++ also possible but tedious &
inefficient.(Native Dev Kit)
Steps to Create an Android Project
Install jdkAndroid SDK in your system.
Install Android Development Tools (ADT) plugin
inside eclipse.
Provide Android-SDK path in window->preferences
in eclipse.
From File menu, Select New->Project->Android
Project.
Specify the package name.
Select the version of android.
Click on finish.
The project will be displayed in eclipse.

https://dl-ssl.google.com/android/eclipse
J2SE java.util.*
java.io.*
java.lang.*
etc
UI android.widget.*
android.view.*
android.graphics.*
Telephony android.telephony.IPhone
SMS android.telephony.gsm.SmsManager
Web android.webkit.WebView
Application APIs
Application APIs
Camera android.hardware.CameraDevice
Local database android.database.*
Maps com.google.android.maps.MapView
Location android.location.LocationManager
Multimedia android.media.MediaPlayer
HTTP org.apache.http.client.*
Java Code
Initialize
@Override
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
setContentView(R.layout.screen);
}
Android with java
Java Application
DVM
JVM
More Battery Consumption
More Memory consumption
Stack based VM
Efficient on single instance
of JVM
OS takes care of task
priorities.

Less Battery Consumption
Lesser memory consumption
Register based VM(faster)
More efficient when running
multiple instances of the DVM.
Phone functionality is priority #1
A Detailed Look at the Build Process


Explanation:
The Android Asset Packaging Tool (aapt) takes your application
resource files, such as the AndroidManifest.xml file and the XML files
for your Activities, and compiles them.
An R.java is also produced so you can reference your resources from
your Java code.
The aidl tool converts any .aidl interfaces that you have into Java
interfaces.
All of your Java codes are compiled by the Java compiler and .class
files are output.
The dex tool converts the .class files to Dalvik byte code. Any 3rd
party libraries and .class files that you have included in your project
are also converted into .dex files so that they can be packaged into
the final .apk file.

All non-compiled resources (such as images), compiled resources, and the
.dex files are sent to the apkbuilder tool to be packaged into an .apk file.

Once the .apk is built, it must be signed with either a debug or release key
before it can be installed to a device.

Finally, if the application is being signed in release mode, you must align
the .apk with the zipalign tool.

Aligning the final .apk decreases memory usage when the application is
running on a device.
Android resources
http://code.google.com/android/

http://android-developers.blogspot.com

http://code.google.com/p/apps-for-android/

http://sites.google.com/site/io/

http://developer.android.com

http://source.android.com/

THANK YOU

Você também pode gostar