okadan / flutter-nfc-manager

A Flutter plugin for accessing the NFC features on Android and iOS.
https://pub.dev/packages/nfc_manager
MIT License
198 stars 129 forks source link

How to we can modify enableReaderMode in Android #86

Open ZainalHIS opened 2 years ago

ZainalHIS commented 2 years ago

I have problem when I send command response is transceive failed, so in kotlin we change enableReaderMode like this private fun enableReaderMode(adapter: NfcAdapter) { val opts = Bundle() opts.putInt(EXTRA_READER_PRESENCE_CHECK_DELAY, 120000)

    adapter.enableReaderMode(
        this,
        callback,
        FLAG_READER_NFC_F or
                FLAG_READER_SKIP_NDEF_CHECK,
        opts
    )
}

the response is success, can we change the enableReaderMode in lib flutter-nfc-manager

jwadin commented 2 years ago

Hey,

I would also be interested in this, to use the FLAG_READER_NO_PLATFORM_SOUNDS flag.

What would be the best approach to implement this ?

Many thanks