Android Ecosystem and. Revised v4presenter. What s New

Similar documents
An Introduction to Android. Jason Chen Developer Advocate Google I/O 2008

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Mobile Computing. Introduction to Android

Android App Development. Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore

Android Fundamentals - Part 1

Activities and Fragments

Android Overview. Most of the material in this section comes from

CS378 -Mobile Computing. Anatomy of and Android App and the App Lifecycle

Programming with Android: System Architecture. Dipartimento di Scienze dell Informazione Università di Bologna

Infrastructure Middleware (Part 3): Android Runtime Core & Native Libraries

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml

Lecture 1 Introduction to Android. App Development for Mobile Devices. App Development for Mobile Devices. Announcement.

CS378 - Mobile Computing. Anatomy of an Android App and the App Lifecycle

Introduction to Android

Real-Time Embedded Systems

Programming with Android: System Architecture. Luca Bedogni. Dipartimento di Scienze dell Informazione Università di Bologna

SHWETANK KUMAR GUPTA Only For Education Purpose

UNDERSTANDING ACTIVITIES

Introduction To Android

Introduction to Android

Introduction to Android development

COLLEGE OF ENGINEERING, NASHIK-4

Minds-on: Android. Session 2

States of Activities. Active Pause Stop Inactive

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

Android Software Development Kit (Part I)

Embedded Systems Programming - PA8001

Software Development & Education Center ANDROID. Application Development

Another difference is that the kernel includes only the suspend to memory mechanism, and not the suspend to hard disk, which is used on PCs.

Programming with Android: System Architecture. Dipartimento di Scienze dell Informazione Università di Bologna

Android. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license

Mobile OS. Symbian. BlackBerry. ios. Window mobile. Android

Android. Operating System and Architecture. Android. Screens. Main features

Android App Development

Android for Ubiquitous Computing Researchers. Andrew Rice University of Cambridge 17-Sep-2011

INTRODUCTION TO ANDROID

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

Application Fundamentals

EMBEDDED SYSTEMS PROGRAMMING Application Basics

Mobile and Ubiquitous Computing: Android Programming (part 1)

Lecture 2 Android SDK

Programming in Android. Nick Bopp

CS378 -Mobile Computing. Services and Broadcast Receivers

Lab 1: Getting Started With Android Programming

CS 370 Android Basics D R. M I C H A E L J. R E A L E F A L L

Android Programmierung leichtgemacht. Lars Vogel

University of Babylon - College of IT SW Dep. - Android Assist. Lect. Wadhah R. Baiee Activities

CSCU9YH Development with Android

Android App Development

Lifecycle Callbacks and Intents

LECTURE NOTES OF APPLICATION ACTIVITIES

Introduction. Lecture 1. Operating Systems Practical. 5 October 2016

Android System Architecture. Android Application Fundamentals. Applications in Android. Apps in the Android OS. Program Model 8/31/2015

CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu

Overview of Activities

Introduction to Android

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

Android Activities. Akhilesh Tyagi

Introduction to Android Application Development. Mike Kvintus Principal Engineer JDSU

Computer Science E-76 Building Mobile Applications

Lecture 1 - Introduction to Android

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

Android App Development. Ahmad Tayeb

Understanding Application

Introduction to Android Android Smartphone Programming. Outline University of Freiburg. What is Android? Background University of Freiburg.

Xin Pan. CSCI Fall

Android Basics. Android UI Architecture. Android UI 1

Android Application Development

IGEEKS TECHNOLOGIES. Software Training Division. Academic Live Projects For BE,ME,MCA,BCA and PHD Students

Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ]

CS 528 Mobile and Ubiquitous Computing Lecture 3b: Android Activity Lifecycle and Intents Emmanuel Agu

Android. (XKE Mars 2009) Erwan Alliaume.

Android Internals and the Dalvik VM!

Android - open source mobile platform

Praktikum Mobile und Verteilte Systeme. Android-Basics. Prof. Dr. Claudia Linnhoff-Popien André Ebert, Sebastian Feld

Questions and Answers. Q.1) Which of the following is the most ^aeuroeresource hungry ^aeuroepart of dealing with activities on android?

Android-Basics. Praktikum Mobile und Verteilte Systeme. Prof. Dr. Claudia Linnhoff-Popien André Ebert, Sebastian Feld

Android Online Training

Around Android. Essential Android features illustrated by a walk through a practical example

Lifecycle-Aware Components Live Data ViewModel Room Library

Android Basics. - Bhaumik Shukla Android Application STEALTH FLASH

Mobile and Wireless Systems Programming

Minds-on: Android. Session 1

Android framework. How to use it and extend it

Bringing C and C++ Games to Android

Android Overview. Most of the material in this sec5on comes from h6p://developer.android.com/guide/

Services. service: A background task used by an app.

Android Programming in Bluetooth Cochlea Group

BCA 6. Question Bank

User Interface Design & Development

PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY:

SD Module- Android Programming

DROID. By S.Gokulakrishnan AP/CSE SCSVMV

ATC Android Application Development

ANDROID SYLLABUS. Advanced Android

COSC 3P97 Mobile Computing

Distributed Systems Introduction. Matthias Kovatsch Distributed Systems Group

IJRDTM Kailash ISBN No Vol.17 Issue

ANDROID MOCK TEST ANDROID MOCK TEST IV

Chapter 1 Hello, Android

Transcription:

Android Ecosystem and Revised v4presenter What s New

Why Mobile?

5B 4B 3B 2B 1B Landlines PCs TVs Bank users Mobiles

225M AOL 180M 135M 90M 45M 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Quarters since launch

225M AOL i-mode 180M 135M 90M 45M 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Quarters since launch

225M AOL i-mode Netscape 180M 135M 90M 45M 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Quarters since launch

225M AOL i-mode Netscape ios 180M 135M 90M 45M 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Quarters since launch

225M AOL i-mode Netscape ios Android 180M 135M 90M 45M 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Data from Asymco: asymco.com Quarters since launch

200,000 150,000 100,000 50,000 0 Feb May Jun Aug Today New activations per day

100,000 75,000 50,000 25,000 0 Feb May Jun Aug Today Apps in Android Market

90 devices 21 manufacturers 50 carriers 49 countries

Android: What s Inside Native code Dalvik virtual machine Android NDK apps JNI Android SDK apps Android app framework Harmony libraries Linux kernel, Android extensions

Android: What s Inside Android app framework Activity Manager Window Manager OpenGL ES Surface Manager Content Providers View System SGL FreeType Package Manager Telephony Manager WebKit SQLite Resource Manager Location Manager Media Framework libc Notification Manager... SSL...

Android: What s Inside Currently, Dalvik classes are produced by compiling & translating code written in the Java language Excellent toolchain support Android SDK app Android manifest resource bundle Dalvik classes Community work is under way on enabling other languages to be first class Android citizens

Android: What s Inside This is mostly done by game developers Pretty well all C/C++ code Relatively manual toolchain support Android NDK app Android manifest resource bundle Dalvik classes libraries & JNI

How a Developer Works 1. Download SDK manager from developer.android.com and use it to install SDK versions. 2. Use the Eclipse plug-in, or just build with ant, or program in C/C++ using the NDK. 3. Use tools like ddms and logcat and traceview. 4. Download system source from source.android.com, use it for reference. 5. Register as a developer for US$25. 6. Upload your app to Android Market. 7. There is no Step 7!

What a Developer sees Activities: Something that s happening on the screen Services: Something important in the background Intents: For launching other Activities & Services Broadcast Receivers: Quickly respond to an event Threads and processes: Familiar Linux model Content Providers: Interprocess database wrappers Manifest: Declaring your app to the world Hardware APIs: Location, Camera, Microphone, Video, Accelerometer, and more

Activity Contains the visual user interface Focused on one endeavor More than one per application One Activity is marked for launch Current Activity can starts the next Extends Activity base class

Activity Example

Activity Lifecycle 3 states: active, paused and stopped System can kill if paused or stopped Managed by 7 protected methods Realizing 3 nested lifetime loops Entire Lifetime Visible Lifetime Foreground Lifetime

Activity Lifecycle Entire Lifetime oncreate() onstart() onrestart() Visible Lifetime Foreground Lifetime onresume() RUNNING onpause() onstop() ondestroy() SHUTDOWN

Service Does not have a visual user interface Runs in the background System attempts to keep it alive Communicate through exposed Interface Run in the main thread of application Spawn another thread to avoid blocking Extends Service base class

Service Example

Service Lifecycle 2 states: active and stopped Runs in foreground Not likely to be killed, but possible Managed by 3 public methods

Service Lifecycle Entire Lifetime Active Lifetime oncreate() onstart() RUNNING ondestroy() SHUTDOWN

Intents Has an optional target, an action, a Mime type, and a category, with optional extra data Launch a specific Activity or Service via target Omit the target and the system will find the Activity or Service to start Activities, Services, and BroadcastReceivers register IntentFilters to say they can handle particular Intents How everything in Android is tied together

Intents Intent launch Back button

Intent

Broadcast Receiver Does not have a visual user interface Runs in the background Reacts to broadcast system messages Example: battery charge status Extends BroadcastReceiver base class Has to complete and exit fast

Broadcast Receiver Example

Broadcast Receiver Lifecycle 1 state: active Runs in background...... but not for long! Not likely to be killed, but possible Managed by 1 public method

Broadcast Receiver Lifecycle onreceive() Active Lifetime RUNNING DONE

Content Providers Makes data available to other apps Typically backed by file system or SQLite Extends ContentProvider base class Examples: Contacts, Phone log, Media files, and more

Content Providers ContentProvider

Threading Semantics are like java.lang.thread There s one special thread that owns the UI. You have to arrange to do any real work on another thread, to keep things from bogging down. Shared mutable state... be careful! Lots of potential for deadlocks and race conditions.

Threading private Handler mhandler = new Handler(); // class variable protected void oncreate(bundle mumble) { // in UI thread scallprogress = (ProgressBar) findviewbyid(r.id.scallprogress); new Thread(new CopyIn()).start(); //... class CopyIn implements Runnable { public void run() { while (calls.movetonext()) { // in background thread print.println(call.cursortojson(calls)); savedcalls += 1; scallprogress.setprogress((int) (savedcalls / denominator)); } mhandler.post(new Runnable() { // send this to UI thread String msg = getstring(r.string.saved) + " " + savedcalls + " " }); + getstring(r.string.calls) + "."; public void run() { } cplabel.settext(msg);

Android Manifest XML file that declares app components: Activities, Services, Intent Filters, Broadcast Receivers Names any libraries to be included Identifies permissions needed Identifies hardware required Identifies framework versions

Other bits & pieces APIs for all the hardware and sensors; location services System intents for telephony and SMS and Maps and so on XML subsystem for doing layouts in multiple resolutions and form factors XML subsystem for encoding strings with bilt-in i18n Utilities for IPC... and much more.

Android Releases May 10: Froyo Oct 09: Eclair Apr 09: Cupcake Sep 09: Donut

Android Releases

Android Directions Performance, performance performance New form factors Framework improvements More languages

Android Market Directions On the Web Bigger Easier to search Easier to buy Easier to track

Why I chose Android Open source (GPL + Apache 2) Low-friction market and side-loading Low barrier to entry; java today, more languages tomorrow Straightforward API, light on abstraction Nice clean unboxed Intent/Activity/Service architecture, with a back button Almost nothing hidden

Thank you! feedback: bit.ly/mgddbr Tim Bray, Developer Advocate twbray@google.com android-developers.blogspot.com @AndroidDev