Book description
Android Recipes, Fourth 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. This book is updated to include the Android 5.0 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 fourth 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!
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.
Table of contents
- Cover
- Title
- Copyright
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Introduction
-
Chapter 1: Layouts and Views
- 1-1. Styling Common Components
- 1-2. Toggling System UI Elements
- 1-3. Creating and Displaying Views
- 1-4. Animating a View
- 1-5. Animating Layout Changes
- 1-6. Implementing Situation-Specific Layouts
- 1-7. Customizing AdapterView Empty Views
- 1-8. Customizing ListView Rows
- 1-9. Making ListView Section Headers
- 1-10. Creating Compound Controls
- 1-11. Customizing Transition Animations
- 1-12. Creating View Transformations
- 1-13. Making Extensible Collection Views
- Summary
-
Chapter 2: User Interaction Recipes
- 2-1. Leveraging the Action Bar
- 2-2. Locking Activity Orientation
- 2-3. Performing Dynamic Orientation Locking
- 2-4. Manually Handling Rotation
- 2-5. Creating Contextual Actions
- 2-6. Displaying a User Dialog Box
- 2-7. Customizing Menus and Actions
- 2-8. Customizing BACK Behavior
- 2-9. Emulating the HOME Button
- 2-10. Monitoring TextView Changes
- 2-11. Customizing Keyboard Actions
- 2-12. Dismissing the Soft Keyboard
- 2-13. Handling Complex Touch Events
- 2-14. Forwarding Touch Events
- 2-15. Blocking Touch Thieves
- 2-16. Making Drag-and-Drop Views
- 2-17. Building a Navigation Drawer
- 2-18. Swiping Between Views
- 2-19. Navigating with Tabs
- Summary
-
Chapter 3: Communications and Networking
- 3-1. Displaying Web Information
- 3-2. Intercepting WebView Events
- 3-3. Accessing WebView with JavaScript
- 3-4. Downloading an Image File
- 3-5. Downloading Completely in the Background
- 3-6. Accessing a REST API
- 3-7. Parsing JSON
- 3-8. Parsing XML
- 3-9. Receiving SMS
- 3-10. Sending an SMS Message
- 3-11. Communicating over Bluetooth
- 3-12. Querying Network Reachability
- 3-13. Transferring Data with NFC
- 3-14. Connecting over USB
- Summary
-
Chapter 4: Interacting with Device Hardware and Media
- 4-1. Integrating DeviceLocation
- 4-2. Mapping Locations
- 4-3. Annotating Maps
- 4-4. Monitoring Location Regions
- 4-5. Capturing Images and Video
- 4-6. Making a Custom Camera Overlay
- 4-7. Recording Audio
- 4-8. Capturing Custom Video
- 4-9. Adding Speech Recognition
- 4-10. Playing Back Audio/Video
- 4-11. Playing Sound Effects
- 4-12. Creating a Tilt Monitor
- 4-13. Monitoring Compass Orientation
- 4-14. Retrieving Metadata from Media Content
- 4-15. Detecting User Motion
- Summary
-
Chapter 5: Persisting Data
- 5-1. Making a Preference Screen
- 5-2. Displaying Custom Preferences
- 5-3. Persisting Simple Data
- 5-4. Reading and Writing Files
- 5-5. Using Files as Resources
- 5-6. Managing a Database
- 5-7. Querying a Database
- 5-8. Backing Up Data
- 5-9. Sharing Your Database
- 5-10. Sharing Your SharedPreferences
- 5-11. Sharing Your Other Data
- 5-12. Integrating with System Documents
- Summary
-
Chapter 6: Interacting with the System
- 6-1. Notifying from the Background
- 6-2. Creating Timed and Periodic Tasks
- 6-3. Scheduling a Periodic Task
- 6-4. Creating Sticky Operations
- 6-5. Running Persistent Background Operations
- 6-6. Launching Other Applications
- 6-7. Launching System Applications
- 6-8. Letting Other Applications Launch Your Application
- 6-9. Interacting with Contacts
- 6-10. Reading Device Media and Documents
- 6-11. Saving Device Media and Documents
- 6-12. Reading Messaging Data
- 6-13. Interacting with the Calendar
- 6-14. Logging Code Execution
- 6-15. Creating a Background Worker
- 6-16. Customizing the Task Stack
- 6-17. Implementing AppWidgets
- 6-18. Supporting Restricted Profiles
- Summary
- Chapter 7: Graphics and Drawing
- Chapter 8: Working with Android NDK and RenderScript
- Index
Product information
- Title: Android Recipes: A Problem-Solution Approach for Android 5.0, Fourth Edition
- Author(s):
- Release date: February 2015
- Publisher(s): Apress
- ISBN: 9781484204757
You might also like
book
Android Application Development Cookbook - Second Edition
Over 100 recipes to help you solve the most common problems faced by Android Developers today …
book
Beginning Android Wearables
Although wearable devices have existed since the 70s, they have only recently become mainstream. Google Glass …
book
Android UI Fundamentals: Develop and Design
Author Jason Ostrander walks developers through the different choices available on their way to creating a …
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 …