I wanna emulate a host card with the HCE feature from Android. For that I extend the service class HostApduService and overwrite 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 a second device its possible to receive data from the HCE Service. The problem is that I always receive "Type A" Tag, but I need a NDEF Message.
Can anybody help me?