Professional Documents
Culture Documents
REVIEWS ON APPS
DEVELOPMENT
Mobile Apps
INTRODUCTION TO APPS
DEVELOPMENT FOR THE
IPHONE AND THE ANDROID
OS
ANDROID
Need Java 5.0+
Easiest to use Eclipse 3.3.1+
Download SDK starter pack from
developer.android.com and invoke SDK
setup program
Install Eclipse plugin
Help, Install New Software
Android Development Tools
Tell Eclipse where Android is located
HELLO ANDROID
Eclipse File, New, Project,
Android, Android Project
Create Android Virtual Device (AVD)
Window, Android SDK, AVD Manager
Run (on emulator)
To run on phone enable USB debugging
Settings, Applications, USB Debugging
Install USB driver (Windows only)
BALL GAME
Touch ball to score, after 10 ball shrinks and goes faster
Easy, medium, hard choices
Uses a Java view not XML
Uses the onTouchEvent handler
Use the onDraw method to draw on a canvas
IPHONE
Needs Intel Mac, OS X 10.5.4+
Download SDK and register (free)
developer.apple.com/iphone
$99 to deploy to iPhone or iPod
Uses Objective-C
Launch XCode
Examples from iPhone SDK Development
HELLO IPHONE
File, New Project in XCode
Choose View-based Application
HelloViewController class and HelloViewController.xib (nib),
freeze-dried GUI
HelloAppDelegate manages application
Use Interface Builder to add Label and configure color and
size in Attributes inspector
HELLO USER
Allow user to enter a name
IBOutlet reference from code to nib object, e.g. label, text
field
IBAction method nibs objects can call, e.g. button press
handler
In Interface Builder, connect outlets to code, connect action
Touch Up Inside event to handler method, sayHello
Implement the sayHello handler method
MOVIE - MVC
Create Movie class (the model)
Labels with movie info, Edit button
MovieEditorViewController for edit view with Done button to
return to main screen
Send message in Edit button to start movie controller
Send message in Done button to return to
MovieViewController
MOVIE TABLE
UITableView, UITableViewDataSource
protocol provides number of rows, add,
delete, etc., UITableViewDelegate to
handle tapping to select a row
Uses Navigation-based Application
UINavigationController
UINavigationBar (with Edit and Add
buttons)
RootViewContoller (with UITableView)
UINavigationItem
MOVIE TABLE -2
UINavigationController maintains navigation state as a
stack of view controllers.
Uses an array to hold table data. Initial array hard-coded.
Changes are not saved.
CORE DATA - 2
Create Managed Object Class to represent the model
Conference has tracks with trackAbstract, name, sessions
Edit and Add buttons configured in code in viewDidLoad
method rather than in Interface Builder
NSFetchedResultsController adaptor between CoreData
and table view
REFERENCES
Hello Android, Third Edition, Ed Burnette,
Pragmatic Programmers, 2010.
Introduction to Android development Using
Eclipse and Android widgets
ibm.com/developerWorks
iPhone SDK Development, Bill Dudney and
Chris Adamson, Pragmatic Programmers,
2009.
Beginning iPhone Games Development, PJ
Cabrera, et al, Apress, 2010.
Developing Apps for iOS (video and pdf)
from Stanford University