Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlatformException(error, null, null, java.lang.NullPointerException) #172

Open
sungyoun1223 opened this issue Nov 29, 2023 · 0 comments
Open

Comments

@sungyoun1223
Copy link

I am using flutter_ble_peripheral in flutter_foreground_task. It worked 1.1.1, but I have the following problem since 1.2.0.

I think The same issue is also occurring when using activityBinding!!
There was a function that used activityBinding!! in 1.1.1, but there was no problem using start(),stop(),isAdvertising.

E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): Failed to handle method call E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): java.lang.NullPointerException E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at dev.steenbakker.flutter_ble_peripheral.FlutterBlePeripheralPlugin.checkBluetoothState(FlutterBlePeripheralPlugin.kt:77) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at dev.steenbakker.flutter_ble_peripheral.FlutterBlePeripheralPlugin.onMethodCall(FlutterBlePeripheralPlugin.kt:98) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at android.os.Handler.handleCallback(Handler.java:942) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at android.os.Handler.dispatchMessage(Handler.java:99) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at android.os.Looper.loopOnce(Looper.java:226) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at android.os.Looper.loop(Looper.java:313) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at android.app.ActivityThread.main(ActivityThread.java:8757) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at java.lang.reflect.Method.invoke(Native Method) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) E/MethodChannel#dev.steenbakker.flutter_ble_peripheral/ble_state(23104): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant