I am trying to get NFC permission at real time, I am able to get any permission except this one, the only way I am able to achieve this permission is by opening the wireless settings of the phone and asking the user to turn it on, is there a way of asking for this permission in runtime from the app without going to the settings? thanks!
1 Answer
NFC is listed as Protection level: normal
in https://developer.android.com/reference/android/Manifest.permission#NFC
And as per https://developer.android.com/guide/topics/permissions/overview#normal_permissions
If an app declares in its manifest that it needs a normal permission, the system automatically grants the app that permission at install time. The system doesn't prompt the user to grant normal permissions, and users cannot revoke these permissions.
From https://source.android.com/devices/tech/config/runtime_perms are only for permissions classed as dangerous
Therefore you don't need runtime permissions to use NFC
But it sounds like you are trying to get permission to turn NFC ON or OFF programmatically which is not really possible