1

I hope to use NFC cards(UID) to identify the employees using android app. And I have to assign this UID over 10'000 employees. Therefore I need to make sure the possibility of the duplication over this concept. I have captured the UID as below.

if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(intent.getAction())) {

    Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);

    if(tag == null){
        textViewInfo.setText("tag == null");
    }else{
        byte[] uid=tag.getId();
        String finalUID= Base64.encodeToString(uid,1);          
    }
}

"finalUID" have send & saved in the mysql table. Thank you!

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • Hi, welcome to Stackoverfow. Do you have any problem with the android code you posted or are you just asking about the uniqueness of the UID you're extracting/reading from the NFC tag? – Capricorn Aug 27 '18 at 12:21
  • Hello, I'm asking the uniqueness of the UID and I want to make sure that "Am I used correct extracting/reading method ?(that mentioned above). – Nimesh Gayanga Aug 27 '18 at 12:33
  • 2
    So I would recommend reading these two questions and their respective answers: https://stackoverflow.com/questions/6060312/how-do-you-read-the-unique-id-of-an-nfc-tag-on-android https://stackoverflow.com/questions/21700718/serials-on-nfc-tags-truly-unique-cloneable, as your question seems to be a duplicate of these – Capricorn Aug 27 '18 at 12:36
  • Thanks lot dude that post is help me lots... Anyway, whats about the method that I used to read UID on tags? – Nimesh Gayanga Aug 27 '18 at 12:46

0 Answers0