Closed laudaget closed 4 years ago
Quite frankly I don't know. If you write the payload with a custom mime type, the payload should be normal. It's only on "well known" types and the like where it does this.
Thank you for your answer.
I've tried several Apps from the playstore to write on the tags. Each app gives a diffrent prefix to my content if i read it out with your flutter plugin. But when i use other apps to read out the content, there is no prefix and i get the expectet output '100001'.
If it helps, my tag has the following specs:
you can find more about my tag: https://www.nfc-tag-shop.de/en/nfc-sticker/black-white-nfc-tags/103/nfc-sticker-pvc-on-metal-30-mm-ntag-213-180-byte-white?number=68236
Right, I've got some code brewing and I may be able to remove it. I'll release a test version with the changes soon.
Could you try again using the payload-data
branch?
payload-data
branch
orpayload-data
branch in your pubspec.yaml
dependencies:
dependencies:
nfc_in_flutter:
git:
url: git://github.com/semlette/nfc_in_flutter.git
ref: payload-data
NDEFRecord
s now have a new data
property which should exclude the en
nonsense.
First of all, i really appreciate your efforts and time you put into this.
With the payload-data branch i was able to get the expectet output with message.records.first.data
.
Because i am curious i would like to know what the prefix was. Was it the path or a variable to find the data?
Thank you very much.
After some reading I found out that it is part of the NDEF specification. Tags encoded with a "well known type" of "text", will have their (usually) first two characters be the language code of the text. By doing some magic, you can get the length of the language code and then remove it.
Closing this as I have (finally) released version 2.0.0, which adds the .data
property for both iOS and Android.
Is there a way to get the data without the path provided in payload? Couldn't figure out a way to cut away the path.
The content on my nfc chips are like 100001, 100002, 100003.. I would like to get '1000001' as my response, but the payload gives me '�en100001' instead.
Thank you in advance