NFC p2p tag interception

  • Replies:0
  • OpenNot stickiedUnanswered
  • Forum posts: 1

May 12, 2015, 11:35:51 AM via Website


I am building an Android app using Eclipse and the Android SDK. I would like to implement an NFC p2p function in my app in the sense that when you place the 2 phones back to back, both send a string and receive a string automatically. This would of course happen in a separate activity. I have managed to send a custom tag (String) but have been unable to intercept it and use it afterwards in the app code. How can i do this?

This is what i have so far.

public class MainActivity extends Activity {

publicNfcAdapter mAdapter;PendingIntent mPendingIntent;

protected void onCreate(Bundle savedInstanceState){

mAdapter =NfcAdapter.getDefaultAdapter(this);

NdefRecord rec =NdefRecord.createUri("");NdefMessage =newNdefMessage(rec);


I have spent a lot of time trying to find and understand solutions to intercept the tag. Unsuccessfully.

Thanks for your help.