I'm integrating an SDK and it requires I put this:
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION"
android:required="false" />
I understand android:required="false"
on a uses-feature
, but I can't understand the meaning on a permission. It's not listed in the docs as a attribute.
Is it similar to requires
on a uses-feature
? Where permissions imply features as listed here, then those features are not required?
Specifies a system permission that the user must grant in order for the app to operate correctly. Permissions are granted by the user when the application is installed (on devices running Android 5.1 and lower) or while the app is running (on devices running Android 6.0 and higher).
What is difference between permission and uses-permission in Android? permission is normally used when making a custom permission e.g. when making an app that other apps can tie in to, limiting access is a must. uses-permission is used when your app actually needs a permission it doesn't have normally.
These permissions are not inherently dangerous, but have the potential for misuse. That's why Android gives you the opportunity to accept or refuse them. Some apps need these permissions. In those cases, check that an app is safe before you install it, and make sure the app comes from a reputable developer.
As you say, according to the documentation, it isn't a valid attribute in a <uses-permission>
tag. It goes on to say (emphasis mine):
To control filtering, always explicitly declare hardware features in elements, rather than relying on Google Play to "discover" the requirements in elements. Then, if you want to disable filtering for a particular feature, you can add a
android:required="false"
attribute to the declaration.
I would suggest your SDK documentation might be wrong, and you should include a <uses-feature>
tag for any implied features.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With