Sie sind auf Seite 1von 43

Prepared By: Nikul Gediya Savan Patel Harsh Pandya Parth Mehta Rajesh Sailot

Sri Chimanbhai Patel Institute of Management & Research


1

1. 2. 3. 4. 5.

Introduction Platform IDE and Tools Applications Development Walkthrough Overall evaluation

Sri Chimanbhai Patel Institute of Management & Research 2

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 Possibility to write applications in other languages and compiling it to ARM native code (support of Google? No) Unveiling of the Android platform was announced on 5 November 2007 with the founding of OHA

Sri Chimanbhai Patel Institute of Management & Research


3

1.2 What is the Open Handset Alliance (OHA)?


It's a consortium of several companies

Sri Chimanbhai Patel Institute of Management & Research


4

Devoted to advancing open standards for mobile devices Develop technologies that will significantly lower the cost of developing and distributing mobile devices and services

Sri Chimanbhai Patel Institute of Management & Research

Android is under version 2 of the Apache Software License (ASL)

Developer License & Device Costs For developing on Android Device, you must first register as an Android developer on the Android Market site. Android Developer Registration fee is $25 (USD).

No other licensing cost associated with software as Android is Open Source product. Available Devices
Consumer devices Android Dev Phone 1: The device currently costs $399 (USD) and is available for purchase in 18 international markets.

Ref: http://developer.android.com/guide/developing/device.html#dev-phone-1 Management & Research

Sri Chimanbhai Patel Institute of

Hardware Operating System (Android) Architecture File System Database Support Network Connectivity Security and Permissions Programming Languages support Development requirements

Sri Chimanbhai Patel Institute of Management & Research

Android is not a single piece of hardware; it's a complete, end-to-end software platform that can be adapted to work on any number of hardware configurations. Everything is there, from the boot loader to all the way up to the applications.

Sri Chimanbhai Patel Institute of Management & Research

Ref: http://developer.android.com/guide/basics/what-is-android.html Management & Research

Sri Chimanbhai Patel Institute of

Android runs on Linux (version 2.6). Linux provides :


Hardware abstraction layer Memory management Process management Networking

Users never see Linux sub system The adb shell command opens Linux shell

Sri Chimanbhai Patel Institute of Management & Research

10

Bionic, a super fast and small GPL-based standard C system library (libc) optimized for embedded Linux-based devices Surface Manager for composing window manager with off-screen buffering 2D and 3D graphics hardware support or software simulation Media codecs offer support for major audio/video codecs SQLite database WebKit library for fast HTML rendering
Sri Chimanbhai Patel Institute of Management & Research 11

Dalvik :

Dalvik VM is Googles implementation of Java Optimized for mobile devices Key Dalvik differences:
Register-based versus stack-based VM Dalvik runs .dex files More efficient and compact implementation Different set of Java libraries than SDK

Sri Chimanbhai Patel Institute of Management & Research

12

Activity manager controls the life cycle of the app

Content providers encapsulate data that is shared (e.g. contacts)


Resource manager manages everything that is not the code

Location manager figures out the location of the phone (GPS, GSM, WiFi)
Notification manager keeps track of events such as arriving messages, appointments etc.
Sri Chimanbhai Patel Institute of Management & Research 13

The file system has three main mount points.


One for system, one for the apps, and one for whatever.

Each app has its own sandbox easily accessible to it. No one else can access its data. The sandbox is in /data/data/package_name/

SDCard is always there. Its a good place for large files, such as movies and music. Everyone can access it.

Sri Chimanbhai Patel Institute of Management & Research

14

The Android API contains support for creating and using SQLite databases. Each database is private to the application that creates it. Android ships with the sqlite3 database tool, which enables you to browse table contents, run SQL commands, and perform other useful functions on SQLite databases. All databases, SQLite and others, are stored on the device in /data/data/package_name/databases.

Sri Chimanbhai Patel Institute of Management & Research

15

Android supports wireless communications using:


GSM mobile-phone technology 3G Edge 802.11 Wi-Fi networks BlueTooth

HTTP : Android has org.apache.http package that has the core interfaces and classes of the HTTP components. HTTPS & SSL: Android provides javax.net.ssl package that has all the classes and interfaces needed to implement and program the Secure Socket abstraction based on the SSL protocol SSSLv3.0 or TLSv1.2. XML : Most of Java's XML-related APIs are fully supported on Android. Java's Simple API for XML (SAX) and the Document Object Model (DOM) are both available on Android.
Ref: http://developer.android.com/reference/org/apache/http/package-summary.html Sri Chimanbhai Patel Institute of http://developer.android.com/reference/javax/net/ssl/package-summary.html Management & Research http://www.ibm.com/developerworks/opensource/library/x-android/index.html

16

Security Architecture: A central design point of the Android security architecture is that no application, by default, has permission to perform any operations that would adversely impact other applications, the operating system, or the user.

An application's process is a secure sandbox. It can't disrupt other applications. The permissions required by an application are declared statically in that application, so they can be known up-front at install time and will not change after that.

Ref: http://developer.android.com/guide/topics/security/security.html Management & Research

Sri Chimanbhai Patel Institute of

17

a.

Process level security User & File level security Using Permissions

b.

c.

Sri Chimanbhai Patel Institute of Management & Research

18

a. Process level security:

Each Android application runs inside its own Linux process. Additionally, each application has its own sandbox file system with its own set of preferences and its own database.

Other applications cannot access any of its data, unless it is explicitly shared.
Sri Chimanbhai Patel Institute of Management & Research

19

b. User and File level security :

Each Android package (.apk) file installed on the device is given its own unique Linux user ID, creating a sandbox for it and preventing it from touching other applications (or other applications from touching it). This user ID is assigned to it when the application is installed on the device, and remains constant for the duration of its life on that device. Security enforcement happens at the process level, the code of any two packages can not normally run in the same process, since they need to run as different Linux users. Any data stored by an application will be assigned to that application's user ID, and not normally accessible to other packages.

The file created by your application is owned by your application, but its global read and/or write permissions have been set appropriately so any other application can see it.

Ref: http://developer.android.com/guide/topics/security/security.html Management & Research

Sri Chimanbhai Patel Institute of

20

c. Using Permissions:

A basic Android application has no permissions associated with it.

To make use of protected features of the device, you must include in your AndroidManifest.xml one or more <usespermission> tags declaring the permissions that your application needs.
For example, an application that needs to monitor incoming SMS messages would specify: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.app.myapp" > <uses-permission android:name="android.permission.RECEIVE_SMS" /> </manifest>

Ref: http://developer.android.com/guide/topics/security/security.html Management & Research

Sri Chimanbhai Patel Institute of

21

Java officially supported C/C++ also possible but not supported

Sri Chimanbhai Patel Institute of Management & Research

22

Java Android SDK Eclipse IDE (optional)

Sri Chimanbhai Patel Institute of Management & Research

23

Android SDK Eclipse IDE + Android Development Tools (ADT) plug in Other IDEs Tools for debugging, compiling and packaging

Sri Chimanbhai Patel Institute of Management & Research

24

Overview of how to get started with the Android SDK:


make sure that development computer meets the hardware and software requirements for the Android SDK. install the JDK (version 5 or 6 required) and Eclipse (version 3.4 or 3.5, needed only if you want to develop using the ADT Plugin) Download and install the SDK starter package Install the Android Development Tool (ADT) Plugin for Eclipse Add Android platforms (Android 1.6 or Android 2.0) and other components to your SDK

Ref: http://developer.android.com/sdk/index.html

Sri Chimanbhai Patel Institute of Management & Research

25

Android Applications can be developed in other IDEs such as :


IntelliJ a basic editor such as Emacs

The recommended way to develop an Android application is to use Eclipse with the ADT plugin. The ADT plugin provides editing, building, debugging, and .apk packaging and signing functionality integrated right into the IDE. When developing in IDEs or editors other than Eclipse, you'll require familiarity with the following Android SDK tools:
android To create/update Android projects and to create/move/delete AVDs. Android Emulator To run your Android applications on an emulated Android platform. Android Debug Bridge To interface with your emulator or connected device (install apps, shell the device, issue commands, etc.).
Sri Chimanbhai Patel Institute of Management & Research 26

Other Open source and third-party tools :

Ant - To compile and build your Android project into an installable .apk file. Keytool - To generate a keystore and private key, used to sign your .apk file. Jarsigner (or similar signing tool) - To sign your .apk file with a private key generated by keytool
Note: The SDK includes all the tools you need to set up an Android project, build it, debug it and then package it for distribution.

Sri Chimanbhai Patel Institute of Management & Research

27

Developing Applications on an Emulator Singing your application Versioning your application Preparing to publish your application Publish your App on Android Market Sample Applications

Sri Chimanbhai Patel Institute of Management & Research

28

1. Setting up Environment for Development 2. Create Android Virtual Device (AVD) 3. Creating and running a sample App Walkthrough

Sri Chimanbhai Patel Institute of Management & Research

29

Downloading the ADT Plugin


Use Update Manager feature of Eclipse installation to install the latest revision of ADT on development computer.

Configuring the ADT Plugin


Once ADT has been successfully downloaded, the next step is to modify ADT preferences in Eclipse to point to the Android SDK directory

Sri Chimanbhai Patel Institute of Management & Research

30

An AVD defines the system image and device settings used by the emulator. Command : android create avd --target 2 --name my_avd

Sri Chimanbhai Patel Institute of Management & Research

31

Management & Research http://developer.android.com/guide/tutorials/hello-world.html

Sri Chimanbhai Patel Institute of

32

The Android system requires that all installed applications must be digitally signed with a certificate whose private key is held by the application's developer. The Android system uses the certificate as a means of identifying the author of an application and establishing trust relationships between applications.

The certificate is not used to control which applications the user can install.
The certificate does not need to be signed by a certificate authority. Android has no default keytool available. For Keytool it relies on JDK keytool.
Sri Chimanbhai Patel Institute of Management & Research 33

Versioning is a critical component of your application upgrade / maintenance strategy. The Android system itself does not ever check the application version information for an application, such as to enforce restrictions on upgrades, compatibility, and so on.

Only users or applications themselves are responsible for enforcing any version restrictions for applications themselves.

Sri Chimanbhai Patel Institute of Management & Research

34

Publishing an application means testing it, packaging it appropriately, and making it available to users of Androidpowered mobile devices for download. Before you consider your application ready for release
Test your application on device add an End User License Agreement Specify an icon and label in the application's manifest Turn off logging and debugging Version your application Obtain a suitable cryptographic key Sign your application

Sri Chimanbhai Patel Institute of Management & Research

35

Android Market is a hosted service that makes it easy for


Android Users to find and download Android applications Android Developers to publish their applications

To publish your application on Android Market you:


first need to register with the service using your Google account must agree to the terms of service

To register as an Android Market developer visit


http://market.android.com/publish

Requirements enforced by the Android Market server:


application must be signed with a cryptographic private key whose validity period ends after 22 October 2033. Application must define version code, version name, icon and label attributes in manifest
Sri Chimanbhai Patel Institute of Management & Research

36

Developing Application using Android UI Controls in Eclipse Galileo 3.5

http://www.vogella.de/articles/Android/article.html

Sri Chimanbhai Patel Institute of Management & Research

37

Developing Google maps application on Android in Eclipse Galileo 3.5 To obtain data from Google maps you must register with Google Maps service and obtain Maps API Key.

Step for registering for a Maps API Key :


Use JDK Keytool to obtain MD5 fingerprint of the certificate that you used to sign your application Command : keytool -list -keystore C:\path of key store Register the MD5 fingerprint Obtain Maps API Key Add reference to the Maps API Key in each MapView

Maps API Key Signup: http://code.google.com/android/add-ons/googleapis/maps-api-signup.html


http://www.vogella.de/articles/Android/article.html
Sri Chimanbhai Patel Institute of Management & Research 38

Using mobile Android device for Barcode Reading (video) Android - Apps without borders http://www.youtube.com/watch?v=3LkNlTNHZzE

Sri Chimanbhai Patel Institute of Management & Research

39

Advantages :
Being an open source software Android has following advantages :

The ability for anyone to customize the Google Android platform


The consumer will benefit from having a wide range of mobile applications to choose from since the monopoly will be broken by Google Android Men will be able to customize a mobile phones using Google Android platform like never before Features like weather details, opening screen, live RSS feeds and even the icons on the opening screen will be able to be customized As a result of many mobile phones carrying Google Android, companies will come up with innovative products In addition the entertainment functionalities will be taken a notch higher by Google Android being able to offer online real time multiplayer games
Sri Chimanbhai Patel Institute of Management & Research

40

Limitations
Bluetooth limitations Android doesn't support: Bluetooth stereo Contacts exchange Modem pairing Wireless keyboards Only support Bluetooth headsets! Firefox Mobile is not coming to Android Apps in Android Market need to be programmed with a custom form of Java Mozilla and the Fennec does not have that custom java

Sri Chimanbhai Patel Institute of Management & Research

41

www.android.com www.ibm.com/developerworks/opensource/library/xandroid/index.html http://devcon.momob.in Android Development with Eclipse www.vogella.de/articles/Android/article.html Artesis, HogeSchool Antwerpen (ppt from slideshare) Android Internals by Marko Gargenta and Marakana (ppt from slideshare)
Note: Few slides from this presentation are taken from internet or slideshare.com as it is or modified little bit. I have no intention of saying someones else work as mine. I prepared this presentation to just educate co-workers about android. So I want the best material from internet and slideshare.com.

Sri Chimanbhai Patel Institute of Management & Research

42

Questions & Answers


android.com & google.com

Sri Chimanbhai Patel Institute of Management & Research

43

Das könnte Ihnen auch gefallen