Android Coding Topic: Adding gesture search to your android apps
The new series we have started, Android Case Studies, has proved quite popular, which is nice to see. It has started with a few posts on app development in general but there are other topics in the pipeline, it won’t always be about development… However, I think another useful series would be on hard-core programming issues, diving deeper into development…
The first Android Coding Topic will cover adding gesture search to your android apps. It comes from The official Google Code blog, written by Yang Li, Research Scientist at Google.
Gesture Search from Google Labs now has an API. You can use the API to easily integrate Gesture Search into your Android apps, so your users can gesture to write text and search for application-specific data. For example, a mobile ordering application for a restaurant might have a long list of menu items; with Gesture Search, users can draw letters to narrow their search.Tags: gesture, keyboard shortcuts, pipeline, programming issues, search framework
Another way to use Gesture Search is to enable users to select options using gestures that correspond to specific app functions, like a touch screen version of keyboard shortcuts, rather than forcing hierarchical menu navigation.
In this post, I’ll demonstrate how we can embed Gesture Search (1.4.0 or later) into an Android app that enables a user to find information about a specific country. To use Gesture Search, we first need to create a content provider named
CountryProvider, according to the format required by Android Search framework. This content provider consists of 238 country names.