7/27/2019 1 Android PPT
1/33
Android Application Development
7/27/2019 1 Android PPT
2/33
Symbian(.sis) By NokiaiOS(.app) in Apples iPhoneRIM's BlackBerry(.cod)Windows mobile(.cab) by MicrosoftAndroid(.apk) by GoogleJ2ME(.jar)
MOBILE OS
7/27/2019 1 Android PPT
3/33
WHAT IS ANDROID ? A software stack for handheld devices (like mobile, Tabletcomputers) that includes an operating system, middleware and keyapplications based on the Linux kernel.
Developed by the OPEN HANDSET ALLIANCE(OHA) leadby Google in Aug 17, 2005.
2007 Nov 12: Android SDK released by OHA (a consortium of 86hardware, software, and telecommunication companies like:Google, HTC, Intel, Motorola, T-Mobile etc)
Java programming/Native programming.
7/27/2019 1 Android PPT
4/33
WHY ANDROID ?A simple and powerful SDK
No licensing, distribution, or development fees
Development over many platform Linux, Mac OS,windows etc.
Thriving developer community
7/27/2019 1 Android PPT
5/33
ANDROID FEATURESGSM, EDGE, and 4G networks, WiFi, Bluetooth APISupport for Bluetooth, WiFi Ad hoc mode.
Hardware control: Accelerometer, digital compass,microphone, camera, GPS (Best-Google Maps),tracks auser movement as he/she changes his/her location.
7/27/2019 1 Android PPT
6/33
Mash up CapabilityIt combines two or more service to create anapplication.Eg . Barcode Scanner: ZXing Teams free BarcodeScanner app.1) GPS + Camera. 2) 2D(SGL)+3D(Open GL/ES)
3) Text Editor + Camera.ranked 4.5 out of 5 stars based on the reviews of
over 100,000 users.
7/27/2019 1 Android PPT
7/33
Architectureof Android.
7/27/2019 1 Android PPT
8/33
7/27/2019 1 Android PPT
9/33
Linux 2.6 kernel (designed in C)Security model: Itshandles security between theapplication and the system.Memory management: Its handles memorymanagement for you, leaving you free to develop yourapp with the help ofProcess Management.Network stack: Its handles network communication.
7/27/2019 1 Android PPT
10/33
Android Libraries (in C & C++)The Android run time: The Android run time is composedof Java core libraries( Collection classes, utilities, io etc)and the Dalvik Virtual Machine, runs dex file (enhancedbyte code).DVM is memory efficient, & multiple instancesof it can run on the device at the same time.Surface Manager: Manage difference windows for differentapplicationsMedia frameworks: These libraries allow you to play andrecord audio and video.SQLite: Embedded relational light weighted database.
(Core Lib in Java)
7/27/2019 1 Android PPT
11/33
OpenGL|ES: 3D image engine.SGL: 2d image graphics.In the same application we can use both 2D & 3DFreeType: Bitmap and VectorWebKit: This open-source Web browser engineprovides the functionality to display Web contentand simplify page loading. Secure Sockets Layer (SSL): These libraries areresponsible for Internet security.
Libc: c standard lib.
7/27/2019 1 Android PPT
12/33
Application framework (written in Java)The application framework provides the classesused to create any Android applications.
Activity manager: Manages the activity life cycle.Package Manager: keeps track of installedapplications.
7/27/2019 1 Android PPT
13/33
Content provider: Framework to allow the sharing of dataamong applications. Eg. Phone nos, names etc are allowed tobe used by sms application.
Window manager: manages windowTelephony manager :contains api that we use to build thephone 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.
7/27/2019 1 Android PPT
14/33
Location Manager
7/27/2019 1 Android PPT
15/33
Installing and Configuring Your SupportToolsJava JDK: Lays the foundation for the Android SDK.
Android SDK: Provides access to Android librariesand allows you to develop your application.
7/27/2019 1 Android PPT
16/33
Eclipse IDE (integrated developmentenvironment): Brings together Java, theAndroid SDK, and the Android ADT (AndroidDevelopment Tools), and provides tools foryou to write your Android programs
7/27/2019 1 Android PPT
17/33
Eclipse IDE + ADT (Android DevelopmentTools) 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)
7/27/2019 1 Android PPT
18/33
Steps to Create an Android ProjectInstall jdk
Android SDK in your system.Install Android Development Tools (ADT) plugin
inside eclipse.Provide Android-SDK path in window->preferencesin eclipse.
From File menu, Select New->Project->AndroidProject.Specify the package name.Select the version of android.Click on finish.The project will be displayed in eclipse.
7/27/2019 1 Android PPT
19/33
7/27/2019 1 Android PPT
20/33
7/27/2019 1 Android PPT
21/33
7/27/2019 1 Android PPT
22/33
https://dl-ssl.google.com/android/eclipse
7/27/2019 1 Android PPT
23/33
7/27/2019 1 Android PPT
24/33
7/27/2019 1 Android PPT
25/33
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
7/27/2019 1 Android PPT
26/33
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.*
7/27/2019 1 Android PPT
27/33
Java Code
Initialize
@Override
public void onCreate(Bundle icicle){
super.onCreate(icicle);setContentView(R.layout.screen);
}
7/27/2019 1 Android PPT
28/33
Android with javaava Application
7/27/2019 1 Android PPT
29/33
DVMVM More Battery Consumption More Memory consumption Stack based VM
Efficient on single instanceof JVM
OS takes care of taskpriorities.
Less Battery Consumption Lesser memory consumption Register based VM(faster)
More efficient when runningmultiple instances of the DVM.
Phone functionality is priority #1
7/27/2019 1 Android PPT
30/33
A Detailed Look at the Build Process
7/27/2019 1 Android PPT
31/33
Explanation: The Android Asset Packaging Tool (aapt) takes your applicationresource files, such as the AndroidMainfest.xml file and the XMLfiles for your Activities, and compiles them. An R.java is also produced so you can reference your resourcesfrom 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 3rdparty libraries and .class files that you have included in yourproject are also converted into .dex files so that they can be
packaged into the final .apk file.
7/27/2019 1 Android PPT
32/33
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 keybefore 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 isrunning on a device.
7/27/2019 1 Android PPT
33/33
THANK YOUAny Queries????