Book description
Android continues to be one of the two 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 guides you step by step through a wide range of useful topics using complete and real-world working code examples.
In this book, you quickly get a refresh of Android architecture and app fundamentals, and then you get down to business and build an app with Google's Android SDK at the command line and Eclipse in an IDE context. Then you'll learn how to accomplish practical tasks pertaining to the user interface, communications with the cloud, device hardware, data persistence, communications between applications, and interacting with Android itself. Finally, you'll learn how to leverage various libraries and Scripting Layer for Android to help you perform tasks more quickly; how to use the Android NDK to boost app performance; and how to design apps for performance, responsiveness, seamlessness, and more.
Instead of abstract descriptions of complex concepts, you find live code examples in this book. 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. This can save you a great deal of work over creating a project from scratch!
What you'll learn
Discover Android architecture and various Android-specific APIs.
How to develop a Units Converter app in the context of command-line/Android SDK and Eclipse/Android SDK environments.
How to accomplish various tasks related to the user interface and more.
How to use external libraries to save time and effort.
How to quickly develop an app using the Scripting Layer 4 Android tool.
How to boost app performance by using the Android NDK.
Guidelines for designing filtered apps, performant apps, responsive apps, and seamless apps.
Who this book is for
Newcomers to Android as well as more accomplished Android developers.
Table of contents
- Copyright
- Foreword
- About the Authors
- About the Technical Reviewer
- Acknowledgments
- Preface
-
1. Getting Started with Android
- 1.1. What Is Android?
- 1.2. History of Android
- 1.3. Android Architecture
- 1.4. App Architecture
- 1.5. Activities in Depth
- 1.6. Services in Depth
- 1.7. Broadcast Receivers in Depth
-
1.8. Content Providers in Depth
- 1.8.1. 1-1. Installing the Android SDK
- 1.8.2. 1-2. Installing an Android Platform
- 1.8.3. 1-3. Creating an Android Virtual Device
- 1.8.4. 1-4. Starting the AVD
- 1.8.5. 1-5. Introducing UC
- 1.8.6. 1-6. Creating UC
- 1.8.7. 1-7. Installing and Running UC
- 1.8.8. 1-8. Preparing UC for Publishing
- 1.8.9. 1-9. Migrating to Eclipse
- 1.8.10. 1-10. Developing UC with Eclipse
- 1.9. Summary
-
2. User Interface Recipes
-
2.1.
- 2.1.1. 2-1. Customizing the Window
- 2.1.2. 2-2. Creating and Displaying Views
- 2.1.3. 2-3. Monitoring Click Actions
- 2.1.4. 2-4. Resolution-Independent Assets
- 2.1.5. 2-5. Locking Activity Orientation
- 2.1.6. 2-6. Dynamic Orientation Locking
- 2.1.7. 2-7. Manually Handling Rotation
- 2.1.8. 2-8. Creating Pop-Up Menu Actions
- 2.1.9. 2-9. Customizing Options Menu
- 2.1.10. 2-10. Customizing Back Button
- 2.1.11. 2-11. Emulating the Home Button
- 2.1.12. 2-12. Monitoring Textview Changes
- 2.1.13. 2-13. Scrolling TextView Ticker
- 2.1.14. 2-14. Animating a View
- 2.1.15. 2-15. Creating Drawables as Backgrounds
- 2.1.16. 2-16. Creating Custom State Drawables
- 2.1.17. 2-17. Applying Masks to Images
- 2.1.18. 2-18. Creating Dialogs that Persist
- 2.1.19. 2-19. Implementing Situation-Specific Layouts
- 2.1.20. 2-20. Customizing Keyboard Actions
- 2.1.21. 2-21. Dismissing Soft Keyboard
- 2.1.22. 2-22. Customizing AdapterView Empty Views
- 2.1.23. 2-23. Customizing ListView Rows
- 2.1.24. 2-24. Making ListView Section Headers
- 2.1.25. 2-25. Creating Compound Controls
- 2.2. Useful Tools to Know: DroidDraw
- 2.3. Summary
-
2.1.
-
3. Communications and Networking
-
3.1.
- 3.1.1. 3-1. Displaying Web Information
- 3.1.2. 3-2. Intercepting WebView Events
- 3.1.3. 3-3. Accessing WebView with JavaScript
- 3.1.4. 3-4. Downloading an Image File
- 3.1.5. 3-5. Downloading Completely in the Background
- 3.1.6. 3-6. Accessing a REST API
- 3.1.7. 3-7. Parsing JSON
- 3.1.8. 3-8. Parsing XML
- 3.1.9. 3-8. Receiving SMS
- 3.1.10. 3-9. Sending an SMS Message
- 3.1.11. 3-10. Communicating over Bluetooth
- 3.1.12. 3-11. Querying Network Reachability
- 3.2. Summary
-
3.1.
-
4. Interacting with Device Hardware and Media
-
4.1.
- 4.1.1. 4-1. Integrating Device Location
- 4.1.2. 4-2. Mapping Locations
- 4.1.3. 4-3. Annotating Maps
- 4.1.4. 4-4. Capturing Images and Video
- 4.1.5. 4-5. Making a Custom Camera Overlay
- 4.1.6. 4-6. Recording Audio
- 4.1.7. 4-7. Adding Speech Recognition
- 4.1.8. 4-8. Playing Back Audio/Video
- 4.1.9. 4-9. Creating a Tilt Monitor
- 4.1.10. 4-10. Monitoring Compass Orientation
- 4.2. Useful Tools to Know: SensorSimulator
- 4.3. Summary
-
4.1.
-
5. Persisting Data
-
5.1.
- 5.1.1. 5-1. Making a Preference Screen
- 5.1.2. 5-2. Persisting Simple Data
- 5.1.3. 5-3. Reading and Writing Files
- 5.1.4. 5-4. Using Files as Resources
- 5.1.5. 5-5. Managing a Database
- 5.1.6. 5-6. Querying a Database
- 5.1.7. 5-7. Backing Up Data
- 5.1.8. 5-8. Sharing Your Database
- 5.1.9. 5-9. Sharing Your Other Data
- 5.2. Useful Tools to Know: SQLite3
- 5.3. Summary
-
5.1.
-
6. Interacting with the System
-
6.1.
- 6.1.1. 6-1. Notifying from the Background
- 6.1.2. 6-2. Creating Timed and Periodic Tasks
- 6.1.3. 6-3. Scheduling a Periodic Task
- 6.1.4. 6-4. Creating Sticky Operations
- 6.1.5. 6-5. Running Persistent Background Operations
- 6.1.6. 6-6. Launching Other Applications
- 6.1.7. 6-7. Launching System Applications
- 6.1.8. 6-8. Letting Other Applications Launch Yours
- 6.1.9. 6-9. Interacting with Contacts
- 6.1.10. 6-10. Picking Device Media
- 6.1.11. 6-11. Saving to the MediaStore
- 6.2. Summary
-
6.1.
- 7. Working with Libraries
- A. Scripting Layer for Android
- B. Android NDK
- C. App Design Guidelines
Product information
- Title: Android Recipes: A Problem-Solution Approach
- Author(s):
- Release date: May 2011
- Publisher(s): Apress
- ISBN: 9781430234135
You might also like
book
Android Recipes: A Problem-Solution Approach, Second Edition
Android continues to be one of the leading mobile OS and development platforms driving today's mobile …
book
Android Recipes: A Problem-Solution Approach, Third Edition
Android continues to be one of the leading mobile OS and development platforms driving today's mobile …
book
Android Quick APIs Reference
This condensed code and APIs reference to the new Google Android 5.0 SDK presents the essential …
book
Creating Dynamic UI with Android Fragments
Make your Android apps a superior, silky-smooth experience for the end-user with this comprehensive guide to …