NFC read/ write tags between phones not working (.aia file attached)

Trying to read and write NFC tags phone to phone with the same AI2 app. I know nfc needs to be compiled to apk for use. Both phones both phones are nfc enabled androids with the same ai2 apk. It's throwing me an error that it can't do the nfc operation. Has anyone else come across this?

AIA:
nfc.aia (3.2 KB)
APK:
Android and iPhone application packages (APK/IPA) are forbidden because we do not have a means to guarantee that they are not malicious. The apk was removed.

Checked @Taifun and other resources but haven’t seen much work or information about working with NFC. Someone please advise on this. Thank you.

Old Forum NFC posts contain a lot of information.

Developers can still search (but not post to) the old AI2 Google Forum. Use the Search for messages box at the top of the screen for information about all AI2 programming issues, discussions, solutions in the past six or so years.

@SteveJG thank you very much for your reply I've reviewed the previous threads on the Google forum. However, I'm still not sure with my issue. I'd like to share some links that we insightful regarding NFC and AI2 but didn't exactly answer my question in hope that they are helpful to others.

For NFC testing purposes I've found this NFC app to be useful. When I use this app to scan my AI2 NFC enabled app I get the following:

MIT provides an excellent NFC tutorial but it requires using an NFC sensor (not second phone).

If looking for RFID scanning with android, it's possible but it is suggested to try Flutter.dev or something else:

A phone can read a 13.56MHz RFID tag. However, the App Inventor NearField block can only read an NDEF text message from an NDEF formatted NFC (ISO14443A/B) tag. Unfortunately it cannot read the RFID serial number.

NFC is one of the most powerful capabilities on a mobile device in existence today. Very concerning there isn't more conversation about it on here. Hoping to get to the bottom of this. Please let me know the best way to go about reading and writing between phones using the NFC component in AI2. Thanks guys.

We're also having a difficult time with NFC and Appinventor. Can someone please spec out the appropriate tag to use. We're using a MIFARE classic and we are unable to get the NFC cup app to read the tags, also unable to write to it. Additionally, we wrote a few simple programs to also test with no luck. The MIFARE Class app and also NFC tools can both read the tag and write to it so what are we missing.

We teach a group of girls who would like to use this functionality in their app and we need to get it working asap.

Welcome @codegirls

How? Is this a card reader?

Documentation for the NFC tool is here Sensors]]

Are the tags only Text tags ? Note this component supports the reading and writing of text tags only (if supported by the device).

You might post an example so everyone can see what you are trying to do. Be aware, the NFC tool does not support all tag formats. Are the apps compiled and loaded on both phones?

Here are all the community discussions re NFC, they may help you Search results for 'NFC' - MIT App Inventor Community

Steve,
It's not a card reader. I'm talking about the tags. How do I find out which tags (text) that are compatible with Appinventor.

We are aware that appinventor doesn't support all tags which is why we asked the question.

If we can find the appropriate tag, not the sensor information which we are already aware of, we could purchase the appropriate tags.

We've used a reader which works with our MIFARE Classic tags (both read an write), but the cups aia example does not work with the tags.

Is there anyone out there who could recommend the appropriate tag to purchase. Specs?

Sorry, I cannot recommend a specific type/brand. These two links discuss appropriate tags and might help.

http://ai2inventor.blogspot.com/2017/08/nfc-cup-game.html .

Thank you it worked.

If this helps others.

Solution found!

For some reason, the none of the tags work right from the manufacturer. After I write a test message using the app NFC TagWriter by NXP, the tags are formatted and work perfectly with AI2

So you need to reformat the tags first (mine was different than the user you suggested a MIFARE classic). Once you reformat the tag, you can write/read from the NFC tagwriter by NXP app.

Then the cup program and our test programs are working.

This information should be added to the tutorial. There's no hardware information other than buy tags that are compatible, and that information is insufficient especially based on others who are having the similar issues.

Thanks. Developers will see your post and revise documentation.

@ewpatton please see codegirls post. Thank you all.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.