An Introduction To Android

3y ago
16 Views
3 Downloads
2.50 MB
33 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Troy Oden
Transcription

An Introduction to AndroidMichalis Katsarakiskatsarakis@csd.uoc.grM.Sc. StudentTutorial: hy439 & hy53916 October 2012http://www.csd.uoc.gr/ hy439/

Outline BackgroundWhat is AndroidAndroid as a SensorDevelop for Android

Background

BackgroundInternet users and Mobile phone users

BackgroundOpen Handset Alliance (OHA)Mobile OperatorsSemiconductor CompaniesHandset ManufacturersSoftware CompaniesCommercialization Companies

What is Android?

What is Android?Android delivers a complete set of software for mobile devices: Operating System Middleware Key mobile applications Open Breaking down Application Boundaries Fast & Easy Application Development

What is Android?History of Android 2001 search service for wireless device2005–––– Acquire Android(Andy Rubin: Danger CEO, Development Sidekick of T-Mobile)Acquire Skia(2D Graphics for mobile device)Acquire RegWireless(Browser and Email for mobile device)Move Engineers from PlamSource(Dianne Hackborn, etc )2007 Nov 5: Android announced2007 Nov 12: Android SDK released by OHA2007 Dec 14: Bug-fix SDK released2008 Jan 3: Android Developer Challenge I starts accepting submissions2008 Feb 13: m5-rc15 SDK released2008 Apr 14: 1788 total submissions for Challenge I2008 May 12: Top 50 Applications in Challenge I announced2008 Nov: Android Phone(G1 Phone by HTC/T-mobile)2008 Nov: Full Source Open2009 Apr: HTC Magic2009 July: HTC Hero, Samsung i7500, Android Netbook, Set-top 2009 Aug: Android Developer Challenge II

What is Android?Open SourceUsersDeveloperIndustryIndustry Software stack opensourced under Apache2.0 license Source available afterfirst handsets ship Anyone will be able tobuild a system imageUsers Users have control oftheir experience They control what getsinstalled They choose the defaultsDeveloper Don not needpermission to ship anapplication No hidden or privilegedframework APIs Can integrate, extendand replace existingcomponents

What is Android? Open SourceA Developer can:IntegrateExtendReplace

What is Android?Android Architecture

What is Android? Android ArchitectureLinux Kernel Android OS is built on top of the Linux 2.6 Kernel– Linux Core functionality Memory managementProcess managementNetworkingSecurity settings– Hardware drivers

What is Android? Android ArchitectureLibraries Android’s native libraries.–––––––––Libc: c standard lib.SSL: Secure Socket LayerSGL: 2D image engineOpenGL ES: 3D image engineMedia Framework: media codecsSQLite: Database engineWebKit: Kernel of web browserFreeType: Bitmap and VectorSufraceManager: Compose window manager with off-screen buffering.

What is Android? Android ArchitectureAndroid Runtime Core Libraries– Provides the functionality of the JAVA Programming Language Dalvik VM–––––A type of Java Virtual MachineRegister based (not stack machine like JVM)Optimization for low memory requirementsExecutes .dex (Dalvik-Executable) files instead of .classDX tool converts classes to .dex formatEach Android application: runs on its own Process runs on its own Instance of Dalvik VM is assigned its own Linux user ID

What is Android? Android ArchitectureApplication Framework The blocks that our applications directly interact with. Important blocks:– Activity Manager: Manages the activity life cycle of applications– Content Providers: Manage the data sharing between applications– Telephony Manager: Manages all voice calls. We use telephonymanager if we want to access voice calls in our application.– Location Manager: Location management, using GPS or cell tower– Resource Manager: Manage the various types of resources we use inour Application

What is Android? Android ArchitectureApplications This is where our applications are placed. Some pre-installed applications:––––SMS client appDialerWeb browserContact manager No compulsory applicationsEquality among appsEasily embedded web browserParallel running As developers, we are able to write an app whichreplaces any existing system app.

What is Android? Android ArchitectureDetails Design goalsAppsJavaApp FrameworkLibrariesCC/C Linux KernelRuntime––––Open SourceHigh flexibilityHigh data accessibilityRapid development(XML, Java) Used Languages––––App: JavaFramework: JavaLibraries: C/C OS & Drivers: C

Android Device as a Sensor

Android Device as a SensorMotion Sensors: Accelerometer GyroscopePosition Sensors: Magnetometer Proximity GPSEnvironmentSensors: Barometer Photometer Thermometer After user authorization, an app can access detailed sensorreadings, using the Application Framework layer.NetworkInterfaces: GSM/CDMA 802.11 Bluetooth

Develop for Android

Develop for AndroidAndroid SDK Android-sdk–––––add-onsdocs (Javadoc style documentation)extrasplatformsplatform-tools adb– samples (sample applications)– temp– tools emulator– SDK manager.exe

Develop for AndroidAndroid SDK Emulator– Android applications may berun on a real device or onthe Android Emulator, whichships with the Android SDK. ADB (Android Debug Bridge)– The ADB utility lets youconnect to the phone itselfand issue rudimentary shellcommands, such as copyingfiles to and from the device.

Develop for AndroidDevelopment Environment JDK 5 or 6 Eclipse IDE– JDT plugin– ADT plugin

Develop for AndroidApplication Fundamentals Development Language: Java Android SDK tools compile the code into an Androidpackage, an archive file with an .apk suffix Security sandbox– Each application has a unique Linux user ID– Each process has its own virtual machine (VM)– Every application runs in its own Linux processPrinciple of least privilege: Each application,has access only to the components that itrequires to do its work and no more.Android ApplicationDalvik VMLinux ProcessLinux Kernel

Develop for AndroidApplication ComponentsAppActivitiesAn activity represents a single screen with auser interface.ServicesContent ProvidersA content provider manages a shared set ofapplication data. Through the contentprovider, other applications can query oreven modify the data.A service is a component that runs in thebackground to perform long-runningoperations or to perform work for remoteprocesses. A service does not provide auser interface.AndroidManifest.xmlBroadcast ReceiversDeclares: app components , minimum APILevel, needed API libraries, userpermissionsA broadcast receiver is a component thatresponds to system-wide broadcastannouncements.

Develop for AndroidCases

Develop for AndroidCases

Develop for AndroidCase: Hello World

Develop for AndroidActivityLifecycle

Develop for AndroidServiceLifecycle

Develop for AndroidIntents Activities, Services, and Broadcast Receivers areactivated through intents. What is an Intent?– Message (Bundle of information)– Facility for late run-time binding between components– Passive data structure describing an operation to beperformed– Description of something that has happened and isbeing announced

OutlineNext Tutorial Practical Exercise on Android Development– Hello World– Multiple Activity Application– 802.11 RSSI measurements

Resources Introduction to loads/detail?name Introduction%20to%20Android.pdf Android oid-architecture.html Application ponents/fundamentals.html i/declaring-layout.html

Applications What is Android? Android Architecture This is where our applications are placed. Some pre-installed applications: –SMS client app –Dialer –Web browser –Contact manager As developers, we are able to write an app which replaces any existing system app. No compulsory applications Equality among apps

Related Documents:

Android Studio IDE Android SDK tool Latest Android API Platform - Android 6.0 (Marshmallow) Latest Android API emulator system image - Android 6.0 Android Studio is multi-platform Windows, MAC, Linux Advanced GUI preview panel See what your app looks like in different devices Development environment Android Studio 9

ADT (Android Development Tool) bundle or ! Eclipse ADT plug-in Android SDK or ! Android studio ! Download earlier SDK versions using SDK manager if needed . Android Virtual Device (AVD) ! Android emulator allows . Android App Essentials ! Layout ! View objects: UI widgets such as buttons, text box etc. .

Android Development Tools ADT A plug-in for Eclipse (see Eclipse) to develop Android applications. Android Operating system for smartphones. Android Market The Android distribution service of mobile applications. Android Lifecycle A model Android uses to handle the lifecycle of an activity in applications.

Dial91 Android Edition User Guide 1 About Dial91 Android Edition Dial91 Android Edition is a SIP- based phone for an Android phone. With Dial91 Android Edition (Dial91), you can use the Wi-Fi internet connection on your Android phone to make and receive calls without using your mobile

ANDROID QUICK START GUIDE WELCOME TO ANDROID 1 1 Welcome to Android About Android 5.0, Lollipop Android 5.0, Lollipop is the latest version of Android, the oper-ating system that powers not just phones and tablets, but also wearables, TVs, and even cars. Android 5.0 features a bold and bright new design, 3D graphics

Navigate to https://developer.android.com/studio/index.html and download Android Studio for your appropriate OS. The Android SDK should be included with Android Studio. Make sure you do not choose an Android Studio installation that excludes the Android SDK. Standard download option for Windows OS (above). Alternative

2010 - May: Android 2.2 / Froyo 2010 - Dec: Android 2.3 / Gingerbread 2011 - Jan : Android 3.0 / Honeycomb - Tablet-optimized 2011 - May: Android 3.1 - USB host support 2011 - Nov: Android 4.0 / Ice-Cream Sandwich - merge Gingerbread and Honeycomb 2012 - Jun: Android 4.1 / Jelly Bean - Platform Optimization

An Android Studio SQLite Database Tutorial Previous Table of Contents Next An Android Studio TableLayout and TableRow Tutorial Understanding Android Content Providers in Android Studio eBookFrenzy.com Purchase the fully updated Android 6 Edition of this Android Studio Development Essentials publication in eBook ( 9.99) or Print ( 38.99) format