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