Hi All, I hope someone can point me in the right direction... I have an app which reads NFC tags and utilizes the UID of the tag, up until today this has worked perfectly using the code that Erel and others have provided
the tags I have been using and distributing ( around 20,000 of them) are NXP MIFARE Ultralite ISO 14443-3A and I have had no issues reading the UID on my samsung s7 however today the operating system on this phone updated to android 7 and suddenly I can no longer read the tag UID
I receive the error "Tag does not support Ndef"
I have used another app on my phone called NFC Tools and it still reads the tag and UID without a problem
I urgently need to sort this problem as multiple copies of this app are running on Samsung devices with the risk that they will update their operating system
Regards
Duncan
B4X:
NFC.EnableForegroundDispatch
Dim si As Intent = Activity.GetStartingIntent
If si.IsInitialized = False Or si = prevIntent Then Return
prevIntent = si
If si.Action.EndsWith("TECH_DISCOVERED") Or si.Action.EndsWith("NDEF_DISCOVERED") Or si.Action.EndsWith("TAG_DISCOVERED") Then
Dim techs As List = NFC.GetTechList(si)
Log($"Techs: ${techs}"$)
If techs.IndexOf("android.nfc.tech.Ndef") > -1 Then
TagTech.Initialize("TagTech", "android.nfc.tech.Ndef" , si)
TagTech.Connect
Else
ToastMessageShow("Tag does not support Ndef.", True)
End If
End If
the tags I have been using and distributing ( around 20,000 of them) are NXP MIFARE Ultralite ISO 14443-3A and I have had no issues reading the UID on my samsung s7 however today the operating system on this phone updated to android 7 and suddenly I can no longer read the tag UID
I receive the error "Tag does not support Ndef"
I have used another app on my phone called NFC Tools and it still reads the tag and UID without a problem
I urgently need to sort this problem as multiple copies of this app are running on Samsung devices with the risk that they will update their operating system
Regards
Duncan