Apress

Beginning Android 2

By Mark Murphy

Beginning Android 2 Cover Image

Learn how to develop applications for Android 2 mobile devices, using simple examples that are ready to run with your copy of the software development kit.

Full Description

  • ISBN13: 978-1-4302-2629-1
  • User Level: Intermediate to Advanced
  • Publication Date: March 18, 2010
  • Available eBook Formats: EPUB, MOBI, PDF
  • Print Book Price: $44.99
  • eBook Price: $31.99
Buy eBook Buy Print Book Add to Wishlist

Related Titles

Full Description

The Android development platform, created by Google and the Open Handset Alliance, is a platform in its truest sense, encompassing hundreds of classes beyond the traditional Java classes and open source components that ship with the SDK.

With Beginning Android 2, you’ll learn how to develop applications for Android 2.x mobile devices, using simple examples that are ready to run with your copy of the software development kit. Author, Android columnist, writer, developer, and community advocate Mark L. Murphy will show you what you need to know to get started programming Android applications, including how to craft graphical user interfaces, use GPS, and access web services.

What you’ll learn

  • Discover Android and how to use it to build Java-based mobile applications for a wide range of phones and other devices.
  • Create user interfaces using both the Android widget framework and the built-in WebKit-powered Web browser components.
  • Utilize the distinctive capabilities of the Android engine, including location tracking, maps, and Internet access.
  • Use and create Android applications incorporating activities, services, content providers, and broadcast receivers.
  • Support Android 1.5, 1.6, and 2.0 devices, including dealing with multiple Android OS versions, multiple screen sizes, and other device-specific characteristics.

Who this book is for

This book is aimed at people new to mobile development, but with some knowledge of Java.

Table of Contents

Table of Contents

  1. The Big Picture
  2. Projects & Targets
  3. Creating a Skeleton Application
  4. Using XML-Based Layouts
  5. Employing Basic Widgets
  6. Working with Containers
  7. Using Selection Widgets
  8. Getting Fancy With Lists
  9. Employing Fancy Widgets and Containers
  10. The Input Method Framework
  11. Applying Menus
  12. Fonts
  13. Embedding the WebKit Browser
  14. Showing Pop-Up Messages
  15. Dealing with Threads
  16. Handling Activity Lifecycle Events
  17. Creating Intent Filters
  18. Launching Activities and Sub-Activities
  19. Handling Rotation
  20. Working with Resources
  21. Using Preferences
  22. Managing and Accessing Local Databases
  23. Accessing Files
  24. Leveraging Java Libraries
  25. Communicating via the Internet
  26. Using a Content Provider
  27. Building a Content Provider
  28. Requesting and Requiring Permissions
  29. Creating a Service
  30. Invoking a Service
  31. Alerting Users Via Notifications
  32. Accessing Location-Based Services
  33. Mapping with MapView and MapActivity
  34. Handling Telephone Calls
  35. Development Tools
  36. Handling Multiple Screen Sizes
  37. Dealing with Devices
  38. Handling Platform Changes
  39. Where Do We Go From Here?

Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.

Errata

If you think that you've found an error in this book, please let us know about it. You will find any confirmed erratum below, so you can check if your concern has already been addressed.

* Required Fields

On page 94:
This was found in the electronic version found on springerlink.com. In the sample code under "Adapting Other Adapters", the first line of "public View newView()" is:

LayoutInflater inflater=context.getLayoutInflater();

The class Context doesn't have a method getLayoutInflater(). The class Activity, which is an indirect subclass of Context, does. Therefore, the variable "context" should be cast to Activity before calling getLayoutInflater().