Take the 2-minute tour ×  i am creating an NFC enabled app and
want to display a warning if NFC is disabled.  One possibility
to do this seems to be to check if NFC is enabled in onResume,
however if NFC is enabled from quicksettings onResume is never
called.  To update the message if the user enables NFC, I want
to listen to the Broadcast
"android.nfc.action.ADAPTER_STATE_CHANGED", so let's create a
intentFilter, with the same code as used in the Android Settings
app:  mIntentFilter = new
IntentFilter(NfcAdapter.ACTION_ADAPTER_STATE_CHANGED);  Which
gives me the message "ACTION_ADAPTER_STATE_CHANGED cannot be
resolved or is not a field". However, if i open the sources to
NfcAdapter, the field is definitely there:  public static final
String ACTION_ADAPTER_STATE_CHANGED =  I don't get this at
all... How am I supposed to react to changes in NFC
configuration? Any help would be appreciated.  share|improve
this question Did you try to pass the String constant itself? – 
shoe rat Jun 7 '13 at 15:12 I did not, it