I have developed an android app with HCE function and want to send the string to iPhone by CoreNFC. So I have used NFCReaderiOS, this example to verify whether success or not. The following code is the android part that I used to return data to the iOS NFC reader app:
@Override
public byte[] processCommandApdu(byte[] bytes, Bundle bundle) {
if (Arrays.equals(bytes, APDU_SELECT)) {
NdefMessage message = createTextMessage("Testing123");
return message.toByteArray();
} else {
return A_ERROR;
}
}
However, the iOS NFC reader app cannot capture any response that the android part returned. In this case, the function processCommandApdu is triggered by the iOS reader app. Is there any solution to emulate the NDEF tag by android HCE other than the above method? Thanks a lot.