• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Mc android
 

Mc android

on

  • 170 views

 

Statistics

Views

Total Views
170
Views on SlideShare
170
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Mc android Mc android Presentation Transcript

    • Google Android Based on android-sdk_2.2 Mobile ComputingBruce Scharlau, University of Aberdeen, 2010
    • Android is part of the ‘build a better phone’ processOpen Handset Alliance produces AndroidComprises handset manufacturers, software firms, mobile operators, and other manufactures and funding companies http://www.openhandsetalliance.com/ Bruce Scharlau, University of Aberdeen, 2010
    • Android is growing Uneven distribution of OS by regions Does not include iTouch or iPad, as not smartphoneshttp://metrics.admob.com/wp-content/uploads/2010/06/May-2010-AdMob-Mobile-Metrics-Highlights.pdf Bruce Scharlau, University of Aberdeen, 2010
    • Android makes mobile Java easier Well, sort of… Bruce Scharlau, University of Aberdeen, 2010http://code.google.com/android/goodies/index.html
    • Android applications are written in Javapackage 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); }} Bruce Scharlau, University of Aberdeen, 2010
    • Android applications are compiled to Dalvik bytecodeWrite app in JavaWrite app in Java Compiled in Java Compiled in Java Transformed to Dalvik bytecode Transformed to Dalvik bytecode Loaded into Dalvik VM Loaded into Dalvik VM Linux OS Bruce Scharlau, University of Aberdeen, 2010
    • The Dalvik runtime is optimised for mobile applications Run multiple VMs efficiently Each app has its own VM Minimal memory footprint Bruce Scharlau, University of Aberdeen, 2010
    • Android has many components Bruce Scharlau, University of Aberdeen, 2010
    • Can assume that most have android 2.1 or 2.2 Bruce Scharlau, University of Aberdeen, 2010http://developer.android.com/resources/dashboard/platform-versions.html
    • Android has a working emulator Bruce Scharlau, University of Aberdeen, 2010
    • All applications are written inJava and available to each other Android designed to enable reuse of components in other applications Each application can publish its capabilities which other apps can use Bruce Scharlau, University of Aberdeen, 2010
    • Android applications haveViews such asViews such as common structurelists, grids, textlists, grids, text An Activity Manager that An Activity Manager thatboxes, buttons,boxes, buttons, manages the life cycle of manages the life cycle ofand even anand even an applications and provides applications and providesembeddable webembeddable web a common navigation a common navigationbrowserbrowser backstack backstackContentContent A Notification Manager A Notification ManagerProviders thatProviders that that enables all apps to that enables all apps toenableenable display custom alerts in the display custom alerts in theapplications toapplications to status bar status baraccess data fromaccess data fromother applicationsother applications A Resource Manager, A Resource Manager,(such as(such as providing access to non- providing access to non-Contacts), or toContacts), or to code resources such as code resources such asshare their ownshare their own localized strings, localized strings,datadata graphics, and layout files graphics, and layout files Bruce Scharlau, University of Aberdeen, 2010
    • Android applications have common structureBroadcastBroadcast Activity is the presentation Activity is the presentationreceivers canreceivers can layer of your app: there will layer of your app: there willtrigger intents thattrigger intents that be one per screen, and the be one per screen, and thestart an applicationstart an application Views provide the UI to the Views provide the UI to the activity activityData storageData storageprovide data forprovide data for Intents specify what Intents specify whatyour apps, andyour apps, and specific action should be specific action should becan be sharedcan be shared performed performedbetween apps –between apps –database, file,database, file,and sharedand shared Services run in the Services run in thepreferencespreferences background and have background and have(hash map) used(hash map) used no UI for the user – no UI for the user –by group ofby group of they will update data, they will update data,applicationsapplications and trigger events and trigger events Bruce Scharlau, University of Aberdeen, 2010
    • There is a common file structure for applications code Autogenerated files resource list images UI layouts constants Bruce Scharlau, University of Aberdeen, 2010
    • Standard components formbuilding blocks for Android apps Notifications Has life-cycle Activity screen Views App to handle content Intents Background app Service Like music player manifest ContentProviders Other applications Bruce Scharlau, University of Aberdeen, 2010
    • The AndroidManifest lists application details<?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
    • Activity is one thing you can do Bruce Scharlau, University of Aberdeen, 2010From fundamentals page in sdk
    • Intent provides late running binding to other appsIt can be thought of as the glue between activities. It is basically a passive data structure holding an abstract description of an action to be performed. Written as action/data pairs such as: VIEW_ACTION/ACTION content://contacts/1 Bruce Scharlau, University of Aberdeen, 2010
    • Services declared in the manifest and provide supportServices run in the background:Music player providing the music playing in an audio applicationIntensive background apps, might need to spawn their own thread so as to not block the application Bruce Scharlau, University of Aberdeen, 2010
    • Notifications let you know of background eventsThis way you know that an SMS arrived, or that your phone is ringing, and the MP3 player should pause Bruce Scharlau, University of Aberdeen, 2010
    • ContentProviders share dataYou need one if your application shares data with other applicationsThis way you can share the contact list with the IM applicationIf you don’t need to share data, then you can use SQLlite database Bruce Scharlau, University of Aberdeen, 2010
    • UI layouts are in Java and XMLsetContentView(R.layout.hello_activity); //will load the XML UI file Bruce Scharlau, University of Aberdeen, 2010
    • Security in Android follows standard Linux guidelines Each application runs in its own process Process permissions are enforced at user and group IDs assigned to processes Finer grained permissions are then granted (revoked) per operations<manifest xmlns:android="http://schemas.android.com/apk/res/android"<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.android.app.myapp" > package="com.google.android.app.myapp" ><uses-permission id="android.permission.RECEIVE_SMS" /><uses-permission id="android.permission.RECEIVE_SMS" /></manifest></manifest> Bruce Scharlau, University of Aberdeen, 2010
    • There are lots of sources of information• The sdk comes with the API references, sample applications and lots of docs• Blog http://android-developers.blogspot.com/ which has lots of useful examples, details• There is http://www.anddev.org Bruce Scharlau, University of Aberdeen, 2010