In This Chapter
Seeing how app widgets work in Android
Understanding remote views and pending intents
Building an AppWidgetProvider
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: