Closed FerenczD closed 6 years ago
@Farynx in the past adding android:noHistory="true"
to the activity xml would stop Android from launching a new app. I'm not sure it it still works. https://github.com/chariotsolutions/phonegap-nfc#launching-your-android-application-when-scanning-a-tag
@Farynx did adding those flags help?
@don we ended up combining your reading nfc code and your peer to peer nfc code and it worked. We did not try changing the xml file. Thanks anyway for the suggestion.
@Farynx sounds good. Let me know if there's any documentation or code that needs to be updated.
So I'm trying to send information from one phone to another through NFC using phonegap. I want whatever information I send from one app to be saved as a variable at some point so I can either display it, manipulate it, etc. The issue I'm having is that whenever I try to send a text from one phone, it just opens up the app but does not display the text like it should. I have a custom Mimetype and an intent filter set up to open up the app on the other phone, so I don't believe that to be the problem.I think I may be using the addMimeTypeListener function wrong but am not too sure. Any help in clarifying my issue would be appreciated.
Here is where I call the addMimeTypeListener function in the deviceready function:
},
Here is where call the parsed tag function
var records = nfcEvent.tagData;
for (var i = 0; i < records.length; i++) { var record = records[i], p = document.createElement('p'); p.innerHTML = nfc.bytesToString(record.payload); display.appendChild(p); app.notifyUser(p); }
And here is my intent filter just for reference
I've been trying to follow chariotsolutions examples in order to understand how it works but still not having much luck.
Thank you.