Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In part 3, you learned about two extremes of the Android platform. Chapter 12 provided the full end-to-end SDK application experience, and chapter 13 went to the other extreme of exploring application techniques that might best fit a custom piece of hardware running the Android operating system. The objective of part 4 is to explore some of the features added to the Android platform that take it a step beyond the other platforms to provide a unique and memorable mobile experience.
In chapter 14, we get close to the metal by interrogating onboard sensors and communicating over Bluetooth. The sensors act as inputs for a navigation system to control a LEGO Mindstorms robot.
In chapter 15, we build a sophisticated integration between the Android contact database and business social networking sensation, LinkedIn. The application constructed in chapter 15 has become a popular download on the Android market. Read along and learn how to get up close and personal with your contacts.
In chapter 16, the topic of Android web development is explored. Topics such as building websites for the WebKit-powered Android browser and custom JavaScript handlers are introduced. In addition, local SQL-based storage concepts are examined, enabling next-generation web applications directly on your mobile device.
Chapter 17 presents a nontrivial example of the AppWidget, tying together other key concepts such as services, alarms, and BroadcastReceivers. There’s something for everyone in chapter 17 as we construct a website monitoring tool that provides near-real-time status information directly to the home page of your Android device.
Chapter 18 circles back to the application constructed in chapter 12, but with a twist. The code in chapter 18 demonstrates the localization of an existing application as the field service application presented in chapter 12 is modified to support multiple languages. The application now supports English and Spanish, depending on the locale of the device.
Chapter 19 looks at the Native Development Kit (NDK). The NDK permits Android developers to incorporate C language source code into SDK applications. Chapter 19 demonstrates the NDK in the context of an image-processing application that allows the user to capture images with the built-in camera and then perform an edge detection algorithm against the image. It’s loads of fun, and you’ll learn about the Java Native Interface as well as how to integrate the NDK build process directly into Eclipse.
Chapter 20 covers an application component called Fragment, introduced in Android 3.0, that lets you modularize an application and its user interface (into fragments). Think of fragments as mini-Activitys: reusable and independent, but related mini portions of the application and screen that can be drawn independently of each other, each receiving its own events and having its own state, application lifecycle, and back stack. Although fragments were introduced in Android 3.0 for tablets, you can use them for the phone as well.
Chapter 21 covers the use of the action bar, introduced in Android 3.0, which is located at the top of the screen and replaces the traditional (pre–Android 3.0) application title. The action bar offers application control by providing navigation options, widgets, and other contextual information, using a consistent approach across applications.
Chapter 22 covers the new drag-and-drop capabilities that are now available in Android 3.0 applications. Drag-and-drop is a natural addition to touch-based user interfaces and tablets, and it uses the clipboard classes to store the data to be transferred between views.