Android: Permissions ARE Case Sensitive!

In my foray into the Android development world, I’ve been getting my feet wet in using different components to solve my tasks. It’s pretty common knowledge that in order to do useful things within an app, one needs to request permissions to do so. This includes everything from accessing the end user’s contacts to allowing the app to access the internet.

These permissions can be requested by adding a “uses-permission” clause to the project’s AndroidManifest.xml file. 90% of the time, this is a relatively simple and straightforward task. 90% of the time.

The Thing about Permissions in Android

An Android permission usually looks like this:

permissionThis works (yay!). But sometimes, AutoComplete in Android Studio can format your permission like this:

badpermissionThis does not work. You’ll instead receive a java.lang.SecurityException error detailing that you’re missing the right permission. It’s an interesting little bug that can cause minutes of headache. You can find more info on it here.

Happy Hacking!



Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *