android - NFC p2p tag interception -
i building android app using eclipse , android sdk. implement nfc p2p function in app in sense when place 2 phones back, both send string , receive string automatically. of course happen in separate activity. have managed send custom tag (string) have been unable intercept , use afterwards in app code. how can this?
this have far.
public class mainactivity extends activity {
public nfcadapter madapter; pendingintent mpendingintent; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); madapter = nfcadapter.getdefaultadapter(this); ndefrecord rec = ndefrecord.createuri("www.stackoverflow.com"); ndefmessage ndef = new ndefmessage(rec); madapter.setndefpushmessage(ndef, this); }
i have spent lot of time trying find , understand solutions intercept tag. unsuccessfully.
thank help.
Comments
Post a Comment