How to enable NFC setting
android, nfc
Solution
TNR gets it right, however also note that from Android version 16, there is a more specific settings action for NFC:
protected void startNfcSettingsActivity() {
if (android.os.Build.VERSION.SDK_INT >= 16) {
startActivity(new Intent(android.provider.Settings.ACTION_NFC_SETTINGS));
} else {
startActivity(new Intent(android.provider.Settings.ACTION_WIRELESS_SETTINGS));
}
}
Problem
I am able to read and wirte in my NFC demo app but I need to check if the NFC option in setting menu is enabled or not . If its not enable I want to direct the user to the setting menu(I know how to do this) similar to NFC TagWriter by NXP. In my application I am using the following SDK version ``` <uses-sdk android:minSdkVersion="7" /> <uses-sdk android:maxSdkVersion="16"/> ``` I am unable to check if the setting is enabled or not.