title: android nfc setting toggle listener
body: <p>I want to listen nfc enable / disable in setting preferences so i add below code in my activity</p>
  
  <pre><code>    IntentFilter filter = new IntentFilter("android.nfc.action.ADAPTER_STATE_CHANGE");
      BroadcastReceiver receiver = new BroadcastReceiver() {
  
          @Override
          public void onReceive(Context context, Intent intent) {
              tv.setText("broadcast received :" + NfcAdapter.getDefaultAdapter(MainActivity.this).isEnabled());
              Toast.makeText(MainActivity.this, "broadcast received", Toast.LENGTH_LONG).show();
          }
      };
      registerReceiver(receiver, filter);
  </code></pre>
  
  <p>but it's look like ADAPTER_STATE_CHANGE is not working.</p>
  
  <p>can anybody have an idea to listen state of nfc? please help..!!</p>