Chapter 7

Turning Your Application into an App Widget

In This Chapter

arrow Seeing how app widgets work in Android

arrow Understanding remote views and pending intents

arrow Building an AppWidgetProvider

arrow Putting your widget on the Home screen

Usability is the name of the game in regard to all disciplines of ­application development: If your application isn’t easy to use, users simply won’t use it.

If you’ve followed the first six chapters of this book to build the Silent Mode Toggle application, it undoubtedly works well. But it still requires launching an app to use. To make this application even easier to use, simply turn it into a Home screen widget. A Home screen widget allows you to place a view on the user’s Home screen, which they can use to interact with your app without having to open the app.

In this chapter, you build an app widget for your application. An app widget normally is a small icon or tiny view on the Home screen. Users can interact with your application by simply tapping this widget to toggle their phone’s Silent mode. This chapter introduces you to these classes:

  • Intent

Get Android App Development For Dummies, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.