简体   繁体   中英

Android convert byte array back to NdefMessage

I am on a project which use the nfc to transfer data. Device A as HCE and device B as reader. In device A, I convert NdefMessage into byte array then send to device B. So my problem now is in device B, how I convert the received byte array data back to NdefMessage?

According to https://developer.android.com/reference/android/nfc/NdefMessage.html

You can

Use NdefMessage(byte[]) to construct an NDEF Message from binary data,

This converts a byte array to NdefMessage

Or

https://www.dummies.com/consumer-electronics/nfc-data-exchange-format-ndef/

Details the Ndef message and record format, so you could convert it yourself

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM