Chapter 10. Invading the Phone-Top

WHAT'S IN THIS CHAPTER?

  • Creating home screen Widgets

  • Implementing Live Folders

  • Adding search to your applications

  • Surfacing search results to the Quick Search Box

  • Creating Live Wallpaper

Widgets, Live Folders, Live Wallpaper, and the Quick Search Box let you own a piece of the user's home screen, providing either a window to your application or a stand-alone source of information directly on the home screen. They're an exciting innovation for users and developers, providing the following:

  • Users get instant access to interesting information without needing to open an application.

  • Developers get an entry point to their applications directly from the home screen.

A useful widget, Live Folder, or dynamic wallpaper decreases the chance that an application will be uninstalled, and increases the likelihood of its being used.

With such power comes responsibility. Widgets run constantly as subprocesses of the home-screen process. You need to be particularly careful when creating widgets to ensure they remain responsive and don't drain system resources.

This chapter demonstrates how to create and use App Widgets, Live Folders, and Live Wallpaper detailing what they are, how to use them, and some techniques for incorporating interactivity into these application components.

It also describes how to integrate the Android search framework into your application and surface search results to the Quick Search Box.

INTRODUCING HOME-SCREEN WIDGETS

Widgets, more properly AppWidgets ...

Get Professional Android™ 2 Application Development now with the O’Reilly learning platform.

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