skip to Main Content
await NfcManager.instance.isAvailable();

Above code of nfc_manager package returns false even if the NFC is available but not enabled. So, Is there any way to check availibility of NFC hardware. Also, any way to openSettings navigating to NFC settings? like location settings.

2

Answers


  1. Chosen as BEST ANSWER

    Had to fork nfc_manager, and updated platform specific code. Added isEnabled & openSettings methods.

    You can use: https://github.com/s4nk37/flutter-nfc-manager

    until it gets merged.


  2. add Permission for Android like this in AndroidManifest.xml:

    <uses-permission android:name="android.permission.NFC"/>
    

    for IOS:

    Add Near Field Communication Tag Reader Session Formats Entitlements to your entitlements.

    Add NFCReaderUsageDescription to your Info.plist.

    Add com.apple.developer.nfc.readersession.felica.systemcodes and com.apple.developer.nfc.readersession.iso7816.select-identifiers to your Info.plist as needed.

    reference : https://pub.dev/packages/nfc_manager

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search