title: "New Tag Collected" instead of reading tags of application - NFC android
body: <p>I have a class, which creates conncection to NFC and two activites. Both of them creates an object of that class so they can connect to NFC. 
  Earlier it worked somehow but now I've got problem - my application doesn't do anything onNewIntent, even on the first activity. Instead of it, I can see "New tag collected" from build-in app called "Tags" (Nexus S). </p>
  
  <p>What should I do?</p>
  
  <p>class: </p>
  
  <pre><code>public NFCForegroundUtil(Activity activity)
  {
      super();
      this.activity = activity;
      mAdapter = NfcAdapter.getDefaultAdapter(activity
              .getApplicationContext());
  
      mPendingIntent = PendingIntent.getActivity(activity, 0, new Intent(
              activity, activity.getClass())
              .addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);
  
      IntentFilter ndef = new IntentFilter(NfcAdapter.ACTION_TAG_DISCOVERED);
      IntentFilter ndef2 = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
      IntentFilter ndef3 = new IntentFilter(NfcAdapter.ACTION_TECH_DISCOVERED);
  
      try
      {
          ndef2.addDataType("*/*");
      }
      catch (MalformedMimeTypeException e)
      {
          throw new RuntimeException("fail", e);
      }
  
      mFilters = new IntentFilter[] {ndef, ndef2, ndef3 };
  
      mTechLists = new String[][] { new String[] {
              // android.nfc.tech.NfcV.class.getName(),
              android.nfc.tech.NfcA.class.getName(),
              android.nfc.tech.IsoDep.class.getName() } };
  
      mAdapter.enableForegroundDispatch(this, mPendingIntent, mFilters, mTechLists);
  
  }
  </code></pre>
  
  <p>activity 1:</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState)
  {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      nfcForegroundUtil = new NFCForegroundUtil(this);
  
  }
  
   @Override
  protected void onNewIntent(Intent intent)
  {
  
      super.onNewIntent(intent);
      Intent i = new Intent(this, NfcDisplayLabelActivity2.class);
      startActivity(i);
  
   }
  </code></pre>