This video from the Google I/O 2010 shows how to get started with Android Cloud to Device Messaging (C2DM) - a service that helps developers to push data from servers to their applications on Android devices. The service provides a simple and efficient mechanism for servers to notify Android applications that there is new data ready to be fetched from the server. What's more, C2DM manages all aspects of queueing of messages and transmission to the target application.
In order to simplify the development of native Android applications, the Spring community produced Spring Android, an extension of the Spring Framework specifically targeted to Android. This
extension provides a Representational State Transfer (REST) client for Android as well as authentication support for accessing secure APIs. In this blog post, we are going to see how to use
Spring Android to write client code for an Android application that consumes RESTful web services.
Now that we have looked at the REST service, let's see the steps involved to consume it in an Android application using Spring Android's
With data-intensive applications, the ability for users to search for information within an application is an essential feature. Fortunately, Android includes a search framework that helps developers to implement search in their applications and to create a consistent search experience for users. This blog post describes how to implement search functionality using this framework.
Enabling application search using the Android search framework involves the following three steps:
Step 1: Creating a searchable configuration
The first thing that is needed is an XML file called the searchable configuration in the
Step 2: Creating a searchable activity
Next, an activity is needed to perform searches and to display the search results. Usually, this will be a ListView-based activity, but it is possible to use any other user interface. As shown
below, inside the manifest's
When a user performs a search from the search interface, the Android system starts the searchable activity, passing it an
Step 3: Implementing a search interface
The search interface can be implemented using either:
The search dialog (see Figure 1), which by default is always hidden, appears at the top of an activity when the user presses the device's SEARCH button (if available) or when the
In order to enable the search dialog for every activity in an Android application, one can add the above
The search widget, which is available in Android 3.0 and higher, is an instance of
Blog Archive (all posts)