Cover by Reto Meier

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 14

Invading the Home Screen

What's in this Chapter?

Creating home screen Widgets

Creating collection-based home screen Widgets

Using Content Providers to populate Widgets

Surfacing search results to the Quick Search Box

Creating Live Wallpaper

Widgets, Live Wallpaper, and the Quick Search Box (QSB) let you populate 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 exciting innovations for users and developers:

  • 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 home screen Widget or Live Wallpaper increases user engagement, decreasing the chance that an application will be uninstalled and increasing the likelihood of its being used. With such power comes responsibility. Widgets run constantly as subprocesses of the home screen, so you need to be particularly careful when creating them to ensure they remain responsive and don't drain system resources.

This chapter demonstrates how to create and use App Widgets and Live Wallpaper, detailing what they are, how to use them, and some techniques for incorporating interactivity into these application components. The chapter also describes how to surface search results from your application through the QSB.

Introducing Home Screen Widgets

Home screen Widgets, more properly AppWidgets, are visual ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required