// reader mode flags: listen for type A (not B), skipping ndef check
private static final int READER_FLAGS =
NfcAdapter.FLAG_READER_NFC_A |NfcAdapter.FLAG_READER_NFC_B |
NfcAdapter.FLAG_READER_SKIP_NDEF_CHECK | NfcAdapter.FLAG_READER_NO_PLATFORM_SOUNDS;
/**
* Re-enable the tag dispatch if the app is in the foreground
*/
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
@Override
public void onResume() {
super.onResume();
// register broadcast receiver
IntentFilter filter = new IntentFilter(NfcAdapter.ACTION_ADAPTER_STATE_CHANGED);
this.registerReceiver(mBroadcastReceiver, filter);
mAdapter = NfcAdapter.getDefaultAdapter(this);
mAdapter.enableReaderMode(this,
new NfcAdapter.ReaderCallback() {
@RequiresApi(api = Build.VERSION_CODES.O)
@Override
public void onTagDiscovered(final Tag t) {
// do something
tag = t;
startTransaction();
}
},
READER_FLAGS,
null);
when doing the NFC transaction, sometimes this AID D2 76 00 00 85 01 01 is sending. Can you help me with this issue?
I written the onresume code like this,
when doing the NFC transaction, sometimes this AID D2 76 00 00 85 01 01 is sending. Can you help me with this issue?