by jasomill · 13y ago · 0 comments
Not really; this depends on how the OS developer implements denying various permissions. For example, your app already has to handle empty address books, location services reporting valid, fixed locations, and SMS messages not arriving; it also can't assume network and messaging services are available, even in the absence of permission problems.
But I absolutely would still want guaranteed permissions: If my app needs Internet to make money, then I don't want someone to be able to use it if they're blocking Internet for the app
How do you currently handle limited, filtered, or no Internet access for reasons other than lack of permission grants? Why can't you handle permission-based Internet blocking in the same way?
If the OS handles it transparently, then sure, it could work. But as I understand things, that's why the CyanogenMod "feature" of selective permission disabling fails: If I ask whether the Internet has a valid signal, and it unexpectedly throws an error, then my app will either crash or behave in an untested way (depending on whether I'm catching top-level errors and continuing to run anyway). I don't know how the 4.3 feature handles it.
I don't want users to have the ability to disable Internet, though; not if I'm writing an ad-supported app. I don't want to kill the app on devices that simply never connect to the Internet either, so I'd prefer if the OS guaranteed that, IF there's an Internet connection, it will give me full access to it.
Perhaps that's the hardest part to test about the Cyanogen-style permissions disabling: that there's no uniform way Android handles a missing permission. Sometimes the API will throw an exception, while other times it returns a null Object.