1 / 24

Google Android

Google Android. Introduction to Mobile Computing. Android is part of the ‘build a better phone’ process. Open Handset Alliance produces Android. Comprises handset manufacturers, software firms, mobile operators, and other manufactures and funding companies. http://www.openhandsetalliance.com/.

cindy
Télécharger la présentation

Google Android

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Google Android Introduction to Mobile Computing

  2. Android is part of the ‘build a better phone’ process Open Handset Alliance produces Android Comprises handset manufacturers, software firms, mobile operators, and other manufactures and funding companies http://www.openhandsetalliance.com/

  3. Bruce Scharlau, University of Aberdeen, 2009 Android is growing Small, 1% of online web requests Bigger, 10% of online web requests

  4. Android makes mobile Java easier Well, sort of…

  5. Android applications are written in Java 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); } }

  6. Linux OS Loaded into Dalvik VM Android applications are compiled to Dalvik bytecode Write app in Java Compiled in Java Transformed to Dalvik bytecode

  7. The Dalvik runtime is optimized for mobile applications Run multiple VMs efficiently Each app has its own VM Minimal memory footprint

  8. Android has many components

  9. Android has a working emulator

  10. All applications are written in Java 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

  11. Android applications have common structure Views such as lists, grids, text boxes, buttons, and even an embeddable web browser An Activity Manager that manages the life cycle of applications and provides a common navigation backstack Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data A Notification Manager that enables all apps to display custom alerts in the status bar A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files

  12. Android applications have common structure Broadcast receivers can trigger intents that start an application Activity is the presentation layer of your app: there will be one per screen, and the Views provide the UI to the activity 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 Intents specify what specific action should be performed Services run in the background and have no UI for the user – they will update data, and trigger events

  13. There is a common file structure for applications code Auto generated resource list files images UI layouts constants

  14. Standard components form building blocks for Android apps Notifications Has life-cycle Activity screen Views App to handle content Intents Background app Like music player Service manifest ContentProviders Other applications

  15. 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>

  16. Bruce Scharlau, University of Aberdeen, 2009 Activity is one thing you can do

  17. Intent provides late running binding to other apps It 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

  18. Services declared in the manifest and provide support Services run in the background: Music player providing the music playing in an audio application Intensive background apps, might need to spawn their own thread so as to not block the application

  19. Notifications let you know of background events This way you know that an SMS arrived, or that your phone is ringing, and the MP3 player should pause

  20. ContentProviders share data You need one if your application shares data with other applications This way you can share the contact list with the IM application If you don’t need to share data, then you can use SQLlite database

  21. UI layouts are in Java and XML setContentView(R.layout.hello_activity); //will load the XML UI file

  22. 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" package="com.google.android.app.myapp" > <uses-permission id="android.permission.RECEIVE_SMS" /> </manifest>

  23. There are lots of sources of information • The sdk comes with the API references, sample applications and docs/resources/bootcamp.pdf • There are Google news groups • There is http://www.anddev.org • There is Google search

  24. End of Overview Next, start to build your first app!

More Related