androidpermissionsnfcruntime-permissions

Should I ask for permission before reading or writing NFC?


I know that since Android 6 apps must request permissions before using an Android feature.

I have two different apps. One of the apps writes to and reads from NFC tags. The other just reads tags. In both cases I have included the permission in the manifest file.

Should I also ask for runtime permissions? Is there a difference between reading and writing or is it the same in both cases?

I ask because the Android system will start my app when reading the tag. So should I ask at startup or is NFC different?


Solution

  • No, there is no need to ask for runtime permissions for NFC. The NFC permission has protection level PROTECTION_NORMAL. Consequently, it is not covered by runtime permissions (i.e. the permission is granted at install time and cannot be revoked/granted by the user at runtime). See https://developer.android.com/guide/topics/permissions/overview.html#normal-dangerous