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 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.