revtel / react-native-nfc-manager

React Native NFC module for Android & iOS
MIT License
1.35k stars 317 forks source link

Question about sending a command on Android #615

Closed sallar closed 1 year ago

sallar commented 1 year ago

Hi. I have a tag that uses NfcV on Android and iso15693 on iOS. I need some info from the tag which I can get by sending this command on iOS:

    const patchInfo = await handler.customCommand({
      flags: Nfc15693RequestFlagIOS.HighDataRate,
      customCommandCode: 0xa1,
      customRequestParameters: [],
    });

but when I send the same command 0xa1 using NfcManager.transceive on Android, it just says transceive fail. How do you think I can send that command on Android?

Thank you!

sallar commented 1 year ago

Figured it out. Needed a flag:

const systemInfo = await NfcManager.transceive([0x02, 0xa1, 0x07]);