Book description
Android continues to be one of the leading mobile OS and development platforms driving today's mobile innovations and the apps ecosystem. Android appears complex, but offers a variety of organized development kits to those coming into Android with differing programming language skill sets.
Android Recipes: A Problem-Solution Approach, Third Edition offers more than 100 down-to-earth code recipes, and guides you step-by-step through a wide range of useful topics using complete and real-world working code examples. It's updated to include the KitKat Android 4.4 SDK as well as earlier releases.
Instead of abstract descriptions of complex concepts, in Android Recipes, you'll find live code examples. When you start a new project you can consider copying and pasting the code and configuration files from this book and then modifying them for your own customization needs.
Crammed with insightful instruction and helpful examples, this third edition of Android Recipes is your guide to writing apps for one of today's hottest mobile platforms. It offers pragmatic advice that will help you get the job done quickly and well. This can save you a great deal of work over creating a project from scratch!
What you'll learn
Use external libraries to save time and effort
Boost app performance by using the Android NDK and Renderscript
Design apps for performance, responsiveness, and seamlessness
Send data between devices and other external hardware
Persist application data and share it between applications
Capture and play back various device media items
Communicate with web services
Get the most out of your user interface
Develop a unit conversion app in the context of the command-line/Android SDK and Eclipse/Android SDK environments
Who this book is for
This book is a handy reference for all Android app developers.
Table of contents
- Title Page
- Contents at a Glance
- Contents
- Foreword
- About the Authors
- About the Technical Reviewer
- Acknowledgments
- Introduction
-
Chapter 1: Getting Started with Android
- 1-1. What Is Android?
- 1-2. Exploring the History of Android
- 1-3. Installing the Android SDK
- 1-4. Installing an Android Platform
- 1-5. Creating an Android Virtual Device
- 1-6. Starting the AVD
- 1-7. Migrating to Eclipse
- 1-8. Creating Java Library JARs
- 1-9. Creating Android Library Projects
- 1-10. Using Core Libraries in Applications
- Summary
-
Chapter 2: Views, Graphics, and Drawing
- 2-1. Customizing the Window
- 2-2. Creating and Displaying Views
- 2-3. Animating a View
- 2-4. Animating Layout Changes
- 2-5. Creating Drawables as Backgrounds
- 2-6. Creating Custom State Drawables
- 2-7. Applying Masks to Images
- 2-8. Drawing over View Content
- 2-9. Implementing Situation-Specific Layouts
- 2-10. Customizing AdapterView Empty Views
- 2-11. Customizing ListView Rows
- 2-12. Making ListView Section Headers
- 2-13. Creating Compound Controls
- 2-14. Customizing Transition Animations
- 2-15. Creating View Transformations
- 2-16. High-Performance Drawing
- Summary
-
Chapter 3: User Interaction Recipes
- 3-1. Leveraging the Action Bar
- 3-2. Locking Activity Orientation
- 3-3. Performing Dynamic Orientation Locking
- 3-4. Manually Handling Rotation
- 3-5. Creating Pop-up Menu Actions
- 3-6. Displaying a User Dialog
- 3-7. Customizing Menus and Actions
- 3-8. Customizing BACK Behavior
- 3-9. Emulating the HOME Button
- 3-10. Monitoring TextView Changes
- 3-11. Customizing Keyboard Actions
- 3-12. Dismissing the Soft Keyboard
- 3-13. Handling Complex Touch Events
- 3-14. Forwarding Touch Events
- 3-15. Blocking Touch Thieves
- 3-16. Making Drag-and-Drop Views
- 3-17. Building a Navigation Drawer
- 3-18. Swiping Between Views
- 3-19. Creating Modular Interfaces
- Summary
-
Chapter 4: Communications and Networking
- 4-1. Displaying Web Information
- 4-2. Intercepting WebView Events
- 4-3. Accessing WebView with JavaScript
- 4-4. Downloading an Image File
- 4-5. Downloading Completely in the Background
- 4-6. Accessing a REST API
- 4-7. Parsing JSON
- 4-8. Parsing XML
- 4-9. Receiving SMS
- 4-10. Sending an SMS Message
- 4-11. Communicating over Bluetooth
- 4-12. Querying Network Reachability
- 4-13. Transferring Data with NFC
- 4-14. Connecting over USB
- Summary
-
Chapter 5: Interacting with Device Hardware and Media
- 5-1. Integrating Device Location
- 5-2. Mapping Locations
- 5-3. Annotating Maps
- 5-4. Monitoring Location Regions
- 5-5. Capturing Images and Video
- 5-6. Making a Custom Camera Overlay
- 5-7. Recording Audio
- 5-8. Capturing Custom Video
- 5-9. Adding Speech Recognition
- 5-10. Playing Back Audio/Video
- 5-11. Playing Sound Effects
- 5-12. Creating a Tilt Monitor
- 5-13. Monitoring Compass Orientation
- 5-14. Retrieving Metadata from Media Content
- 5-15. Detecting User Motion
- Summary
-
Chapter 6: Persisting Data
- 6-1. Making a Preference Screen
- 6-2. Displaying Custom Preferences
- 6-3. Persisting Simple Data
- 6-4. Reading and Writing Files
- 6-5. Using Files as Resources
- 6-6. Managing a Database
- 6-7. Querying a Database
- 6-8. Backing Up Data
- 6-9. Sharing Your Database
- 6-10. Sharing Your SharedPreferences
- 6-11. Sharing Your Other Data
- Summary
-
Chapter 7: Interacting with the System
- 7-1. Notifying from the Background
- 7-2. Creating Timed and Periodic Tasks
- 7-3. Scheduling a Periodic Task
- 7-4. Creating Sticky Operations
- 7-5. Running Persistent Background Operations
- 7-6. Launching Other Applications
- 7-7. Launching System Applications
- 7-8. Letting Other Applications Launch Your Application
- 7-9. Interacting with Contacts
- 7-10. Reading Device Media and Documents
- 7-11. Saving Device Media and Documents
- 7-12. Reading Messaging Data
- 7-13. Interacting with the Calendar
- 7-14. Logging Code Execution
- 7-15. Creating a Background Worker
- 7-16. Customizing the Task Stack
- 7-17. Implementing AppWidgets
- 7-18. Supporting Restricted Profiles
- Summary
- Chapter 8: Working with Android NDK and RenderScript
- Index
Product information
- Title: Android Recipes: A Problem-Solution Approach, Third Edition
- Author(s):
- Release date: February 2014
- Publisher(s): Apress
- ISBN: 9781430263227
You might also like
book
Android Recipes: A Problem-Solution Approach for Android 5.0, Fourth Edition
Android Recipes, Fourth Edition offers more than 100 down-to-earth code recipes, and guides you step-by-step through …
book
Android Application Development Cookbook - Second Edition
Over 100 recipes to help you solve the most common problems faced by Android Developers today …
book
Android 9 Development Cookbook - Third Edition
Build feature-rich, reliable Android Pie apps with the help of more than 100 proven industry standard …
book
Learn Android Studio 3: Efficient Android App Development
Build Android apps using the popular and efficient Android Studio 3 suite of tools, an integrated …