Académique Documents
Professionnel Documents
Culture Documents
Android
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Agenda
What is an android? (Part 1) Inside Android (Components) (Part 2) Writing code for android devices.(Part 3) Demonstration (Part 4)
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
About Android
We can create powerful java applications in android. Android phones are called smart mobile devices. Android has a potential market beyond mobile devices. Some of android code being written for non mobile applications. Android was made freely available under Apache open source license in Oct 2008. Estimated 3 billion users
22-24 December, 2010 ICOSST 2010
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
HTC G1
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Features
Connectivity: WIFI, Bluetooth and GPRS, EDGE,
and 3G
Hardware: Support for GPS, accelerometers and Cameras. Graphics: Built in 2D/3D support including OpenGL. Storage: SQLLite Browser: The web browser is based on Webkit Supports modern features like multi touch and multi tasking.
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Popular version
Name Cupcake (Linux 2.6.27) Donut (Linux 2.6.29) clair (Linux 2.6.29) Froyo (Linux 2.6.32) Gingerbread (Linux 2.6.35.7) Honeycomb (2011) Ice Cream (2011)
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
OS trends
Android popularity is growing and will soon challenge Symbian in 2014 [Gartner.com]
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Application Architecture
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Detailed components
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Android Manifest
Every application must provide a file named AndroidManifest.xml Contains the configuration information for correctly installing it. Contains three things 1. Class names 2. Events 3. Permissions
22-24 December, 2010 ICOSST 2010
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Tools Needed
To develop android applications we need IDE: Officially Eclipse is used Android SDK Android Developer Tools plug-in for Eclipse
Java Coding in eclipse is very intitutive, provides rich java environment like context sensitive help and code suggestions
22-24 December, 2010 ICOSST 2010
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Android SDK
Provides tools and APIs to begin developing applications on the Android using JAVA. Used to build, compile, test and debug user applications Can be downloaded for Linux, Windows and MAC. We can add, delete and update components in android SDK. To begin development we need Eclipse IDE with ADT plug-in.
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Broadcast receivers can trigger intents that start an application Data storage provide data for your apps, and can be shared between apps database, file, and shared preferences (hash map) used by group of applications
22-24 December, 2010 ICOSST 2010 Bruce Scharlau, University of Aberdeen, 2010
Services run in the background and have no UI for the user they will update data, and trigger events
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
How it works
Write app in Java Compiled in Java
Linux OS
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
HelloWorld Android
package com.google.android.helloactivity; import android.app.Activity; import android.os.Bundle; public class HelloActivity extends Activity { public HelloActivity() { } @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.hello_activity); } }
22-24 December, 2010 ICOSST 2010
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Emulator
Applications can be run on the device or emulator.
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
images UI layouts
constants
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.my_domain.app.helloactivity"> <application android:label="@string/app_name"> <activity android:name=".HelloActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application>
Bruce Scharlau, University of Aberdeen, 2010
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Android vs IPhone
Android is open source but iOS is proprietary. iOS can only be used on apple machines like Iphone,Ipad,Ipod Android has a universe of diverse mobile devices manufactured by renowned OEMS.For e.g. HTC,Samsung,LG,Sony Ericsson,Dell e.g Iphone iOS development is restricted while Android is flexible. iOS uses objective C while Android uses wildly adopted Java language.
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Demonstration
Presented in Open Source Series Workshop 2010 ICOSST 2010 Android Presentation
Questions?