Android 101 Writing And Publishing Android Applications

46
Android 101: Writing and Publishing Android Applications @romannurik May 2010

description

Android 101: Writing and Publishing Android Applications presented at the the first bootcamp at Google IO 2010. Presenter: Roman Nurik from the Android Development Team.

Transcript of Android 101 Writing And Publishing Android Applications

Page 1: Android 101  Writing And Publishing Android Applications

Android 101: Writing and Publishing Android Applications

@romannurik May 2010

Page 2: Android 101  Writing And Publishing Android Applications

Agenda

1. Writing your app

  Platform features

  Surfacing your UI

  Intents

  Speech, Location, Sensors

  Native development

2. Publishing your app

  Registering

  Targeting

  Buying & Selling

  Other distribution types

  Featuring and promotion

Page 3: Android 101  Writing And Publishing Android Applications

Writing your app

Page 4: Android 101  Writing And Publishing Android Applications

4

  Android is an open platform, and it’s open source

  Develop mostly in Java and XML – C/C++ for Native development (NDK)

  Replace the core apps with your own

  Source code available – SDK and core apps –  http://source.android.com

Android

Page 5: Android 101  Writing And Publishing Android Applications

5

  Shipping 60K+ devices per day

  More devices = more business

  SDK supports: – Many screen sizes/resolutions – Screen density independence

Multiple Devices, Single App

Page 6: Android 101  Writing And Publishing Android Applications

6

~120 / ldpi ~160 / mdpi ~240 / hdpi

Small screen ~ ≤ 3.0”

Normal screen ~ ≤ 4.0”

Large screen ~ ≥ 4.8”

Multiple Devices, Single App

Page 7: Android 101  Writing And Publishing Android Applications

7

Note: This data is based on the number of Android devices that have accessed Android Market within a 14-day period ending on May 17th 2010

http://developer.android.com/resources/dashboard/screens.html

Screen Size & Density Breakdown

Page 8: Android 101  Writing And Publishing Android Applications

8

An Android application is actually a collection of several components, each

defined in AndroidManifest.xml

Application Components

Page 9: Android 101  Writing And Publishing Android Applications

9

  Activities

  Services

  Content Providers

  Broadcast Receivers

Application Components

Page 10: Android 101  Writing And Publishing Android Applications

10

  Launcher icons

  Status bar notification

  Widgets

  Quick Search Box integration

  Live Folders

  Live Wallpapers

Surfacing your UI

Page 11: Android 101  Writing And Publishing Android Applications

11

  Launcher icons

  Status bar notification

  Widgets

  Quick Search Box integration

  Live Folders

  Live Wallpapers

Surfacing your UI

Page 12: Android 101  Writing And Publishing Android Applications

12

  Launcher icons

  Status bar notification

  Widgets

  Quick Search Box integration

  Live Folders

  Live Wallpapers

Surfacing your UI

Page 13: Android 101  Writing And Publishing Android Applications

13

  Launcher icons

  Status bar notification

  Widgets

  Quick Search Box integration

  Live Folders

  Live Wallpapers

Surfacing your UI

Page 14: Android 101  Writing And Publishing Android Applications

14

  Launcher icons

  Status bar notification

  Widgets

  Quick Search Box integration

  Live Folders

  Live Wallpapers

Surfacing your UI

Page 15: Android 101  Writing And Publishing Android Applications

15

  Launcher icons

  Status bar notification

  Widgets

  Quick Search Box integration

  Live Folders

  Live Wallpapers

Surfacing your UI

Page 16: Android 101  Writing And Publishing Android Applications

16

  Users can multitask – Apps get paused, not closed

  Background services –  Invisible apps with no GUI – Unobtrusive event notifications –  Listen to music and check

email simultaneously

Concurrent Applications

Page 17: Android 101  Writing And Publishing Android Applications

17

  Intents “link” activities, services, and receivers together

  Intents consists of – An action (i.e. ACTION_VIEW) – Categories (i.e. CATEGORY_DEFAULT) – A URI (i.e. content://contacts/people/123) –  “Extras” metadata

  Intents can also be to hard-coded class names (com.foo.FooActivity)

Intents

Page 18: Android 101  Writing And Publishing Android Applications

18

Application B

Application A “Intent”

  Apps can communicate with each other by providing and consuming each other’s Intents

Inter-App Communication

Page 19: Android 101  Writing And Publishing Android Applications

19

Example: Inter-App Communication

Page 20: Android 101  Writing And Publishing Android Applications

20

  Enables voice-to-text capability

  Invoke via IME or Intent

  English, Mandarin Chinese & Japanese

  Integrate with 3rd party speech recognition service

Speech Input

Page 21: Android 101  Writing And Publishing Android Applications

21

Example: Speech Input

Page 22: Android 101  Writing And Publishing Android Applications

22

  LocationManager – Service determines location and bearing – Register for periodic updates by time – Register for proximity updates by distance

  Google Maps library –  Includes MapView – Programmatic access to Google Maps API – Handles user interaction to control Map

Location and Mapping

Page 23: Android 101  Writing And Publishing Android Applications

23

Example: Location and Mapping

Page 24: Android 101  Writing And Publishing Android Applications

24

  Camera

  Microphone

  Accelerometer

  Compass

  Example apps: Layar, Google Goggles

Hardware and Sensors

Page 25: Android 101  Writing And Publishing Android Applications

25

  Used in conjunction with the SDK

  Performance-critical, C/C++ code

  Just launched NDK r3 – Support for OpenGL ES 2.0 – Compact, efficient binaries

  Typical uses: – Games – Re-use existing C/C++ code base

Native Development Kit (NDK)

Page 26: Android 101  Writing And Publishing Android Applications

26

developer.android.com

Getting Started

Page 27: Android 101  Writing And Publishing Android Applications

27

1.  Download the SDK

2.  Install Eclipse and ADT

3.  Look through tutorials and samples

4.  Run them on the emulator or your device

5.  Write your app!

Getting Started

Page 28: Android 101  Writing And Publishing Android Applications

28

  Android has a strong, active developer base – Google Groups – Stack Overflow –  IRC office hours

Developer Community

Page 29: Android 101  Writing And Publishing Android Applications

Publishing your app (in Android Market)

Page 30: Android 101  Writing And Publishing Android Applications

30

• Android SDK

• Development resources

• Developer Advocates

http://developer.android.com

• Create profile & register

• Developer Distribution Agreement

• Setup merchant account

http://market.android.com/publish/

• Sign & upload .apk

• Deployment options

• Marketing & promotions

1. Develop 2. Register 3. Publish

Publishing Android Apps

Page 31: Android 101  Writing And Publishing Android Applications

31

  Upload at any time, as many times as you want

  Publish whenever you are ready

  Users have access to app right away

  Update app at any time

Publishing Android Apps

Page 32: Android 101  Writing And Publishing Android Applications

Registration

Basic Setup   Contact information

  One-time fee –  no limit on number of

applications

  Developer agreements –  Developer Distribution

Agreement –  Content Policy Guidelines

Distribution Countries   Launched in major

markets throughout Americas, EMEA and JAPAC.

Page 33: Android 101  Writing And Publishing Android Applications

33

  Device capabilities – SDK level: Minimum and Maximum – Screen size: Small, Normal, Large

  Location –  Target countr(ies) – Operator(s) (if applicable) – Matched to user’s service provider

Targeting Options

Page 34: Android 101  Writing And Publishing Android Applications

Selling Android Apps

“Seller” Requirements   Checkout merchant

account required

  Developer collects 70% of application price

  Transaction fee is equivalent to 30% of the application price; goes to operating costs.

“Seller” Countries   9 countries supported

–  United States –  United Kingdom –  Austria, France, Germany,

Italy, Netherlands, Spain –  Japan

  4 currencies supported –  USD ($) –  GBP (£) –  EUR (€) –  JPY (¥)

Page 35: Android 101  Writing And Publishing Android Applications

Buying Android Apps

“Buyer” Requirements   Google Checkout

account required

  Methods of payment –  Credit & Debit cards –  Carrier billing (if available)

  Purchased apps are tied to buyer’s Google account, may be installed unlimited times

  24 hour refund period

“Buyer” Countries   Americas

–  Canada, United States

  APAC –  Japan, New Zealand

  EMEA –  Austria, France, Germany,

Italy, Netherlands, Spain, Switzerland, United Kingdom

Page 36: Android 101  Writing And Publishing Android Applications

36

Prices are listed in “Seller” currency

Confirmation to buy

Estimated price in “Buyer” currency

Choice in payment method

Buying Android Apps

Page 37: Android 101  Writing And Publishing Android Applications

37

37

  USB side-loading via Android Debug Bridge (adb) – Useful in development and

debugging

  Download from website – Useful for private

distribution – Website may be access

controlled

Other Options for Distributing Apps

Page 38: Android 101  Writing And Publishing Android Applications

How to Increase Exposure

Market Ranking

  Relevance

  Downloads

  Ratings

  Retention

  and other factors…

Page 39: Android 101  Writing And Publishing Android Applications

39

Getting Featured

Promotion Banner

Featuring and Promotion

Page 40: Android 101  Writing And Publishing Android Applications

40

Partner Device Launches

Page 41: Android 101  Writing And Publishing Android Applications

41

Events

Page 42: Android 101  Writing And Publishing Android Applications

Questions?

Page 43: Android 101  Writing And Publishing Android Applications

43

  Monetize!

  Auto display highest paying ads

  Targeting – Keyword, demographics, location – Ad placement

  Control ad appearance and positioning

AdSense for Mobile Applications SDK

Page 44: Android 101  Writing And Publishing Android Applications

44

  Tracks install referrer

  Tracks Pageviews & Events

  Integrates with Google Analytics dashboard

Analytics Tracking for Mobile Apps

Page 45: Android 101  Writing And Publishing Android Applications

45

Note: This data is based on the number of Android devices that have accessed Android Market within a 14-day period ending on May 17th 2010

http://developer.android.com/resources/dashboard/platform-versions.html

Version % of Devices 1.5 (API Level 3) 34.1% 1.6 (API Level 4) 28.0% 2.1 (API Level 7) 37.2% Other 0.7%

Device Dashboard

Page 46: Android 101  Writing And Publishing Android Applications

46

  Android, Google are registered trademarks of Google Inc.

  All other trademarks and copyrights are the property of their respective owners.

Copyrights and Trademarks