I want to emulate an Android HCE host card. To do this, I extend the HostApduService service class and overwrite the following method:
public byte[] processCommandApdu(byte[] commandApdu, Bundle extras) { if (Arrays.equals(SELECT_APDU, commandApdu)) { NdefMessage message = new NdefMessage(new NdefRecord [] {NdefRecord.createTextRecord("en", "test"}); return message.toByteArray(); } else { return UNKNOWN_CMD_SW; } }
With the second device, you can receive data from the HCE service. The problem is that I always get a Type A tag, but I need an NDEF message.
Can someone help me?
source share