Book description
Pro Android 2 shows you how to build real-world and fun mobile applications using Google's latest Android SDK. This new edition is fully updated for Android 2, covering everything from the fundamentals of building applications for embedded devices to advanced concepts such as custom 3D components, OpenGL, and touchscreens including gestures. While other Android development guides simply discuss topics, Pro Android 2 offers the combination of expert insight and real sample applications that work.
Discover the design and architecture of the Android SDK through practical examples, and how to build mobile applications using the Android SDK.
Explore and use the Android APIs, including those for media and Wi-Fi.
Learn about Android 2's integrated local and web search, handwriting gesture UI, Google Translate, and text-to-speech features.
Pro Android 2 dives deep, providing you with all the knowledge and techniques you need to build mobile applications ranging from games to Google apps, including add-ons to Google Docs. You'll be able to extend and run the new Google Chrome APIs on the G1, the G2, and other next-generation Google phones and Android-enabled devices.
Table of contents
- Copyright
- About the Authors
- About the Technical Reviewer
- Acknowledgments
- Foreword
-
1. Introducing the Android Computing Platform
- 1.1. A New Platform for a New Personal Computer
- 1.2. History of Android
- 1.3. Delving into the Dalvik VM
- 1.4. Comparing Android and Java ME
- 1.5. Understanding the Android Software Stack
- 1.6. Developing an End-User Application with the Android SDK
- 1.7. Taking Advantage of Android Source Code
- 1.8. Summary
-
2. Getting Your Feet Wet
- 2.1. Setting Up Your Environment
- 2.2. Learning the Fundamental Components
- 2.3. Hello World!
- 2.4. Android Virtual Devices
- 2.5. Exploring the Structure of an Android Application
- 2.6. Analyzing the Notepad Application
- 2.7. Loading and Running the Notepad Application
- 2.8. Examining the Application Lifecycle
- 2.9. Debugging Your App
- 2.10. Summary
-
3. Using Resources, Content Providers, and Intents
-
3.1. Understanding Resources
- 3.1.1. String Resources
- 3.1.2. Layout Resources
- 3.1.3. Resource-Reference Syntax
- 3.1.4. Defining Your Own Resource IDs for Later Use
- 3.1.5. Compiled and Noncompiled Android Resources
- 3.1.6. Enumerating Key Android Resources
- 3.1.7. Working with Arbitrary XML Resource Files
- 3.1.8. Working with Raw Resources
- 3.1.9. Working with Assets
- 3.1.10. Reviewing the Resources Directory Structure
-
3.2. Understanding Content Providers
- 3.2.1. Exploring Android's Built-in Providers
- 3.2.2. Architecture of Content Providers
-
3.2.3. Implementing Content Providers
- 3.2.3.1. Planning a Database
- 3.2.3.2. Extending ContentProvider
- 3.2.3.3. Fulfilling MIME-Type Contracts
- 3.2.3.4. Implementing the Query Method
- 3.2.3.5. Implementing an Insert Method
- 3.2.3.6. Implementing an Update Method
- 3.2.3.7. Implementing a Delete Method
- 3.2.3.8. Using UriMatcher to Figure Out the URIs
- 3.2.3.9. Using Projection Maps
- 3.2.3.10. Registering the Provider
-
3.3. Understanding Intents
- 3.3.1. Available Intents in Android
- 3.3.2. Intents and Data URIs
- 3.3.3. Generic Actions
- 3.3.4. Using Extra Information
- 3.3.5. Using Components to Directly Invoke an Activity
- 3.3.6. Best Practice for Component Designers
- 3.3.7. Understanding Intent Categories
- 3.3.8. The Rules for Resolving Intents to Their Components
- 3.3.9. Exercising the ACTION_PICK
- 3.3.10. Exercising the GET_CONTENT Action
- 3.4. Further Resources for This Chapter
- 3.5. Summary
-
3.1. Understanding Resources
-
4. Building User Interfaces and Using Controls
- 4.1. UI Development in Android
- 4.2. Understanding Android's Common Controls
- 4.3. Other Interesting Controls in Android
- 4.4. Understanding Layout Managers
- 4.5. Understanding Adapters
- 4.6. Debugging and Optimizing Layouts with the Hierarchy Viewer
- 4.7. Summary
-
5. Working with Menus and Dialogs
- 5.1. Understanding Android Menus
- 5.2. Working with Other Menu Types
- 5.3. Loading Menus Through XML Files
- 5.4. Using Dialogs in Android
- 5.5. Working with Managed Dialogs
- 5.6. Summary
- 6. Unveiling 2D Animation
-
7. Exploring Security and Location-Based Services
- 7.1. Understanding the Android Security Model
- 7.2. Performing Runtime Security Checks
- 7.3. Working with Location-Based Services
- 7.4. Summary
-
8. Building and Consuming Services
- 8.1. Consuming HTTP Services
-
8.2. Doing Interprocess Communication
- 8.2.1. Creating a Simple Service
- 8.2.2. Understanding Services in Android
- 8.2.3. Understanding Local Services
- 8.2.4. Understanding AIDL Services
- 8.2.5. Defining a Service Interface in AIDL
- 8.2.6. Implementing an AIDL Interface
- 8.2.7. Calling the Service from a Client Application
- 8.2.8. Passing Complex Types to Services
- 8.3. Summary
-
9. Using the Media Framework and Telephony APIs
-
9.1. Using the Media APIs
- 9.1.1.
- 9.1.2. Playing Audio Content
- 9.1.3. Understanding the setDataSource Method
- 9.1.4. Playing Video Content
- 9.1.5. Understanding the MediaPlayer Oddities
- 9.1.6. Exploring Audio Recording
- 9.1.7. Exploring Video Recording
- 9.1.8. Exploring the MediaStore Class
- 9.1.9. Adding Media Content to the Media Store
- 9.2. Using the Telephony APIs
- 9.3. Summary
-
9.1. Using the Media APIs
-
10. Programming 3D Graphics with OpenGL
- 10.1. Understanding the History and Background of OpenGL
- 10.2. Fundamentals of OpenGL
- 10.3. Interfacing OpenGL ES with Android
- 10.4. Braving OpenGL: Shapes and Textures
- 10.5. Summary
- 11. Managing and Organizing Preferences
- 12. Exploring Live Folders
-
13. Home Screen Widgets
- 13.1. Architecture of Home Screen Widgets
- 13.2. A Sample Widget Application
- 13.3. Widget Limitations and Extensions
- 13.4. Resources
- 13.5. Summary
-
14. Android Search
- 14.1. Android Search Experience
- 14.2. Activities and Search Key Interaction
-
14.3. Implementing a Simple Suggestion Provider
- 14.3.1. Planning the Simple Suggestions Provider
- 14.3.2. Simple Suggestions Provider Implementation Files
- 14.3.3. Implementing the SimpleSuggestionProvider class
-
14.3.4. Understanding Simple Suggestions Provider Search Activity
- 14.3.4.1. Responsibilities of a Simple Search Activity
- 14.3.4.2. Complete Source Code of a Search Activity
- 14.3.4.3. Checking the Action and Retrieving the Query
- 14.3.4.4. Understanding onCreate() and onNewIntent()
- 14.3.4.5. How to Test for onNewIntent()
- 14.3.4.6. Saving the Query Using SearchRecentSuggestionsProvider
- 14.3.4.7. Search Metadata
- 14.3.5. Search Invoker Activity
- 14.3.6. Simple Suggestion Provider User Experience
-
14.4. Implementing a Custom Suggestion Provider
- 14.4.1. Planning the Custom Suggestion Provider
- 14.4.2. SuggestURLProvider Project Implementation Files
-
14.4.3. Implementing the SuggestUrlProvider Class
- 14.4.3.1. Responsibilities of a Suggestion Provider
- 14.4.3.2. Overall Source Code for SuggestUrlProvider
- 14.4.3.3. Understanding Suggestion Provider URIs
- 14.4.3.4. Implementing getType() and Specifying MIME Types
- 14.4.3.5. Passing Query to the Suggestion Provider: The Selection Argument
- 14.4.3.6. Exploring Search Metadata for Custom Suggestion Providers
- 14.4.3.7. Suggestion Cursor Columns
- 14.4.3.8. Populating and Returning the List of Columns
-
14.4.4. Implementing a Search Activity for a Custom Suggestion Provider
- 14.4.4.1. Responsibilities of a Search Activity
- 14.4.4.2. Source Code of SearchActivity for a Custom Suggestion Provider
- 14.4.4.3. Details of SearchActivity Invocation
- 14.4.4.4. Responding to ACTION_SEARCH and ACTION_VIEW
- 14.4.4.5. Search Activity Layout
- 14.4.4.6. Corresponding strings.xml
- 14.4.4.7. Responding to onCreate() and onNewIntent()
- 14.4.4.8. Notes on Finishing a Search Activity
- 14.4.5. Custom Suggestions Provider Manifest File
- 14.4.6. Custom Suggestion User Experience
- 14.5. Using Action Keys and Application-Specific Search Data
- 14.6. Resources
- 14.7. Summary
- 15. Exploring Text to Speech and Translate APIs
- 16. Touchscreens
- 17. Titanium Mobile: A WebKit-Based Approach to Android Development
-
18. Working with Android Market
- 18.1. Becoming a Publisher
-
18.2. Preparing Your Application for Sale
- 18.2.1. Testing for Different Devices
- 18.2.2. Supporting Different Screen Sizes
- 18.2.3. Preparing AndroidManifest.xml for Uploading
- 18.2.4. Localizing Your Application
- 18.2.5. Preparing Your Application Icon
- 18.2.6. Considerations for Paid Apps
- 18.2.7. Directing Users Back to the Market
- 18.2.8. Preparing Your .apk File for Uploading
- 18.3. Uploading Your Application
- 18.4. User Experience on Android Market
- 18.5. Summary
- 19. Outlook and Resources
Product information
- Title: Pro Android 2
- Author(s):
- Release date: March 2010
- Publisher(s): Apress
- ISBN: 9781430226598
You might also like
book
Best Android Apps
Great news: the Android Market now has thousands of new apps and games with a lot …
book
The iPhone Pocket Guide, Fifth Edition: Ginormous knowledge, pocket-sized
New Apple iPhone 4 users will want to start using their devices as soon as they …
book
Extending Your Business to Mobile Devices with IBM Worklight
The mobile industry is evolving rapidly. An increasing number of mobile devices, such as smartphones and …
book
Pro Android Media: Developing Graphics, Music, Video, and Rich Media Apps for Smartphones and Tablets
Mobile devices have evolved to focus on rich media production and consumption. Developers of mobile applications …