ebook img

Programming with Mobile Applications: Android, iOS, and Windows Phone 7 PDF

370 Pages·2012·31.61 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Programming with Mobile Applications: Android, iOS, and Windows Phone 7

PROGRAMMING WITH MOBILE APPLICATIONS: ANDROID™, IO S, AND WINDOWS® PHONE 7 THOMAS J. DUFFY # .. ~ COURSE TECHNOLOGY 1 .. CE NGAGE Learning· Austtalla • Bra2Jt ·Japan • K0tea • t.\ei.:lco • Singap01e · Spain • UnHed Kingdom · united St ates c..,,...i. ~lll !C"'"ct--..,. Al lbflu~ M")'..,•lic....,...i.•...,.>lll.• .. '*~""...t ..,..,;.,t. .. ..,,..._o..,,.,..,.,,.,...,,..,_, •-•'*"*1"''1•"'"- "*'1*'"' .,l'!'".,.nl•on U.,,dl.•••n.lt>•..0."f"..V• r.r ........... ..,...,, .............. m .. .,.~_.,..-.. ,,~ ............... ., ..... t ,, .......... ""''""'<:'(' .......... c .... "cU.101 .............. ~ •• 1 . ... _c...u ..... ..i ....... , ..... 1"' ... ""''-"'f""''""'" .... "'""'"""'"""" lllis is an electronic version or 1.he prin1 1ex1.book. Due 10 eleCLronic rights restrictions, so1ne 1.hird pru·1y conte1u nuy be suppressed. Edi1ori al re\1iC\\' has dee1ned 1.ha1 any suppressed oontent does no11naterially affect the overall learning experience. T he publisher reserve.~ 1.he righ1 10 re1no\fe oon1en1 fron1 01is title a1 any tin1e if subsequen1 righ t~ re.~ 1rictions require ii. For valuable i nforrnation on pricing, previou;') edi1ion.:.~, change.<: 10 curren1 edi1ions. and alternate fonnats, please visi 1 \\'n''" cengage sxun O>jghenx l 10 search by ISBN#, au1hor, Litle, or key\\'Ord for 1na1erial~ in your area.~ of interest c..,,...i. ~lll!C"'"ct--..,. Al lbflu~ M")'..,•lic....,...t.>...,.>lll.• .. '*~""...t ..,..,;.,t. .. ..,,.,.,.o..,,.,'*''"''*"'..,_• •-•'*"*1*"'1•"'"- "*'1*'"' .,1'1'".,.nl•onU.,,dl.•••nlt> .. ..O."f"..V• &Ion ........ ..,...,, .............. '""' .. .,..~......,..-.... ~.,. .... n ...... .,. ..... t 11 ......... ""''""'""l'-c .... "cU...•••• ............. ~ •• 1 .... _c...u ..... ..i ....... , ..... 1"'"'""''-"'f""" ......... .._, ....... ....., ... , .. ,, COURSE TECHNOLOGY l .. CENGAGE Learning· Programming with 1\1\obile Applications: Android'"". iOS, and W indows* Pho ne 7 Thom as J. Duffy Executive Editor: Marie Lee Jl£quisitions Editor: Brandi Shailer Senior Product Manager: Aly~a Pratt Dewlopment Editor: Lisa 1\11. Lord A&sodate Product Manager: Stephanie Lorenz Content Project Manager: Heather Hopkins Art Director: Faith Brosnan Marketing Manager: Shanna Shelton Compositor: lntegra Copyeditor: Karen Annett Proofreader: Suzanne Huizenga Indexer: Sharon Hilgenberg Cover Designer: Hannah Wellman Cover Image credit: Color Symphorry/ Shutters tock.com Prinled in lht Uni led SI.alts of A1nerica 1 23456 718 171615 14 13 11 Cl 2013 Course Technology, (engage Leaming All RIGHTS RESERVED. No part of this \Wtk covered by the copyright herein may be reproduced, uans.mitted. stored or used in any form or by any means graphic, electronic.. oc mechanical, Including but not limited to photocopying, recording, scannlng,digitizlng, taping, Web distribution, lnfonnatlon net\votks, 01 information storage and retrieval systems. except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, \Vithout the prior \Vritten permission of the publisher. for product information and t echnology assistance. contact us at Cengage Le:am ing Customer & Sales Support. www.cengage.<omfsupport Fot permis.1ion to use material from this text or product. submit all requests online at cengage.comlpermissions Furthet permissions questions can be emailed to permissiontequestOcen gage.com Ubrruy of Congres.1 Control Number: 20t 1944S40 ISBN+1l: 9J3.1+\l]...6281l--2 Course Technolo9Y 20 Channel Center Street Boston, MA 02.2 10 Cengage Learning is a leading provider of customized learning solutions with office locations around the globe, including Singapore, the United Kingdon\ Australia, Mexko. Brazil, and Japan. Loe.ate your local office at: international.cengage.cornlregion Cengage Learning products are represented in Canada by Nelson Education. Ltd. For your lifelong leaming solutions.. visit course.cengage.com Visit our corporate \Wbsite at cengage.com. Some of the product names and company names used in this book have been used for identification purposes only and may be ttadematks or registe1ed ttadematks of their respective manufacturers and sellers. iOS SOK. Xcode, and lnterf;)(e Builder are trademarks of Apple. Inc .. registered in the U.S. and other countries Android is a ttadema rk of Google Inc. App ln\'entor: @2011 Google Inc. MOTODEV Studio: Cl20 11 Motorola Mobility. Inc. Adobe product screens hots reprinted \\lith permission from Adobe Systems Incorporated. Visual Studio is a trademark of Micrac;oft Corporation. A~ fictional data related to persons ot companies or URIS used throughout this book is intended for instructional purposes only.Atthe time this book was printed, any such data \...as fictional and not belonging to a"'! real persons or companies. Course Technology, a part of Cengage Learning. reserves the right to revise this publication and make changes from time to time in its content \vithout notice. The programs in this book are for instructional purpac;es only. They hone bee:n tested \Vithc.are but are not guaranteed for any particular intent beyond educational purposes. The author and the publisher do not offer a~\...arr an ties ot representations.. nor do they accept any liabilities \vith respect to the programs. c..,,...i. ~lll! C°'"ci.-....,. Al lbflU .....,_. M")'..,•bc....,....t.>nn>lll.• .. '*~""...t ..,..,;.,t. .. ..,,.,.,.o..,,.,'*''"''*"'..,_• •-•'*"*1"''1•"'"- "*'1*'"' .,l'!'".,.nl• onU.,,dl.•••n.lt>• ..0."f"..V• &Ion ........ ..,...,, .. ............ '*"' .. ., .~_.,.._,..,.~.,. .... n ...... ., ..... t ,, .......... ""''""'<:'(' .......... c .... "cU.1••• ........... .. ~ •• 1 . ... _ c...u ..... ..i ..... ,.., ..... 1"' ... ""''-"'f""''""'" .... "'""'"""'"""" Brief Contents CHAPTER l CHAPTER 2 CHAPTER 3 CHAPTER 4 CHAPTER 5 CHAPTER 6 CHAPTER 7 CHAPTER 8 CHAPTER 9 APPENDIX A Prefac e . . . . . . . . . . . . . . . . . . . ix The Computer of the Future Is in Your Hand . 1 Deve loping for Sm al I Devices . . . . . . . . 17 Best Practices for Small Device Programming 39 Google Android: App Inventor . . . . . . . 72 Google Android: Motorola MOTODEV Studio 102 Apple iOS . . . . . . . . . 166 Microsoft Windows Phone 7 222 Web Applications Cross-Platform Development with Phone Gap Install ation and Set up ... ... ... . Glossary Index . . 255 290 315 332 338 0.1"l'*• !n1 ~c...,. .. """'JU¥. .u it." 1 .. -.........i M:fl'IP<b.-• .,.....s.. .......... '""'*~"'""' ... ,. ... "' .. *"P-t1ta: ... ~ ... -·~ · ...... 11udiu11 • .... - .. .,,, ..... AS ............. u.. cll> ..... 1 .... ..o.,.. ...... ru ................... 1 . .. dmnnld ... '""'''«' ..... ....i ...... u<l>n ......... ....uy....._. ""'~ i.. .... ~"'I' ........... ..: ....... ir..-... \1..,. ....... ··~·~!· ........... ~:o.i.11>•""" ....... ,, ..... , . .. .,o ... i..n~ll"t""• .... 'JlCW'"""'""' •• Contents Preface . . . . . . . . . . . . . . . . . ix CHAPTER l CHAPTER 2 The Computer of the Future Is in Your Hand What You Need to Know . . . . . Mobile Device Programming . . . How Do You Choose a Platform? What Is a Smartphone? . . . History of the Smartphone Device Capabilities Chapter Summary . Key Terms ... Review Questions . Up for Discussion . Programming Exercises Developing for Small Devices Platform Architecture . The Android Platform The iOS Platform . . The Windows Phone 7 Platform The App Life Cycle . . . . The Android App Life Cycle . . The iOS App Life Cycle . . . . The Windows Phone 7 App Life Cycle Comparing Life Cycles Chapter Summary . Key Terms ... Review Questions . Up for Discussion . Research Projects . 1 2 3 4 6 6 8 10 11 12 15 15 . 17 18 19 20 21 22 22 27 32 34 35 36 36 38 38 0.1"l'*• !n1 ~c...,. .. """'JU¥. .u it."1 .. -.........i M:fl'IP<b.-• .,.....s.. .......... '""'*~"'""' ... ,. ... "' .. *"P-t1ta: ... ~ ... -·~ · ...... 11udiu11 • .... - .. .,,, ..... AS ............. u.. cll> ..... 1 .... ..o.,.. ...... ru ................... 1 . .. dmnnld ... '""'''«' ..... ....i ...... u<l>n ......... ....uy....._. ""'~ i.. .... ~"'I' ........... ..: ....... ir..-... \1..,. ....... ··~·~!· ........... ~:o.i.11>•""" ....... ,, ..... , . .. .,o ... i..n~ll"t""• .... 'JlCW'"""'""' •• CHAPTER 3 CHAPTER 4 CHAPTER 5 Best Pract ices for Small Device Programming . 39 Object-Oriented Programming . Encapsulation . Inheritance . . Polymorphism Design Patterns • Model-View.Controller Delegates . . . . _ Optimization . . . • . Strings, Buffers, and Operations . Loops and Cond~ional Statements . Memory Management Chapter Summary . Key Terms ... Review Questions . Up for Discussion . Programming Exercises Google Android: App Invent or Review of the Android Architecture . Your First App: Hello App Inventor Designing a User Interface Working with Blocks . . Running in the Emulator . Detective Work . . . . . Advanced Android Apps: Where's My Phone? Packaging and Deploying Applications Detective Work . Chapter Summary . Key Terms ... Review Questions . Up for Discussion . Programming Exercises Google Android: Motorola MOTODEV Studio Eclipse and MOTODEV Studio . Android App Development . . _ . The Anatomy of a Java Class . . . Your First Android App: Hello Android! Running in the Emulator . . . _ . Detective Work . . . . . . . . . Working with MOTODEV Studio and Eclipse 40 43 46 50 52 52 57 58 59 60 63 64 66 67 70 70 72 73 73 74 80 84 87 88 95 96 97 98 99 100 100 102 103 104 104 106 122 123 123 ell c..,,...i. ~lll!C"'"ct--..,. Al lbflu~ M")'..,•lic....,...i.•...,.>lll.• .. '*~""...t ..,..,;.,t. .. ..,,..._o..,,.,..,.,,.,...,,..,_, •-•'*"*1"''1•"'"- "*'1*'"' .,l'!'".,.nl•onU.,,dl.•••n.lt>•..0."f"..V• r.r ........... ..,...,, .............. m .. .,.~_.,..-.. ,,~ ............... ., ..... t ,, .......... ""''""'<:'(' .......... c .... "cU.101 ............ .. ~ •• 1 • ... _c...u ..... ..i ....... , ..... 1"' ... ""''-"'f""''""'" .... "'""'"""'"""" t CHAPTER 6 CHAPTER 7 Advanced Android Apps: DotSmasher . . . . . . Detective Work . . . . . . . . . . . . . . . Packaging and Deploying Apps in MOTODEV Studio Advanced Android Apps: Where's My Phone? Detective Work . Chapter Summary . KeyTerms ..• Review Questions . Up for Discussion . Programming Exercises Apple iOS ... An Objective.C Primer . . . . Back to the Beginning . . . . Moving Forward: Hello iP hone! . Detective Work . . . . . . Troubleshooting . . . . . . Advanced iOS Apps: ButtonChaser . Detective Work . . . . . . . . Working with the iOS Development Tools Packaging and Deploying iOS Apps . . So Where Is Where's My Phone? . . . Using the Core Location Framework Chapter Summary . KeyTerms ... Review Questions . Up for Discussion . Programming Exercises Microsoft Windows Phone 7 A Quick Look at C# . . . . . . . . Your First Windows Phone 7 App: Hello Windows! Running in the Emulator . . . . Detective Work . . . . . . . . . . . . . . Working with Visual Studio 2010 . . . . . . Advanced Windows Phone 7 Apps: ButtonChaser Detective Work . . . . . . . . . . . . . . Packaging and Deploying Windows Phone 7 Apps Again, Where Is Where's My Phone? Using the Location Service Chapter Summary . KeyTerms ....•... 126 141 141 143 159 160 161 162 164 164 166 167 171 178 197 197 197 204 205 207 208 208 217 218 218 221 221 222 223 226 232 234 234 236 242 242 245 246 249 250 c..,,...i. ~lll !C"'"ct--..,. Al lbflu~ M")'..,•lic....,...i.•...,.>lll.• .. '*~""...t ..,..,;.,t. .. ..,,..._o..,,.,..,.,,.,...,,..,_, •-•'*"*1"''1•"'"- "*'1*'"' .,l'!'".,.nl•onU.,,dl.•••n.lt>•..0."f"..V• r.r ........... ..,...,, .............. m .. .,.~_.,..-.. ,,~ ............... ., ..... t ,, .......... ""''""'<:'(' .......... c .... "cU.101 ............ .. ~ •• 1 • ... _c...u ..... ..i ....... , ..... 1"' ... ""''-"'f""''""'" .... "'""'"""'"""" CHAPTER 8 CHAPTER 9 Review Questions . . . Up for Discussion . . . Programming Exercises Web Applica tions Developing for Mobile Browsers . Choosing an Editor • . . . . • Detective Work . . . . . . . A Quick Look at Web Technologies HTML .. css .......... . JavaScript . . . . . . . . Your First Web App: Hello Web! Testing Web Apps in Emulators Android ... . iOS ..... . Windows Phone 7 Detective Work . Advanced Web App: DotSmasher Detective Work • Chapter Summary . Key Terms ... Review Questions . Up for Discussion . Programming Exercises Cross-Platform Devel op me nt with Phone Gap 251 253 253 255 256 257 260 261 261 264 268 273 277 278 278 279 280 280 285 286 286 287 289 289 290 Introducing PhoneGap . . . . . . . . . . . 291 Your First PhoneGap App: Hello PhoneGap! • . . 292 Creating the Project Files in MOTODEV Studio . 292 Creating the Project w~h Existing Files in Xcode 296 Detective Work . . . . . . . . . . 300 Advanced PhoneGap Apps: DotSmasher . . . . 301 Creating the Project Files in Xcode . . . . . . 301 Creating the Project w~h Existing Files in MOTODEV Studio 306 Detective Work . . . . . . . . 307 Using PhoneGap·s Geolocation API . 307 Chapter Summary . 311 Key Terms . . • 311 Review Questions . 311 Up for Discussion . 312 Programming Exercises 313 c..,,...i. ~lll!C"'"ct--..,. Al lbflu~ M")'..,•lic....,...i.•...,.>lll.• .. '*~""...t ..,..,;.,t. .. ..,,..._o..,,.,..,.,,.,...,,..,_, •-•'*"*1"''1•"'"- "*'1*'"' .,l'!'".,.nl•onU.,,dl.•••n.lt>•..0."f"..V• r.r ........... ..,...,, .. ............ m .. .,.~_.,..-.. ,,~ ............... ., ..... t ,, .......... ""''""'<:'(' .......... c .... "cU.101 ............ .. ~ •• 1 • ... _c...u ..... ..i ....... , ..... 1"' ... ""''-"'f""''""'" .... "'""'"""'"""" APPENDIX A Installation and Setup Android ..... App Inventor . . MOTODEV Studio Apple iOS ..• Windows Phone 7 . PhoneGap .... Using PhoneGap wrth Xcode 3 Using PhoneGap wrth MOTODEV Studio . Getting Help Glossary Index .. 315 316 316 318 323 326 329 329 330 330 332 338 c..,,...i. ~lll!C"'"ct--..,. Al lbflu~ M")'..,•lic....,...i.•...,.>lll.• .. '*~""...t ..,..,;.,t. .. ..,,..._o..,,.,..,.,,.,...,,..,_, •-•'*"*1"''1•"'"- "*'1*'"' .,l'!'".,.nl•onU.,,dl.•••n.lt>•..0."f"..V• r.r ........... ..,...,, .............. m .. .,.~_.,..-.. ,,~ ............... ., ..... t ,, .......... ""''""'<:'(' .......... c .... "cU.101 ............ .. ~ •• 1 • ... _c...u ..... ..i ....... , ..... 1"' ... ""''-"'f""''""'" .... "'""'"""'"""" Preface Welcome to Programming witJr Mobile Applications: Android, iOS. and Windows Phone 7' This book L< aimed at programmers-or those "'th some programming background-who want to move into the exciting world of developing apps for smartphones. The major platforms for m<lbile apps are G<lOgle Android, Apple iOS. and Microsoft \l(iindows Phone 7, so this book foclLses on developing apps for these three operating systems. Approach The approach used in Programming witJr Mobile Applications: Android, iOS. and Windows Phone 7 is simple. You learn techniques applicable to smartphone development, and then apply these techniques in writing apps for Android, iOS, and Windows Phone 7. When possible, the apps created for each platform are identical so that you can use your ne"found knowledge to help you decide which platforms you want to use. Each chapter begin.< with the traditional Hello World app and then moves on to more complex and useful apps. Jn addition, Programming witJr Mobile Applications includes coverage of writing Web apps as well as cross-platform apps by using the PhoneGap libraries. The t<lOls used in Probwamming witJr Mobile Applications are the standard tools developers use to create apps. Specifically, two tools are lLsed for Android development: G<lOgle's App Inventor and Motorola's MOTODEV Studio. MOTODEV Studio LS a branded version of IBM Eclipse with plug-ins for creating Android apps. Apple's Xcode4 is used for iOS development, and Microsoft Visual Studio 2010 Express is used for Windows Phone 7 development. All these t<lOls include an emulator for testing your apps, so you don't need a smartphone to run any of the apps covered in this book. In addition, all the t<x>ls u.<ed in this book are av-•ilable free. What This Book Is This book serves as an introduction to \vriting program-; for n1obile devices. Jt familiarizes you with the software for creating mobile a pps and the process of using the software development kit (SDK) for each platform covered in thcs b<x>k. You don't need actual phones because the apps you create in this b<lOk can run by using software emulators. 0.1"l'*• !n1~c...,..,"""'JU¥. .u it."1 .. -.........i M:fl'IP•b<' • .,.....i.. .......... '""'*~"'""' ... ,. ... "' .. *"P-t1ta: ... ~ ... -·~ · ...... 11udiu11 • .... - .. .,,, ..... AS ............. u.. cll> ..... 1 .... ..o.,.. ...... ru ... n..1 ............ 1 ... dmnnltl ... '""'''«' ..... ....i ...... u<l>n ......... ....uy....._. ""'~ i.. .... ~ .. .q· ........... ..: ....... ir..-... \1..,. ....... ··~·~!· ........... ~:o.i.11>•""" ....... ,, ..... , ... .,o ... i..n~ll"t"*'• .... •..CW•"""I""' •• Organization and C-Overage What This Book Is Not Because this book is targeted to those new to developing mobile apps, it doesn't cover advanced topics, such as application programming interfaces (AI'ls) for each platform. Instead, it explains how to access the APls you need so that you can develop that "killer app" you have in mind. In addition, this book isn't an exhaustive information resource. You can find a wealth of information, tutorial<, examples, and other resources for each platform online. You should learn enough from this book that you can modify and make use of code you find to fit your needs. There's no substitute for \\Titing code, making mt<takes, and learning how to fix them. Indeed, there's no better way to further your learning about programming. Organization and Coverage Chapter l introduces the smartphone landscape, reviews basic programming terms, and gives you an overview of the tools used to develop apps on each platform. You ais<) learn about the history of the smartphone and the capabilities of the most current phones for each platform. Chapter 2 covers platform architecture and app life cyde events and compares the three major platforms. Chapter 3 covers best practices for developing smartphone apps. It includes a brief introduction to object-oriented programming concepts and describes the Model-View- ControUer and Delegate design patterns in the context of smartphone programming. Finally, some optimization techniques that are useful for smartphone apps, including memory management, are discussed. The next four chapters cover the three major platforms in detail. Chapter 4 uses G<)()gle's App Inventor to create Android apps, and Chapter 5 uses Motorola's MOTODEV Studio to create Android apps. Chapter 6 covers Apple iOS, u.•ing Apple's iOS SDK, Xcode, and lnterfuce Builder. Chapter 7 covers Microsoft Windows Phone 7, using Visual Studio 2010 Express for Windows Phone. Chapter 8 explains developing Web apps in the context of smartphones, using HTM L, CSS, and Java Script. Chapter 9 covers cross-platform development with the open-source PhoneGap library. You develop native apps for Android and iOS by using HTML, CSS, and JavaScript. Appendix A explains how to install and set up the software you need to work through the exercises in the book and describes how to create a project in each tool. You'll refer to this appendix often as a u.<eful resource. c..,,...i. ~lll!C"'"ct--..,. Al lbflu~ M")'..,•lic....,...t.>...,.>lll.• .. '*~""...t ..,..,;.,t. .. ..,,..._o..,,.,..,.,,.,...,,..,_, •-•'*"*1"''1•"'"- "*'1*'"' .,l'!'".,.nl•onU.,,dl.•••n.lt>•..0."f"..V• r.r.n ........ ..,...,, .. .....,,,..,,'*"' .. .,.~_.,.._,..,.~ ....... n ...... ., ..... t .1 ......... ""''""'<:'(' .......... c .... "cU.101 .............. ~ •• 1 .... _c...u ..... ..i ..... ,.., ..... 1"' ... ""''-""""''""'" .... "'""'"""'"""" Features of the Book Features of the Book Programming with Mobile App/ica.tions includes the following features: • Objectives- Each chapter begins with a list of objectives as an overview of the topics discussed in the chapter and as a useful study aid. • Note.~ Want More Info?. Programming Tips. and Cautions- Notes offer additional information about programming concepts. The Want More Info? features give link.< that guide you to Web sites where you can explore topics in more depth or find useful resources. I'rogramming Tips give advice cln approaching problems from a programmer's point of viev.•. Cautions \\•arn )'OU about sntuations that are eaS)' to get into and likely to cause big problems. • Figures and tables- Chapters contain diagrams to clarify pr<>gramming concepts and screenshots to show the interfaces of tool< you're working with. In addition, many tables are included to give you an at~a .. gtance summary of useful information. • Best practices- You're encouraged to use programming and development techniques that follow industry-accepted standards and conventions. Because each platform uses an object-oriented programming language, you learn object-oriented design and programming techniques as well as the Model-View-Controller and Delegate design patterns. ln addition, code optimizations for small devices are covered. • How· To exercises- Starting with Chapter 4, each chapter includes boxed features called "How· To" exercises, which are hands-on t utorials that lead you through the development proces.s step by step to create working apps. • Detective \Vorkf..-itures- Each How-Toexerdse end< "ith a Detective Work feature that challenges you to apply a concept you've ju.<t learned to a new situation, complete a ta<k started in a previou.~ exercise, or extend an app \1.'i.th additional features, for example. • Summaries- At the end of each chapter L< a summary list that recaps the programming concepts and techniques covered in the chapter so that you have a way to check your understanding of the chapter's main poinLs. • Key terms- Each chapter includes definiti-0ns of new terms, alphabetized for ease of reference. ~fhis feature ls another useful \ WY to reviev.• the chapter's major concepts. • /?evieiv questi.ons- Each chapter contains multiple·choice and true/false reviev.• questions, along with "Up for Discussion" questions for a review of key concepts in the chapter. • /)rogra11v11ing· exercises- Each chapter includes programming problems involving concepts explained in the chapter to help students practice creating apps for each platform. Students are encouraged to work through the problems and have instructors check their work against the solution files. • Quality-Every program example, hands--0n activity, and case study was tested by the author in four major browsers (Internet Explorer, Mozilla Firefox, Google Chrome, and Safari) and again by Cengage Quality Assurance testers. c..,,...i. ~lll ! C"'"ct--..,. Al lbflu~ M")'..,•lic....,...t.>...,.>lll.• .. '*~""...t ..,..,;.,t. .. ..,, .... 0.,,,,.,..,.,,.,...,,..,., •-•'*"*1"''1•"'"- "*'1*'"' .,l'!'".,.nl•onU.,,dl.•• •n.lt> .. ..O."f"..V• r.r ........... ..,...,, .. ............ '*"' .. .,.~_.,.._,..,.~ .............. ., ..... t ,, .......... ""''""'<:'(' .......... c .... "cU.1••• ............. ~ .• 1 • ... _c...u ..... ..i ..... ,.., ..... 1"' ... ""''-"'f""''""'" .... "'""'"""'"""" Software Used in This Book Student Resources Source code and project files for the Mow-To exercises in h·ogmmming with Mobile A11plications are available at H1ll1l11.cei1gagebra.l1tco111. Software Used in This Book All software you use in this book is available f•ee. With the exceptk>n of PhoneGap, you need to register \Yith softv.•are vendors to dov.rnload the tools. lvlost vendors have a nk1rketplace, such as Apple's App Store and the Android Market, that charges a fee for posting your apps as well as a developer program you must enroll in to post your apps. Appendix A has instructions for in.stalling and setting up all the software tools lLsed in thcs book, but here's a list of tools, download locations, and guidelines for hardware requirements for each platform: Google Android Google App Inventor-App Inventor is a Web-based application. For information on system requirenienlo; and setup, visit ll'lVlV.appinvento,-beta.co111//ea111/setu11/i1uiex}1l:1111. At the M1e of INs writing, Google is !h'lnilg to tum wer App Inventor to MIT Researcll Labs. By the line you tead lllis book, the URL i1 Appenclh< A pcinfl'lg to App kl"'ntor moght no tonger work. BecaJse App l!M!ntofs new tocabon is unkno\Wl at tlis tme. look for '*3(1ated ilfmnation at "'"'v.cengagellrain.can. Searcll by ISBN for INs book, sdect Access Now, and cid< Update; 11 the left oa1>gation bar. Steps and saeeos night diffet sightly from ~hat's she..,, 11 this book. Motorola MOTODEV Studio-Download from http://de1•eloper.motoro/a,comldocswo/s/ 111otodevstu1Jio/dow11/(J(lt//. For information on system requirements, go to http://dew/oper. mowro/a,com/docswols!libraryl/11stalli11g_MOTODEV_Studi0Jor_A11dmid!. Apple iOS iOS $DK-Download &om https:l!developer.apple.comlxcodeli11dex.php. System requirements: an Intel-based Mac running OS X 10.3 to 10.7. Note. This book uses Xcode 4-. If you're using a Mac with OS X 10.5 or earlier, you need to install Xcode 3. Look for a section on the download page for the iOS SOK called "Looking for Xcode 3'." Apple will continue supporting Xcode 3. Microsoft Windows Phone 7 Visual Studio 2010 Express for Windows Phone-Download the software and view system requirement< at www.micm•oftcom/dcwnload/e11/detai/s.aspx?displaylang=e11&id=27570. Phone Gap Do\vnload from lVlt'll'.phonegap.a.>111/ho111e/ . c..,,...i. ~lll!C"'"ct--..,. Al lbflu~ M")'..,•lic....,...i.•...,.>lll.• .. '*~""...t ..,..,;.,t. .. ..,,..._o..,,.,..,.,,.,...,,..,_, •-•'*"*1"''1•"'"- "*'1*'"' .,l'!'".,.nl•onU.,,dl.•••n.lt>•..0."f"..V• r.r ........... ..,...,, .. ............ m .. .,.~_.,..-.. ,,~ ............... ., ..... t ,, .......... ""''""'<:'(' .......... c .... "cU.101 ............ .. ~ •• 1 • ... _c...u ..... ..i ....... , ..... 1"' ... ""''-"'f""''""'" .... "'""'"""'"""" For the Instructor For the Instructor Programming with Mobile Applications e• intended to be modular. The first part of the book covers concepl< and techniques that apply to all the platforms. The second pa rt covers each platform separately. Based on your students' experience, you can choose which chapters in the first part you want to include. If your students have already learned object-oriented ~ programming principles and techniques. you might want to omit Chapter 3, for example. ~ In the second part, you can choose which platforms to target. If you don't have Macs av-•ilable, for example, you could omit Chapte• 6, or you might decide you don't need to cover two tool< for Android development, in which case you could eliminate Chapter4. Becau.se the platform chapters cover the same apps, your students won't be me«ing anything. At Norwalk Community College (NCC), the .class on programming mobile devices uses this book. It has been taught online the last two times it has been offered, and it uses the entire book with the following changes. First, studenl< are a<ked to install the software at the beginning of the cla55, so Appendix A e• covered firsl This method lead• to fur fewer headaches later in the term. Second, the Detective Work features and Programming Exercises in Chapter 6 are optkmal because for many students, particularly those at community colleges, requiring studenl< to have a Mac is too much of a financial burden. NCC does have Mac labs with the development tools irt<talled available for students, but asking students to come to campus defeal< the purpose of an online class' When the class is taught on campus, it meets for 5 hours per week: 3 hours lecture and 2 hours supervised lab time. Jt takes place in the Mac labs for the iOS chapter and in the PC labs for all other chapters. Instructor Resources The following teaching tools are available on the Instructor Resources CD or through wgin.cengage.com to instructors who have adopted this book: Instructor's Ma.m1al. The electronic Inst rue tor's Manual follows the book chapter by chapter to assist in planning and organizing an effective, engaging course. The manual includes learning objectives, chapter overviews, lecture notes, teaching tips, ideas for classroom activities, and additional resources. A sample course syllabus is also available. Exa.mView®. This book is accompanied by Exam View, a powerful testing software package that allows instructors to create and administer printed, computer (lAN-based), and Internet exatTL•. Exam View includes hundreds of questions corresponding to the topics covered in the< book, enabling studenl< to generate detailed study guides that include page references for further review. The.se computer-based and Internet testing components allow students to take exams at their computers and save instructors time by grading each exam automatically. Test banks are also available in Blackboard, WebCT, and Angel formats. J>owerl'oi11t Prese11ta.tio11s. The< book comes with Powerl'oint slides for each chapter. They're included as a teaching aid for classroom presentations, to make available to stu<lenl< on the net\\'ork for chapter revie\'1, or to be printed for classr<">0n1 d i.')tribution. Instructors can add their own slides for additional topics or customize the slides with access to all the figure files from the book. c..,,...i. ~lll! C"'"ct--..,. Al lbflu~ M")'..,•lic....,...i.•...,.>lll.• .. '*~""...t ..,..,;.,t. .. ..,,..._o..,,.,..,.,,.,...,,..,_, •-•'*"*1"''1•"'"- "*'1*'"' .,l'!'".,.nl• onU.,,dl.•••n.lt>• ..0."f"..V• r.r ........... ..,...,, .............. m .. .,.~_.,..-.. ,,~ ............... ., ..... t ,, .......... ""''""'<:'(' .......... c .... "cU.101 ............ .. ~ •• 1 • ... _ c...u ..... ..i ....... , ..... 1"' ... ""''-"'f""''""'" .... "'""'"""'""""

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.