logo资料库

Android Application Development All-in-One For Dummies.pdf

第1页 / 共666页
第2页 / 共666页
第3页 / 共666页
第4页 / 共666页
第5页 / 共666页
第6页 / 共666页
第7页 / 共666页
第8页 / 共666页
资料共666页,剩余部分请下载后查看
Title Page
Table of Contents
Introduction
How to Use This Book
Conventions Used in This Book
What You Don’t Have to Read
Foolish Assumptions
How This Book Is Organized
More on the Web!
Icons Used in This Book
Beyond the Book
Where to Go from Here
Book I: Getting Started with Android Application Development
Chapter 1: All about Android
The Consumer Perspective
The Developer Perspective
The Business Perspective
Chapter 2: Installing the Software Tools
Installing Oracle’s Java Development Kit
Adding Apple’s Java to the Stew
The Many Faces of Java ⠀昀漀爀 䤀渀焀甀椀爀椀渀最 刀攀愀搀攀爀猀 伀渀氀礀)
Setting Up the Software
Launching the Android Studio IDE
Fattening Up the Android SDK
Chapter 3: Creating an Android App
Creating Your First App
Running Your App
You Can Download All the Code
What If …
Testing Apps on a Real Device
Chapter 4: Examining a Basic Android App
A Project’s Files
What Did I Agree To?
Chapter 5: Conjuring and Embellishing an Android App
Dragging, Dropping, and Otherwise Tweaking an App
A Bit of Debugging
Chapter 6: Improving Your App
Improving the Layout
Starting Another Activity
Localizing Your App
Responding to Check Box Events
Displaying Images
Sending in Your Order
Book II: Android Background Material
Chapter 1: Using Android Studio
Don’t Read This Chapter
The Big Picture
The Things You Can Do
Chapter 2: It’s Java!
From Development to Execution with Java
Grasping Java Code
Chapter 3: What Java Does ⠀愀渀搀 圀栀攀渀)
Making Decisions ⠀䨀愀瘀愀 椀昀 匀琀愀琀攀洀攀渀琀猀)
Repeating Instructions Over and Over Again
Jumping Away from Trouble
Chapter 4: Object-Oriented Programming in Java
Static Fields and Methods
Interfaces and Callbacks
Classes That Must ⠀愀渀搀 䴀甀猀琀 一漀琀) Be Extended
Inner Classes
Gathering Your Files
Chapter 5: A Look at XML
XML Isn’t Ordinary Text
What’s in a Namespace?
Book III: The Building Blocks
Chapter 1: Android Activities
All about Activities
The Activity Lifecycle
Getting Results Back from an Activity
Applications Don’t Feel Left Out
Chapter 2: Intents and Intent Filters
How to Make a Match
Practice, Practice, Practice
Activities and Stacks
Chapter 3: Services
A Very Simple Service
Running a Service at Boot Time
Starting and Binding
Talking about the Weather
Getting Real Weather Data
Talking to a Service as if You’re Right Next Door
Chapter 4: Broadcast Receivers
Receivers 101
Beyond the Fundamentals
Standard Broadcasts
Chapter 5: Content Providers
Databases: From the Stone Age to the Present Day
Working with a Database
Creating and Using a Content Provider
Book IV: Programming Cool Phone Features
Chapter 1: Laying Out Your Stuff
Android Layouts
Linear Layout
Attributes ⠀䄀 䐀攀琀漀甀爀)
Using Configuration Qualifiers ⠀䄀渀漀琀栀攀爀 䐀攀琀漀甀爀)
Relative Layout
Table Layout
Grid Layout
Frame Layout
Using a ScrollView
Defining a Layout in Java Code
Chapter 2: Menus, Lists, and Notifications
All about Menus
Creating an Options Menu
Creating a Context Menu
More Stuff about Lists
Creating a Pop-Up Menu
Notifying the User
Chapter 3: An Android Potpourri
Making Phone Calls
Sending a Text Message
Working with Device Sensors
Drawing, Dragging, and Zooming
On the Importance of Waiting Patiently
Chapter 4: An Android Social Media App
The Twitter App’s Files
How to Talk to the Twitter Server
The Application’s Main Activity
Chapter 5: Hungry Burds: A Simple Android Game
Introducing the Hungry Burds Game
The Project’s Files
The Main Activity
Chapter 6: Going Native
The Native Development Kit
Creating an Application
Book V: Apps for Tablets, Watches, and TV Sets
Chapter 1: Apps for Tablets
What Fragments Can Do for You
Getting the Best of Both Worlds
Chapter 2: Developing for Android Wear
Setting Up Your Testing Environment
Wearable Apps: What’s the Big Deal?
Case Study: A Watch Face
Chapter 3: Developing for Android TV
Getting Started
Running the Skeletal App
Creating a TV App
Book VI: The Job Isn’t Done Until …
Chapter 1: Publishing Your App to the Google Play Store
Creating a Google Play Developer Account
Preparing Your Code
Preparing Graphic Assets for the Play Store
Creating a Publishable APK File
More Testing
Publishing Your App
Publishing Elsewhere
Chapter 2: Monetizing and Marketing Your App
Choosing a Revenue Model
Marketing Your Application
About the Author
Cheat Sheet
Advertisement Page
Connect with Dummies
End User License Agreement
Android™ Application Development All-in-One For Dummies®, 2nd Edition Published by: John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030-5774, www.wiley.com Copyright © 2015 by John Wiley & Sons, Inc., Hoboken, New Jersey Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the Publisher. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions. Trademarks: Wiley, For Dummies, the Dummies Man logo, Dummies.com, Making Everything Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and may not be used without written permission. Android is a trademark of Google, Inc. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
For general information on our other products and services, please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572- 4002. For technical support, please visit www.wiley.com/techsupport. Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com. Library of Congress Control Number: 2014958471 ISBN: 978-1-118-97380-6; 978-1-118-97385-1 (ebk); 978-1-118-97384-4 (ebk)
Android App Development All-in-One For Dummies Visit www.dummies.com/cheatsheet/androidappdevelopmentaio to view this book's cheat sheet. Table of Contents Cover Introduction How to Use This Book Conventions Used in This Book What You Don’t Have to Read Foolish Assumptions How This Book Is Organized More on the Web! Icons Used in This Book Beyond the Book Where to Go from Here Book I: Getting Started with Android Application Development Chapter 1: All about Android The Consumer Perspective The Developer Perspective The Business Perspective Chapter 2: Installing the Software Tools Installing Oracle’s Java Development Kit Adding Apple’s Java to the Stew The Many Faces of Java (for Inquiring Readers Only) Setting Up the Software Launching the Android Studio IDE Fattening Up the Android SDK Chapter 3: Creating an Android App Creating Your First App Running Your App You Can Download All the Code What If … Testing Apps on a Real Device
Chapter 4: Examining a Basic Android App A Project’s Files What Did I Agree To? Chapter 5: Conjuring and Embellishing an Android App Dragging, Dropping, and Otherwise Tweaking an App A Bit of Debugging Chapter 6: Improving Your App Improving the Layout Starting Another Activity Localizing Your App Responding to Check Box Events Displaying Images Sending in Your Order Book II: Android Background Material Chapter 1: Using Android Studio Don’t Read This Chapter The Big Picture The Things You Can Do Chapter 2: It’s Java! From Development to Execution with Java Grasping Java Code Chapter 3: What Java Does (and When) Making Decisions (Java if Statements) Repeating Instructions Over and Over Again Jumping Away from Trouble Chapter 4: Object-Oriented Programming in Java Static Fields and Methods Interfaces and Callbacks Classes That Must (and Must Not) Be Extended Inner Classes Gathering Your Files Chapter 5: A Look at XML XML Isn’t Ordinary Text What’s in a Namespace? Book III: The Building Blocks Chapter 1: Android Activities All about Activities
The Activity Lifecycle Getting Results Back from an Activity Applications Don’t Feel Left Out Chapter 2: Intents and Intent Filters How to Make a Match Practice, Practice, Practice Activities and Stacks Chapter 3: Services A Very Simple Service Running a Service at Boot Time Starting and Binding Talking about the Weather Getting Real Weather Data Talking to a Service as if You’re Right Next Door Chapter 4: Broadcast Receivers Receivers 101 Beyond the Fundamentals Standard Broadcasts Chapter 5: Content Providers Databases: From the Stone Age to the Present Day Working with a Database Creating and Using a Content Provider Book IV: Programming Cool Phone Features Chapter 1: Laying Out Your Stuff Android Layouts Linear Layout Attributes (A Detour) Using Configuration Qualifiers (Another Detour) Relative Layout Table Layout Grid Layout Frame Layout Using a ScrollView Defining a Layout in Java Code Chapter 2: Menus, Lists, and Notifications All about Menus Creating an Options Menu Creating a Context Menu
More Stuff about Lists Creating a Pop-Up Menu Notifying the User Chapter 3: An Android Potpourri Making Phone Calls Sending a Text Message Working with Device Sensors Drawing, Dragging, and Zooming On the Importance of Waiting Patiently Chapter 4: An Android Social Media App The Twitter App’s Files How to Talk to the Twitter Server The Application’s Main Activity Chapter 5: Hungry Burds: A Simple Android Game Introducing the Hungry Burds Game The Project’s Files The Main Activity Chapter 6: Going Native The Native Development Kit Creating an Application Book V: Apps for Tablets, Watches, and TV Sets Chapter 1: Apps for Tablets What Fragments Can Do for You Getting the Best of Both Worlds Chapter 2: Developing for Android Wear Setting Up Your Testing Environment Wearable Apps: What’s the Big Deal? Case Study: A Watch Face Chapter 3: Developing for Android TV Getting Started Running the Skeletal App Creating a TV App Book VI: The Job Isn’t Done Until … Chapter 1: Publishing Your App to the Google Play Store Creating a Google Play Developer Account Preparing Your Code Preparing Graphic Assets for the Play Store Creating a Publishable APK File
分享到:
收藏