frostyshadows / neko-tap

Android app for improving medication adherence. nwHacks 2019 winning project.
4 stars 2 forks source link

Edit NFC tag ID -- Proof of Concept #35

Open PiggySpeed opened 5 years ago

PiggySpeed commented 5 years ago

Being able to write custom IDs to our NFC tags unlocks new potential features. For instance, we can use the ID to tell us whether we are dealing with an individual prescription bottle, a device, or a blister pack.

Research and develop a proof-of-concept module for writing custom data to an NFC tag.

  1. be able to write a custom ID to the NFC tag
  2. be able to "lock" an NFC tag so that it is immutable to future changes
SophieMBerger commented 5 years ago

I looked into the ability of "locking" an NFC tag and this is what I found: https://developer.android.com/reference/android/nfc/tech/Ndef.html#makeReadOnly()

This requires that the data on the NFC tag is in Ndef format which should be the case as we are using NdefMessageParser().

SophieMBerger commented 5 years ago

When it comes to writing data to the NFC tag, including a unique ID, I wound a Medium post: https://android.jlelse.eu/writing-to-a-nfc-tag-on-android-8d58f5e3c1fc which goes into how to write data to an NFC tag using Android.