title: Trying to ignore all NFC intents while in foreground with enableForegroundDispatch
body: <p>I'm trying to get my app to ignore nfc commands while running - its launched by an NFC tag with an Android Application Record (AAR), and I dont want it to be able to be launched by that when its already running.. I've tried to carefully follow others <a href="https://stackoverflow.com/questions/9748513/reading-nfc-tags-only-from-a-particuar-activity">examples</a>, but the app is still able to be launched by AARs while running (in foreground).</p>
  
  <p><strong>Manifest.xml:</strong></p>
  
  <pre><code>&lt;application&gt;
      &lt;activity&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.nfc.action.NDEF_DISCOVERED"/&gt;
              &lt;category android:name="android.intent.category.DEFAULT"/&gt;
              &lt;data android:mimeType="application/com.MyApp.frontcam" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p><strong>Activity.java:</strong></p>
  
  <pre><code>private NfcAdapter mAdapter;
  private PendingIntent mPendingIntent;
  private IntentFilter[] mFilters;
  private String[][] mTechLists;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
  
      mAdapter = NfcAdapter.getDefaultAdapter(this);
      mPendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);
      IntentFilter ndef = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
      try {
          ndef.addDataType("*/*");  
      }
      catch (MalformedMimeTypeException e) {
          throw new RuntimeException("fail", e);
      }
      mFilters = new IntentFilter[] {ndef, };
      mTechLists = new String[][] {
              new String[] { NfcA.class.getName() },
              new String[] { Ndef.class.getName() },
              new String[] { NdefFormatable.class.getName() }
      }; 
  
  }
  
  @Override 
  protected void onResume() {
      super.onResume();
      mAdapter.enableForegroundDispatch(this, mPendingIntent, null, null); //ended up setting mFilters and mTechLists to null
  }
  </code></pre>