Upload
aswapnal
View
326
Download
1
Tags:
Embed Size (px)
Citation preview
Swapnal AgarwalSwapnal AgarwalVipul Kishor BhattVipul Kishor Bhatt
1. Introduction1. Introduction
2. Platform2. Platform
3. Software development3. Software development
4. Dalvik VM4. Dalvik VM
5. Components & API5. Components & API
6. Building Blocks6. Building Blocks
7. Layouts7. Layouts
IntroductionIntroductionWhat is Android?What is Android?
• A software platform and operating system for mobile devices
• Based on the Linux kernel
• Developed by Google and later the Open Handset Alliance (OHA)
• Allows writing managed code in the Java language
• Android platform was announced on 5th November 2007 with the founding of OHA
What is the Open Handset Alliance (OHA)? What is the Open Handset Alliance (OHA)?
• OHA is an alliance of nearly 50 organizations devoted to advancing open standards for mobile devices
• Develop technologies that will significantly lower the cost of developing and distributing mobile devices and services
What’s the Target?What’s the Target?
• Write apps to run on mobile phones• Will be released as open source http://code.google.com/android
AndroidAndroidAn Open Handset Alliance An Open Handset Alliance ProjectProject
PlatformPlatform
Operating System(s) Operating System(s) • Android uses Linux for its device drivers, memory
management, process management, and networking.
• The next level up contains the Android native
libraries. They are all written in C/C++ internally, but you’ll be calling them through Java interfaces. In this layer you can find the Surface Manager, 2D and 3D graphics, Media codecs, the SQL database (SQLite), and a native web browser engine (WebKit).
C/C++C/C++
Native Libraries
Surface ManagerSQLite
Media CodecsWebkit
Native Libraries
Surface ManagerSQLite
Media CodecsWebkit
Call through Java InterfaceCall through Java Interface
PlatformPlatform
• Dalvik Virtual Machine. Dalvik runs .dex files, which are converted at compile time from standard class and jar files.
• The Dalvik runtime is highly optimized:
Run multiple VMs efficiently
Each app has its own VM
Minimal memory footprint
• Android applications are compiled to Dalvik bytecode.
layout .xmllayout .xml
R.javaR.java
*.java*.java
*.class*.class *dex.*dex.
android- manifest.xmlandroid- manifest.xml
application.apk file
Software DevelopmentSoftware DevelopmentIDE and ToolsIDE and Tools
Android SDK Android SDK • Class Library• Developer Tools
dx – Dalvik Cross-Assembler aapt – Android Asset Packaging Tool adb – Android Debug Bridge ddms – Dalvik Debug Monitor Service
• Emulator and System Images • Documentation and Sample Code
Eclipse IDE + ADT (Android Development Eclipse IDE + ADT (Android Development Tools) Tools) • Reduces Development and Testing Time• Makes User Interface-Creation easier• Makes Application Description Easier
Components Components
Android APIsAndroid APIs
Android-specific Android-specific packages are easy to identify because they start with android inthe package name. Some of the more important packages are:
android.app—Android application model accessandroid.bluetooth—Android’s Bluetooth functionalityandroid.content—Accessing and publishing data in Androidandroid.net—Contains the Uri class, used for accessing contentandroid.gesture—Create, recognize, load, and save gesturesandroid.graphics—Graphics primitivesandroid.location—Location-based services (such as GPS)android.opengl—OpenGL classesandroid.os—System-level access to the Android environmentandroid.provider—ContentProvider-related classesandroid.telephony—Telephony capability access, including support for both Code Division Multiple Access (CDMA) and Global System for Mobile communication (GSM) devicesandroid.text—Text layoutandroid.util—Collection of utilities for logging and text manipulation, including XMLandroid.view—UI elementsandroid.webkit—Browser functionalityandroid.widget—More UI elements
Android APIsAndroid APIs
Java packages included in the Android SDK:Java packages included in the Android SDK:
java.lang—Core Java language classesjava.io—Input/output capabilitiesjava.net—Network connectionsjava.text—Text-handling utilitiesjava.math—Math and number-manipulation classesjavax.net—Network classesjavax.security—Security-related classesjavax.xml—DOM-based XML classesorg.apache.*—HTTP-related classesorg.xml—SAX-based XML classes
ActivitiesActivities
ViewsViews
IntentsIntents
ServicesServices
NotificationsNotifications
Content ProviderContent Provider
Android Manifest.xmlAndroid Manifest.xml
Android Building BlocksAndroid Building Blocks
Android Building Android Building BlocksBlocks
Activity:It represents a
visible application component within
Android
Views: UI
elements
Intents:An Intent in Android describes what you
want to do.
Services
Content Provider: It helps data sharing
between different Android Applications or between
different Activities.
Notification
LayoutsLayouts• Different Layouts :-Different Layouts :-
Linear Layout Relative Layout Table Layout Frame Layout Absolute Layout
(Deprecated)
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/job_search_layout" android:layout_width="fill_parent" android:layout_height="wrap_content"
<ListView android:layout_width="wrap_content“ android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView android:id="@+id/geo_location“ android:src="@drawable/geo_location" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout android:id="@+id/location_selection_layout“ android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView android:id="@+id/recent_search_header_count”> android:layout_width="wrap_content"
android:layout_height="wrap_content" /> </LinearLayout></RelativeLayout>
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/job_search_layout" android:layout_width="fill_parent" android:layout_height="wrap_content"
<ListView android:layout_width="wrap_content“ android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView android:id="@+id/geo_location“ android:src="@drawable/geo_location" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout android:id="@+id/location_selection_layout“ android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView android:id="@+id/recent_search_header_count”> android:layout_width="wrap_content"
android:layout_height="wrap_content" /> </LinearLayout></RelativeLayout>
Activity Life CycleActivity Life Cycle
ThanksThanks