Chapter 8
Turning Your Application into an App Widget
In This Chapter
- Seeing how app widgets work in Android
- Understanding pending intents
- Building an App Widget Provider
- Putting your widget on the Home screen
Usability is the name of the game in application development. When it comes down to it, if your application is not usable, users will not use it. It's that simple.
In Chapter 7, you built the Screen Brightness Toggle application, which works great and is very usable. Unfortunately, if you published the app to the Android Market, the application would not be very popular. Why? In short, because it's not simple enough. Before a user can click the button to change the brightness of the device, he must first go through several awkward steps just to open the app. Unless the user has created a Home screen shortcut to the application, the app is buried in the application launcher with 30 other applications, which means the user must first unlock the device, open the launcher, find the application, and open the app — all before she even gets to the toggle button. This saves the user no time. She might as well just use the settings panel to adjust the screen brightness. So how would you make this application simpler and more usable for the end user? Simple: Turn it into an app widget. That's what I show you how to do in this chapter.
Get Android™ Tablet Application Development For Dummies® 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.