NFC Quick Settings is a really basic Android app with no GUI of it's own, that simply adds an NFC tile to the tiles available to the Quick Settings panel.
The Quick Settings tile indicates the current NFC status (enabled, or disabled), but the action it takes when tapped varies a little depending on the permissions available. See Basic and Advanced modes below.
In the basic mode, which requires no special permissions, tapping the tile will simply open the device's NFC Settings page (assuming the device has one). This is actually the best that can be done using official Android APIs.
The advanced mode requires special permissions (see below), but once enabled, tapping the NFC Quick Settings tile will
turn the NFC service on or off directly, without having to open the NFC settings page at all. Unfortunately, to acheive
this advanced mode, NFC Quick Settings needs to use APIs not intended for third-party applications (specifically
NfcAdapter::enable()
and NfcAdapter::disable()
), and to use those methods the tile needs the special
WRITE_SECURE_SETTINGS
permission.
WRITE_SECURE_SETTINGS
PermissionAs the WRITE_SECURE_SETTINGS
permission is not intended to be used by third-party applications, it needs to be
granted via the Android Debug Bridge (adb) tool.
Install Android Debug Bridge (adb):
adb
is included in the Android SDK Platform Tools package. Download this package with the SDK Manager, which installs it atandroid_sdk/platform-tools/
. If you want the standalone Android SDK Platform Tools package, download it here.
Install NFC Quick Settings, via Google Play, F-Droid, or GitHub Releases.
Grant the permission to NFC Quick Settings via adb
:
adb shell pm grant au.id.colby.nfcquicksettings android.permission.WRITE_SECURE_SETTINGS
If for some reason you want to revoke the WRITE_SECURE_SETTINGS
permission, and restore the basic mode, then
simply follow the same steps as above, but replace grant
with revoke
. That is, run:
adb shell pm revoke au.id.colby.nfcquicksettings android.permission.WRITE_SECURE_SETTINGS