- ホーム
- > 洋書
- > 英文書
- > Computer / General
Full Description
The Only Tutorial Covering BOTH iOS and Android-for students and professionals alike!Now, one book can help you master mobile app development with both market-leading platforms: Apple's iOS and Google's Android. Perfect for both students and professionals, Learning Mobile App Development is the only tutorial with complete parallel coverage of both iOS and Android. With this guide, you can master either platform, or both-and gain a deeper understanding of the issues associated with developing mobile apps.You'll develop an actual working app on both iOS and Android, mastering the entire mobile app development lifecycle, from planning through licensing and distribution.Each tutorial in this book has been carefully designed to support readers with widely varying backgrounds and has been extensively tested in live developer training courses. If you're new to iOS, you'll also find an easy, practical introduction to Objective-C, Apple's native language. All source code for this book, organized by chapter, is available at https://github.com/LearningMobile/BookAppsCoverage includesUnderstanding the unique design challenges associated with mobile apps Setting up your Android and iOS development environments Mastering Eclipse development tools for Android and Xcode 5 tools for iOS Designing interfaces and navigation schemes that leverage each platform's power Reliably integrating persistent data into your apps Using lists (Android) or tables (iOS) to effectively present data to users Capturing device location, displaying it, and using it in your apps Accessing hardware devices and sensors Publishing custom apps internally within an organization Monetizing your apps on Apple's AppStore or the Google Play marketplace, as well as other ways of profiting from app development, such as consulting and developer jobs
Contents
Preface xivPart I Overview of Mobile App Development 11 Why Mobile Apps? 3Transformative Devices 3Reaching Customers 4Changing Business Process 6Making Money 9Summary 10Exercises 102 App Design Issues and Considerations 13App Design 13Operating System Design Issues 13Screen Size and Orientation Issues 17Connectivity Issues 18Battery Issues 19Hardware Issues 19Device Differences 21Android 21iOS 23Introducing Your First App 23Contact Screen 24Contact List Screen 24Map Screen 25Settings Screen 26Summary 26Exercises 27Part II Developing the Android App 293 Using Eclipse for Android Development 31Starting a New Project 31Setting Up the Workspace 32Creating the Project 32Components of the IDE 35The Android Manifest 37Configuring the Emulator 39Coding the Interface 42Coding App Behavior 50Adding Code 52Summary 54Exercises 544 Android Navigation and Interface Design 55Activities, Layouts, and Intents 55The Activity Class 56Layout 56Intents 57Creating the Interface 57Create the Project 58Create the Navigation Bar 59Create the Contact Layout 64Activating the Interface 78Code the Navigation Bar 78Code the Toggle Button 80Code the DatePicker Dialog 82Summary 86Exercises 875 Persistent Data in Android 89Preferences, Files, and Database 89Preferences 89Files 90Database 90Creating the Database 91Create the Database Helper Class 91Create the Data Source Class 93Using the Database 98Capture User-Entered Data 99Save User-Entered Data 101Use the Debugger 105Using Preferences 107Create the Settings Layout 107Code the Page's Behavior 109Summary 113Exercises 1146 Lists in Android: Navigation and InformationDisplay 115Lists and Adapters 115Lists 115Adapters 116Simple Lists 116Create the Data Source Method 116Create the Layout 118Code the Activity 118Complex Lists 121Create the Data Source Method 121Create the Layout 123Create the Custom Adapter 125Code the Activity 127Add Delete Functionality 128Completing the ContactList Activity 135Populating the ContactActivity Screen 135Coding the Add Button 138Sort the Contacts List 139Set ContactListActivity as the Default Activity 141Set ContactActivity as Default Activity with noContacts in Database 142Summary 143Exercises 1437 Maps and Location in Android 145Location Sensors, Maps, and Fragments 145Location Sensors 145Maps 146Fragments 146Setting Up for Maps 146Passing Data Between Controllers 151Finding Your Location 152Geocoding: Get Coordinates from an Address 152Get Coordinates from the GPS Sensor 155Get Coordinates from Network Sensor 159Get Coordinates from the Map 161Displaying Your Contacts' Locations 164Summary 170Exercises 1718 Access to Hardware and Sensors in Android 173Sensors, Managers, and Other Hardware 173Sensors 173Managers 174Other Hardware 174Monitoring the Battery 174Using Sensors to Create a Compass 177Using the Phone 181Using the Camera 183Summary 189Exercise 190Part III Developing the iOS App 1919 Using Xcode for iOS Development 193Creating the Xcode Project 193Project Settings 196Creating the User Interface 199Running the App in the Simulator 200Adding App Behavior 202Dismissing the Keyboard 205App Icons and Launch Images 208Summary 211Exercises 21110 iOS Navigation and Interface Design 213Views and Controllers 213View Controller 213Tab Bar Controller 214Navigation Controller 215Creating the Interface 215Creating the Project 215Creating the Views 216Design the Contacts Screen 222Add Navigation Controller for the Date Screen 226Activating the Interface 230Summary 233Exercises 23311 Persistent Data in iOS 235File Data Storage 235User Defaults 236Core Data 236Setting Up Core Data 237Creating the Project 237Designing Data Structure 241Passing Data Between Controllers 243Saving Data to Core Data 248Storing the Settings 251Creating the Settings Interface 252Working with NSUserDefaults Object 256Activating the Settings Interface 257Global Constants 259Summary 262Exercises 26212 Tables in iOS: Navigation and InformationDisplay 263Overview of Tables 263Setting Up Tables 265Populate the Table with Data 265Retrieve Data from Core Data 269Adding Contact Data 272Display Detailed Data 273Save Changes to Records 276Deleting Records 277Accessory Buttons 280Alert View 281Show Subtitles in the Table 285Sort the Table 285Summary 288Exercises 28813 Maps and Location in iOS 289Overview of Location and Mapping 289Hardware and Sensors 289Core Location 290MapKit 290Adding Location Information to the App 291Finding Location 291Adding a Map 300Summary 309Exercises 30914 Access to Hardware and Sensors in iOS 311Getting Device Information 311Monitoring Battery Status 314Controlling the Camera 317Calling a Phone Number 324Long Press Gesture 324Adding Long Press to Enabled Text Field 326Using Core Motion for Accelerometer Data 328Summary 333Exercises 333Part IV Business Issues 33515 Monetizing Apps 337App Monetization Strategies 337Paid Apps 337Ad Supported Apps 338In-App Purchases 340Understanding the Economics of App Stores 341Owning Your Own Business 342Create an LLC 342Plan Your Business 342Other Income Possibilities 343Choosing a Platform 343Summary 345Exercises 34516 Publishing Apps 347App Distribution Through the App/Play Stores 347Android Play Store Distribution 348iOS App Store Distribution 351App Distribution for the Enterprise 353Android Enterprise Distribution 353iOS Enterprise Distribution 354Testing and Fragmentation 354Keeping Up with the Platform 356Summary 356Exercises 357Part V Appendixes 359A Installing Eclipse and Setup for AndroidDevelopment 361Setting up Java and Eclipse 361Download and Install Java SE SDK 362Downloading Eclipse 363Installing Eclipse on Windows 363Installing Eclipse on Mac 365Installing Android 366Setting Up the Classroom 369B Installing Xcode and Registering PhysicalDevices 371Download and Install Xcode 371Apple Developer Programs 372Setting Up the Classroom 373Deploying Apps to Real Devices 373Creating Developer Accounts 375Backing Up the Development Certificate 376Registering Devices 378Checking the Development Environment 379C Introduction to Objective-C 383A Brief History of Objective-C 383Two Languages in One 384Objects and Classes 385Properties in Detail 394Declaring and Calling Methods 396Inheritance and Protocols 397Memory Management 398Index 399