NFC 实时权限 Android

NFC realtime permission Android

我正在尝试实时获取NFC权限,我可以获得除此之外的任何权限,我能够获得此权限的唯一方法是打开phone的无线设置并要求用户打开它,有没有办法在运行时从应用程序中请求此权限而无需转到设置? 谢谢!

NFC 在 https://developer.android.com/reference/android/Manifest.permission#NFC

中列为 Protection level: normal

并根据 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.

来自 https://source.android.com/devices/tech/config/runtime_perms 仅适用于分类为 dangerous

的权限

因此您不需要运行时权限即可使用 NFC

但听起来您正试图获得以编程方式打开或关闭 NFC 的权限,这实际上是不可能的