arduino - How can i send data from my android to a adafruit PN532 card reader via NFC? -


im new on working arduino cards , have problem, because have done application send "string" android phone via nfc, , worked well... thing when started work nfc card adafruit pn532, can't recieve , i'd know if can me or if have done before.. thanks!

@override protected void onnewintent(intent intent) {     if (intent.getaction().equals(nfcadapter.action_tag_discovered)) {         /*string result = "";         toast.maketext(this, "etiqueta nfc detectada", toast.length_short).show();         result = bytearraytohexstring(intent.getbytearrayextra(nfcadapter.extra_ndef_messages));         etiqueta = result;         medittext.settext(etiqueta);*/           parcelable[] rawmessages = intent.getparcelablearrayextra(                 nfcadapter.extra_ndef_messages);          ndefmessage message = (ndefmessage) rawmessages[0]; // 1 message transferred         medittext.settext(new string(message.getrecords()[0].getpayload()));      }}     @override public ndefmessage createndefmessage(nfcevent nfcevent) {     string message = medittext.gettext().tostring();     ndefrecord ndefrecord = ndefrecord.createmime("text/plain", message.getbytes());     ndefmessage ndefmessage = new ndefmessage(ndefrecord);     return ndefmessage; } 


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -