O'Reilly logo

Android™ Tablet Application Development For Dummies® by Donn Felker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Asking the User for Permission

You wouldn't want your next-door neighbor storing his holiday decorations in your storage shed without clearing it through you first, would you? I didn't think so! Android is no different — storing data anywhere on the device requires some sort of permission from the user. But that's not the only thing that requires some sort of permission.

Seeing how permissions affect the user experience

When users install applications from the Android Market, the application's manifest file is inspected for required permissions that the application needs to operate. Anytime your application needs access to sensitive components, such as external storage, access to the Internet, phone device information, and so on, the user is notified that the application would like to access these components. The user decides whether she would like to install the application.

If your application requests a lot of unnecessary permissions, the user may get suspicious and choose not to install the application. Imagine if the Screen Brightness Toggle application (built previously in this book) was requesting your current GPS location, needed access to the Internet, and wanted to know information about the device (such as hardware info). The Screen Brightness Toggle application has no need for those permissions. Users tend to be wary of installing an application that is overzealously requesting permissions.

Through the many different applications that I've published, I've found that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required