Android Application Development

Android Application Development

Read it now on the O’Reilly learning platform with a 10-day free trial.

O’Reilly members get unlimited access to books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.

Book description

This practical book provides the concepts and code you need to develop software with Android, the open-source platform for cell phones and mobile devices that's generating enthusiasm across the industry. Based on the Linux operating system and developed by Google and the Open Handset Alliance, Android has the potential to unite a fragmented mobile market. Android Application Development introduces this programming environment, and offers you a complete working example that demonstrates Android architectural features and APIs. With this book, you will:

The book is a natural complement to the existing Android documentation provided by Google. Whether you want to develop a commercial application for mobile devices, or just want to create a mobile mashup for personal use, Android Application Development demonstrates how you can design, build, and test applications for the new mobile market.

Show and hide more

Publisher resources

Table of contents Product information

Table of contents

  1. A Note Regarding Supplemental Files
  2. Preface
    1. Audience
    2. How This Book Is Organized
    3. Conventions Used in This Book
    4. Using Code Examples
    5. Safari® Books Online
    6. How to Contact Us
    7. Acknowledgments
      1. Rick Rogers
      2. John Lombardo
      3. Zigurd Mednieks
      4. Blake Meike
      1. 1. Getting to Know Android
        1. Why Android?
        2. The Open Handset Alliance
        3. The Android Execution Environment
        4. Components of an Android Application
        5. Android Activity Lifecycle
        6. Android Service Lifecycle
        7. How This Book Fits Together
        1. Setting Up Your Development Environment
          1. Creating an Android Development Environment
          1. Where We’re Going
          2. Starting a New Android Application: HelloWorld
          3. Writing HelloWorld
          4. Running HelloWorld
          1. MicroJobs: This Book’s Main Sample Application
          2. Android and Social Networking
          3. Downloading the MJAndroid Code
          4. A Brief Tour of the MJAndroid Code
            1. The Project Root Folder (MJAndroid)
            2. The Source Folder (src)
            3. The Resource Folder (res)
            1. A Very Short Tour of the Android SDK/Eclipse IDE
            2. Loading and Starting the Application
            3. Digging a Little Deeper: What Can Go Wrong?
            4. Running an Application on the T-Mobile Phone
              1. Enable USB debugging on your phone
              2. Load the USB driver for ADB
              3. Connecting the phone
              4. Running MicroJobs on the phone
              1. Initialization Parameters in AndroidManifest.xml
              2. Initialization in MicroJobs.java
                1. More Initialization of MicroJobs.java
                1. The Tools
                2. Eclipse Java Editor
                  1. Java Errors
                  2. The Debugger
                  3. Logcat
                    1. Looking at logcat to solve runtime errors
                    2. Writing your own logcat entries
                    1. Trace data collection
                    1. Application Setup in the Manifest File
                    2. Finding the Source to an Interesting Example
                      1. Custom Title Demo
                      2. Linkify Demo
                      1. Test Your Application
                      2. Attach an End User License Agreement If Desired
                      3. Create and Attach an Icon and Label
                      4. Clean Up for Release
                      5. Version Your Application
                      6. Obtaining a Signing Certificate and API Key
                        1. Getting a Signing Certificate for an Application You Are Going to Ship
                          1. Generating a key pair (public and private keys) and a signing certificate
                          1. Getting the MD5 fingerprint of your Debug signing certificate
                          2. Getting a Map API Key from Google
                          1. Signing Up As an Android Developer
                          2. Uploading Your Application
                          1. 8. Persistent Data Storage: SQLite Databases and Content Providers
                            1. Databases
                              1. Basic Structure of the MicroJobsDatabase Class
                              2. Reading Data from the Database
                              3. Modifying the Database
                                1. Inserting data into the database
                                2. Updating data already in the database
                                3. Deleting data in the database
                                1. Introducing NotePad
                                  1. Activities
                                  2. Database
                                  3. Structure of the source code
                                  1. Implementing a content provider
                                    1. Extend ContentProvider
                                    2. NotePadProvider class and instance variables
                                    3. Define CONTENT_URI
                                    4. Create the data storage
                                    5. Create the column names
                                    6. Supporting binary data
                                    7. Declare column specification strings
                                    8. Implement the Cursor
                                    9. Create data (insert)
                                    10. Read/select data (query)
                                    11. Update data
                                    12. Delete data
                                    13. Updating AndroidManifest.xml
                                    14. Define MIME types
                                    1. Create data (insert)
                                    2. Read/query data
                                    3. Update data
                                    4. Delete data
                                    1. Location-Based Services
                                    2. Mapping
                                    3. The Google Maps Activity
                                    4. The MapView and MapActivity
                                    5. Working with MapViews
                                      1. MapView and MyLocationOverlay Initialization
                                      2. Pausing and Resuming a MapActivity
                                      3. Controlling the Map with Menu Buttons
                                      4. Controlling the Map with the KeyPad
                                      1. The Manifest and Layout Files
                                      2. Connecting to a Location Provider and Getting Location Updates
                                      3. Updating the Emulated Location
                                        1. Using geo to update location
                                        2. Using DDMS to update location
                                        1. Android GUI Architecture
                                          1. The Model
                                          2. The View
                                          3. The Controller
                                          4. Putting It Together
                                          1. Listening to the Model
                                          2. Listening for Touch Events
                                          3. Listening for Key Events
                                          4. Alternative Ways to Handle Events
                                          5. Advanced Wiring: Focus and Threading
                                          1. Android Views
                                            1. TextView and EditText
                                            2. Button and ImageButton
                                            3. Adapters and AdapterViews
                                            4. CheckBoxes, RadioButtons, and Spinners
                                            1. Gallery and GridView
                                            2. ListView and ListActivity
                                            3. ScrollView
                                            4. TabHost
                                            1. Frame Layout
                                            2. LinearLayout
                                            3. TableLayout
                                            4. AbsoluteLayout
                                            5. RelativeLayout
                                            1. Rolling Your Own Widgets
                                              1. Layout
                                                1. Measurement
                                                2. Arrangement
                                                1. Drawing text
                                                2. Matrix transformations
                                                1. Shadows, Gradients, and Filters
                                                2. Animation
                                                  1. Transition animation
                                                  2. Background animation
                                                  3. Surface view animation
                                                  1. Intents: Simple, Low-Overhead IPC
                                                    1. Intent Objects Used in Inter-Process Communication
                                                    2. Activity Objects and Navigating the User Interface Hierarchy
                                                    3. Example: An Intent to Pick How We Say “Hello World”
                                                    4. Getting a Result via Inter-Process Communication
                                                    1. Android Interface Definition Language
                                                    2. Classes Underlying AIDL-Generated Interfaces
                                                      1. Implementing the Stub interface
                                                      2. Getting an instance of the remote Proxy object
                                                      1. Quick and Easy Phone Calls
                                                        1. Creating an Example Application to Run the call Method
                                                        2. Embedding the Code Snippet in a Simple Application
                                                        1. Creating an Instance of an Intent
                                                        2. Adding Data to an Instance of an Intent
                                                        3. Initiating a Phone Call
                                                        1. Operations Offered by the android.telephony Package
                                                          1. Package Summary
                                                          2. Limitations on What Applications Can Do with the Phone
                                                          3. Example: Determining the State of a Call
                                                          1. Inter-Process Communication and AIDL in the android.internal.telephony Package
                                                          2. The android.internal.telephony Package
                                                          3. The android.internal.telephony.gsm Package
                                                          4. Exploring Android Telephony Internals
                                                          1. Prehistory
                                                          2. The Dawn of Second Generation (2G) Digital Cellular
                                                          3. Improved Digital Cellular (2.5G)
                                                          4. The Rise of 3G
                                                          5. The Future: 4G
                                                          Show and hide more

                                                          Product information

                                                          • Title: Android Application Development
                                                          • Author(s): Rick Rogers, John Lombardo, Zigurd Mednieks, G. Blake Meike
                                                          • Release date: May 2009
                                                          • Publisher(s): O'Reilly Media, Inc.
                                                          • ISBN: 9780596521479

                                                          You might also like

                                                          Check it out now on O’Reilly

                                                          Dive in for free with a 10-day trial of the O’Reilly learning platform—then explore all the other resources our members count on to build skills and solve problems every day.