S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

19
SMARTPHONE APPLICATION DEVELOPMENT Sam Palmer

Transcript of S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

Page 1: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

SMARTPHONE APPLICATION DEVELOPMENT

Sam Palmer

Page 2: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

WHY IS THIS INTERESTING?

Smartphones are becoming increasingly common

As hardware improves smartphones are becoming increasingly more powerful

Smartphones now resemble computers more than phones

Mobile operating systems are becoming increasingly robust

Page 3: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

EVERYONE LIKES MONEY

Mobile applications are an expanding and lucrative market

Itunes store has over 150,000 third party applications with over 3 BILLION downloads

Android Market has over 40,000 applications and is growing by about 8,000 apps a month

Page 4: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

THE APP STORE

Used for iphone applications $99 yearly membership for unlimited app

hosting Apps pricing: $0.99 - $999.99 Profits: 70% developer / 30% Apple Apps must be approved by Apple Only way to distribute iphone apps

Page 5: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

ANDROID MARKET

$25 one time fee for lifetime membership No fee for hosting applications Profits: 70% developer / 30% Google Content not regulated/restricted Can distribute apps through other venues

Page 6: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

WINDOWS MARKETPLACE

$99 yearly membership $99 per app submission Apps must be approved by Microsoft Profits: 70% developer / 30% Microsoft Can distribute apps through other venues

Page 7: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.
Page 8: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

ANDROID

Based on the linux 2.6 kernel Open source operating system – Apache

public license Operating system is available free to

manufacturers Applications written in a combination of Java

& XML Designed to encourage use & reuse of

applications Uses Eclipse IDE & Android Development

Toolkit plugin (ADT) ADT includes graphical phone emulator

Page 9: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.
Page 10: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

LIBRARIES

C & C++ code

Webkit – open source browser engine (also used in Safari)

Dalvik VM – specifically designed for android & embedded systems.

Uses .dex files – which are more efficiently compiled bytecode optimized for embedded systems

Can run multiple processes & each process has its own VM

Page 11: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

APPLICATION FRAMEWORK

All applications use the same framework & APIs

Activity Manager: manages lifecycle of applications. Includes a common backstack to integrate multiple running processes seamlessly to the user

Package Manager: keeps track of installed apps

Window Manager: manages windows Telephony manager: contains the phone API

Page 12: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

APPLICATION FRAMEWORK

Content providers: allow applications to share data with other apps

Resource Manager: stores bitmaps, layout files, and other external parts that are not code

View System: contains buttons, lists, and other UI components

Page 13: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

APPLICATION BUILDING BLOCKS

Activity: UI components, typically corresponding to a single screen. An app can have multiple activities

Intent Receiver: responds to notifications or state changes. Can wake up a process

Service: a faceless task that runs in the background. Activities can connect to services

Content Provider: enables applications to share data. Data can be stored in any fashion, such as files or in the internal SQlite database

Page 14: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

INTENTS

Intents are messages used for late-time binding between components in the same or different applications

Android automatically finds the appropriate activity, service, or broadcast receiver and instantiates it if necessary

Almost any task has an intent in the middle Promotes modularity Core phone features can be changed for user

created versions

Page 15: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

BACKSTACK

Used to seamlessly transition between processes

System automatically saves state information of applications before starting a new app

http://www.youtube.com/watch?v=fL6gSd4ugSI&feature=player_embedded#t=03m50s

Page 16: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

HELLOWORLD

Page 17: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

IPHONE: HELLOWORLD

Page 18: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

IPHONE: HELLOWORLD

Page 19: S MARTPHONE A PPLICATION D EVELOPMENT Sam Palmer.

ANDROID RESOURCES

http://developer.android.com/index.html