Giter Club home page Giter Club logo

flutter-nfc-plugin's People

Contributors

alesdi avatar dukhanov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flutter-nfc-plugin's Issues

Support null Safety

please, can you change to null safety? it's very quick in your project

thanks

It looks like ios is not implemented

[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method getNfcState on channel nfc_plugin_method_channel)
#0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:314:7)

#1 NfcPlugin.nfcState (package:flutter_nfc_plugin/nfc_plugin.dart:29:8)
#2 _MyAppState.initPlatformState (package:nfc_plugin_example/main.dart:38:35)

#3 _MyAppState.initState (package:nfc_plugin_example/main.dart:31:5)
#4 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4033:58)
#5 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3902:5)
#6 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3084:14)
#7 Element.updateChild (package:flutter/src/widgets/framework.dart:2887:12)
#8 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:939:16)

Nfc message not forwarded to onNfcMessage stream when app is in background

Hi!

If I open my Android app, and send it to the background, the onNfcMessage event doesn't fire when scanning an NFC tag. The app opens as expected, but the event deosn't fire.

Everything works fine if the app is not running when scanning the tag, as it checks the "nfcStartedWith".
If I scan the tag while the app is open, everything also works just fine.

Any suggestions of what could be wrong?

Can't read tag id if the message is null

Hi, i' m trying to read an nfc card wich has not any message and the error i get is:

D/FlutterNfcPlugin( 6804): callback: onTagDiscovered {error=Cannot parse NDEF message: java.lang.IllegalStateException: ndef must not be null, message=null}

In other android applications in play store, i can get the tag id (serial number) although the tag has no messages (null).

How can i implement this?

Thanks!

The plugin `flutter_nfc_plugin` uses a deprecated version of the Android embedding.

Started getting this warning after updating to Flutter 2.5

The plugin `flutter_nfc_plugin` uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

The example project doesn't run on Flutter Master branch

D/FlutterNfcPlugin(26466): callback: onTagDiscovered {error=Cannot parse NDEF message: java.lang.IllegalStateException: ndef must not be null, message=null}
W/Binder  (26466): Caught a RuntimeException from the binder stub implementation.
W/Binder  (26466): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: Binder:26466_3
W/Binder  (26466): 	at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:605)
W/Binder  (26466): 	at io.flutter.embedding.engine.FlutterJNI.dispatchPlatformMessage(FlutterJNI.java:515)
W/Binder  (26466): 	at io.flutter.embedding.engine.dart.DartMessenger.send(DartMessenger.java:76)
W/Binder  (26466): 	at io.flutter.embedding.engine.dart.DartExecutor.send(DartExecutor.java:151)
W/Binder  (26466): 	at io.flutter.view.FlutterNativeView.send(FlutterNativeView.java:144)
W/Binder  (26466): 	at io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler$EventSinkImplementation.success(EventChannel.java:226)
W/Binder  (26466): 	at it.dukhanov.flutter.nfc_plugin.NfcPlugin.sendNfcListenerCallback(NfcPlugin.kt:92)
W/Binder  (26466): 	at it.dukhanov.flutter.nfc_plugin.NfcPlugin.onTagDiscovered(NfcPlugin.kt:82)
W/Binder  (26466): 	at android.nfc.NfcActivityManager.onTagDiscovered(NfcActivityManager.java:447)
W/Binder  (26466): 	at android.nfc.IAppCallback$Stub.onTransact(IAppCallback.java:126)
W/Binder  (26466): 	at android.os.Binder.execTransactInternal(Binder.java:1021)
W/Binder  (26466): 	at android.os.Binder.execTransact(Binder.java:994)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.