<P style="MARGIN: 0px">Want to get started building applications for Android, the world’s hottest, fast-growing mobile platform? Already building Android applications and want to get better at it? This book brings together all the expert guidance–and code–you’ll need! </P> <P style="MARGIN: 0px"> <
The Android Developers Cookbook: Building Applications with the Android SDK
✍ Scribed by James Steele, Nelson To
- Publisher
- Addison Wesley
- Year
- 2010
- Tongue
- English
- Leaves
- 355
- Category
- Library
No coin nor oath required. For personal study only.
✦ Synopsis
Want to get started building applications for Android, the world’s hottest, fast-growing mobile platform? Already building Android applications and want to get better at it? This book brings together all the expert guidance–and code–you’ll need!Completely up-to-date to reflect the newest and most widely used Android SDKs, The Android Developer’s Cookbook is the essential resource for developers building apps for any Android device, from phones to tablets.Proven, modular recipes take you from the absolute basics to advanced location-based services, security techniques, and performance optimization. You’ll learn how to write apps from scratch, ensure interoperability, choose the best solutions for common problems, and avoid development pitfalls. Coverage includes: Implementing threads, services, receivers, and other background tasks Providing user alerts Organizing user interface layouts and views Managing user-initiated events such as touches and gestures Recording and playing audio and video Using hardware APIs available on Android devices Interacting with other devices via SMS, web browsing, and social networking Storing data efficiently with SQLite and its alternatives Accessing location data via GPS Using location-related services such as the Google Maps API Building faster applications with native code Providing backup and restore with the Android Backup Manager Testing and debugging apps throughout the development cycle Turn to The Android Developer’s Cookbook for proven, expert answers–and the code you need to implement them. It’s all you need to jumpstart any Android project, and create high-value, feature-rich apps that sell!
✦ Table of Contents
Table of Contents......Page 7
The Evolution of Android......Page 17
Devices Running Android......Page 18
Samsung Models......Page 22
Other Devices......Page 23
Screens......Page 24
Sensors......Page 25
Features of Android......Page 26
Android Development......Page 27
Designing Applications Well......Page 28
Robustness......Page 29
Installing and Upgrading......Page 30
Software Features and API Level......Page 31
Emulator and Android Device Debug......Page 32
Signing and Publishing......Page 34
Improving App Visibility......Page 35
Charging for an App......Page 36
Managing Reviews and Updates......Page 37
Alternatives to the Android Market......Page 38
Android Application Overview......Page 39
Recipe: Creating a Project and an Activity......Page 40
Directory Structure of Project and Autogenerated Content......Page 42
Android Package and Manifest File......Page 44
Activity Lifecycle......Page 46
Recipe: Utilizing Other Lifecycle Functions......Page 47
Recipe: Forcing Single Task Mode......Page 49
Recipe: Saving and Restoring Activity Information......Page 50
Multiple Activities......Page 51
Recipe: Using Buttons and TextView......Page 52
Recipe: Launching Another Activity from an Event......Page 53
Recipe: Launching an Activity for a Result Using Speech to Text......Page 57
Recipe: Implementing a List of Choices......Page 59
Recipe: Using Implicit Intents for Creating an Activity......Page 60
Recipe: Passing Primitive Data Types Between Activities......Page 62
Recipe: Launching a Secondary Thread......Page 67
Recipe: Creating a Runnable Activity......Page 71
Recipe: Canceling a Thread......Page 73
Messages Between Threads: Handlers......Page 74
Recipe: Scheduling a Runnable Task from the Main Thread......Page 75
Recipe: Using a Countdown Timer......Page 77
Recipe: Handling a Time-Consuming Initialization......Page 78
Services......Page 80
Recipe: Creating a Self-Contained Service......Page 81
Adding a Broadcast Receiver......Page 85
Recipe: Starting a Service When the Camera Button Is Pressed......Page 86
Recipe: Creating an App Widget......Page 88
Recipe: Using Toast to Show a Brief Message on the Screen......Page 90
Recipe: Using an Alert Dialog Box......Page 91
Recipe: Showing Notification in Status Bar......Page 92
Resource Directories and General Attributes......Page 95
Recipe: Specifying Alternate Resources......Page 97
Views and ViewGroups......Page 98
Recipe: Building Layouts in the Eclipse Editor......Page 99
Recipe: Controlling the Width and Height of UI Elements......Page 102
Recipe: Setting Relative Layout and Layout ID......Page 105
Recipe: Declaring a Layout Programmatically......Page 106
Recipe: Updating a Layout from a Separate Thread......Page 108
Text Manipulation......Page 110
Recipe: Setting and Changing Text Attributes......Page 111
Recipe: Providing Text Entry......Page 114
Recipe: Creating a Form......Page 116
Other Widgets: From Buttons to Seek Bars......Page 117
Recipe: Using Image Buttons in a Table Layout......Page 118
Recipe: Using Check Boxes and Toggle Buttons......Page 121
Recipe: Using Radio Buttons......Page 124
Recipe: Creating a Drop-Down Menu......Page 126
Recipe: Using a Progress Bar......Page 128
Recipe: Using a SeekBar......Page 130
Recipe: Intercepting a Physical Key Press......Page 133
Recipe: Building Menus......Page 137
Recipe: Defining Menus in XML......Page 142
Recipe: Utilizing the SEARCH Key......Page 143
Recipe: Reacting to Touch Events......Page 144
Recipe: Listening for Fling Gestures......Page 146
Recipe: Using Multitouch......Page 149
Recipe: Using Gestures......Page 152
Recipe: Drawing 3D Images......Page 156
6 Multimedia Techniques......Page 163
Recipe: Loading an Image for Manipulation......Page 164
Recipe: Choosing and Playing Back Audio Files......Page 170
Recipe: Recording Audio Files......Page 173
Recipe: Manipulating Raw Audio......Page 174
Recipe: Using Sound Resources Efficiently......Page 179
Video......Page 181
Camera......Page 185
Recipe: Customizing the Camera......Page 186
Other Sensors......Page 191
Recipe: Getting a Device’s Rotational Attitude......Page 192
Recipe: Using the Temperature and Light Sensor......Page 195
Telephony......Page 196
Recipe: Utilizing the Telephony Manager......Page 197
Recipe: Listening for Phone States......Page 199
Bluetooth......Page 201
Recipe: Turning on Bluetooth......Page 202
Recipe: Discovering Bluetooth Devices......Page 203
Recipe: Opening a Bluetooth Socket......Page 204
Recipe: Accessing the Wireless Network......Page 207
Using SMS......Page 211
Recipe: Autosend an SMS Based on a Received SMS......Page 213
Recipe: Using an HTTP GET......Page 220
Recipe: Using HTTP POST......Page 225
Recipe: Integrating with Twitter......Page 226
Shared Preferences......Page 237
Recipe: Using the Preferences Framework......Page 238
Recipe: Changing the UI Based on Stored Data......Page 241
Recipe: Adding a EULA......Page 244
Recipe: Creating a Separate Database Package......Page 248
Recipe: Using a Separate Database Package......Page 252
Recipe: Creating a Personal Diary......Page 255
Content Provider......Page 259
Recipe: Creating a Custom Content Provider......Page 260
File Saving and Loading......Page 265
Location Basics......Page 267
Recipe: Retrieving Last Location......Page 269
Recipe: Updating Location Upon Change......Page 270
Recipe: Listing All Enabled Providers......Page 272
Recipe: Translating a Location to Address (Reverse Geocoding)......Page 274
Recipe: Translating an Address to Location (Geocoding)......Page 277
Using Google Maps......Page 279
Recipe: Adding Google Maps to an Application......Page 281
Recipe: Adding Markers on a Map......Page 283
Recipe: Adding Views to a Map......Page 287
Recipe: Setting up a Proximity Alert......Page 290
Recipe: Customizing a Button......Page 293
Android Native Components......Page 299
Recipe: Developing a Native Component......Page 300
Android Security......Page 303
Android Inter-Process Communication......Page 304
Recipe: Implementing a Remote Procedure Call......Page 305
Recipe: Creating a Backup of Runtime Data......Page 310
Recipe: Triggering Backup and Restore......Page 312
Android Animation......Page 314
Recipe: Creating an Animation......Page 315
Recipe: Specifying a Run Configuration......Page 319
Recipe: Using the DDMS......Page 320
Recipe: Debugging Through Breakpoints......Page 322
Recipe: Using LogCat......Page 323
Recipe: Using the Hierarchy Viewer......Page 325
Recipe: Using TraceView......Page 327
Android System Debug Tools......Page 329
Recipe: Setting up GDB Debugging......Page 331
A......Page 333
B......Page 337
C......Page 338
D......Page 340
E......Page 342
G......Page 343
I......Page 344
L......Page 345
M......Page 346
N......Page 347
O......Page 348
Q-R......Page 349
S......Page 350
T......Page 352
U......Page 353
V......Page 354
X-Y-Z......Page 355
📜 SIMILAR VOLUMES
<P style="MARGIN: 0px">Want to get started building applications for Android, the world’s hottest, fast-growing mobile platform? Already building Android applications and want to get better at it? This book brings together all the expert guidance–and code–you’ll need! </P> <P style="MARGIN: 0px"> <
This title goes beyond the basics to show developers not just how to write apps for Android, but how to make their apps great.
2nd Edition. — Addison-Wesley, 2013. — 463 p. — ISBN 978- 0-321-89753-4.<br/>На англ. языке.<br/> <br/>Do you want to get started building apps for Android, today’s number one mobile platform? Are you already building Android apps but want to get better at it? The Android™ Developer’s Cookbook, Seco
Want to get started building applications for Android, the world’s hottest, fast-growing mobile platform? Already building Android applications and want to get better at it? This book brings together all the expert guidance–and code–you’ll need! Completely up-to-date to reflect the newest and m
This edition has been extensively updated to reflect the other Android 4.2.2 releases. You'll find all-new chapters on advanced threading and UI development, in-app billing, push messages, and native development, plus new techniques for everything from accessing NFC hardware to using Google Cloud Me