3.
Devices, licensing , and openness
iPhone
Apple is the only device vendor Open Handset Alliance
Device OS is not open source Devices from multiple vendors,
including HTC, Samsung, Sony
iPhone Developer Program Ericsson, Motorola, Acer, …
membership has an annual fee Free and open source mobile
($99 to $299) platform, including OS,
Regular iPhone and iPod Touch middleware and key
retail devices are used for applications
development, but each device Regular retail devices can be
must first be registered by the used to test and use
developer under the iPhone applications
Developer Programme Android Dev Phone 1, SIM-
unlocked and hardware-
unlocked development device,
but is currently only ship to 18
countries worldwide.
ICT 3

4.
Distributing your applications
iPhone
iPhone Developer Programme Developers can publish their
members can sell or provide applications through Android
their applications for free Market
through App Store To become a publisher of
applications in the Android Market
Applications have to be requires registration and a fee
approved by Apple before the ($25)
become available in App Store Currently only developers from 7
With the Store Kit API countries can sell applications
developers can integrate Currently free applications can be
purchase of new content and distributed to 24 countries, and paid
application extensions into their applications to 9 countries
applications
In-house distribution available
for enterprises with 500+
employees
ICT 4

5.
Acquiring and deploying applications
iPhone
Applications are acquired by Applications can be acquired by
users through Apple’s official users through Android Market
App Store (both free and paid) Applications are acquired
Applications are acquired directly from Android Market to
directly from AppStore to the the device. Currently Market is
device, or using AppStore from not viewable outside the device.
iTunes on PC / Mac and then All code for an application is
synchronizing the device bundled as an Android package
Updates to installed for distribution and deployment
applications are visible when Updates to installed
visiting AppStore or using applications are available when
iTunes, and selected updates visiting My Downloads under
are deployed similar to new Android Market.
applications
ICT 5

8.
Runtime model / processes for application
iPhone
Single 3rd party application Full multitasking
running Default: every application has
Design rule: fast launch and fast separate Linux process
shutdown, store state to allow Each process has its own Java
users to continue where they VM
left To conserve resources it is
Application launch image – possible to allow applications to
gives user impression of quick run in the same process,
launch sharing the same VM
This Apple video includes an These YouTube videos shows
example of the basic interaction how home screen and home
(time interval 1:12-1:22) button is used to switch
between applications
ICT 8

9.
Application Architecture
No main() function for Activity:
presents user interface
applications
Service:
Four kinds of components, runs in background without
an application may have user interface
multiple of each. Broadcast receivers:
only receives and reacts to
broadcast announcements
Content providers:
makes set of application data
available to other applications
ICT 9

10.
Activities, tasks, intents
A task is a group of Activities, services and
activities arranged as a broadcast receivers are
stack (seen from the user activated through
as an application) asynchronous messages
One activity can start called intents
other activities An intent names an action
Activities from different and a data URI
applications can part of Intents supported by
the same task (but belong components are declared
to different processes) in the application's
manifest
See this YouTube video
for illustration
ICT 10

19.
Inter-application communication
iPhone
Launch other application using Launch other activities using
an URL to communicate with it intents with action and URI
Application can register custom Components register intent
URL schemes filters they react to
Copy / paste between
Copy / paste between
applications
applications
Content Providers gives access
to data from other applications
Components can bind to
services also of other
applications, and perform
remote procedure calls to
interfaces declared using an
IDL
ICT 19

22.
File management
iPhone
Sandbox Default: each application
Each application has its has a unique Linux user
own home directory id, and application files are
Backup: automatic when only visible to that user id
synched using iTunes, all
of home directory except
cache and tmp directory
ICT 22

23.
Programming languages
iPhone
C and Objective C All applications are
Compiled to native code developed in Andoid’s
No garbage collection, but Java
uses reference counters Dalvik VM specific to
and reference pools. Android
No (official) Java version Android-specific bytecode
optimized for minimal
memory footprint
Libraries do not match any
of the standard Java
profiles, but covers most
of J2ME CDC
ICT 23

27.
iPhone Interface Builder
Used to compose the
User interface and
main object instances
of the iPhone
application
Source: http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhone101/index.html
ICT

29.
iPhone
In this example the changeGreeting:
method of File’s Owner is triggered
by “touch up inside” for the Hello button
Source: http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhone101/index.html
Source: http://developer.android.com/guide/topics/ui/declaring-layout.html
ICT