Hello, I'm new in java and android programming.
I need to read the classic mifare 1k or NFC UID
I tried to use the NFC.GeTagtUID from NFC library 1.1 (posted by Sherlock)
I get an array of 4 bytes. First two bytes are the same to the first two byte of the UID (I can read the UID with another device), but the last two bytes are negative numbers and are wrong.
This is the piece of my code:
If NFC.IsNdefIntent(Activity.GetStartingIntent) Then
Dim XID(20) As Byte
XID=NFC.GeTagtUID(Activity.GetStartingIntent)
end if
For example the last two bytes I get are (in decimal): -54,-73,
but the last two bytes in the UID are (in hex): CA, B7.
Someone can explain to me because this happen?
Where I'm wrong?
Many thanks
Fabio
I need to read the classic mifare 1k or NFC UID
I tried to use the NFC.GeTagtUID from NFC library 1.1 (posted by Sherlock)
I get an array of 4 bytes. First two bytes are the same to the first two byte of the UID (I can read the UID with another device), but the last two bytes are negative numbers and are wrong.
This is the piece of my code:
If NFC.IsNdefIntent(Activity.GetStartingIntent) Then
Dim XID(20) As Byte
XID=NFC.GeTagtUID(Activity.GetStartingIntent)
end if
For example the last two bytes I get are (in decimal): -54,-73,
but the last two bytes in the UID are (in hex): CA, B7.
Someone can explain to me because this happen?
Where I'm wrong?
Many thanks
Fabio