I have a problem with your package. When I run it on a real device, this error occurs:
PlatformException (PlatformException(error, java.lang.Integer cannot be cast to java.lang.Long, null, java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
at me.sodipto.phone_state_background.PhoneStateBackgroundPlugin.onMethodCall(PhoneStateBackgroundPlugin.kt:56)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7266)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
))
These are my values when the application crashes:
The method onEventCallback!.toRawHandle() in lib/phone_state_background.dart on line 32 returns int, but line 56 in android/src/main/kotlin/me/sodipto/phone_state_background/PhoneStateBackgroundPlugin.kt expects long.
Can you please fix the conversion so it works with int values as well?
Hello,
I have a problem with your package. When I run it on a real device, this error occurs:
These are my values when the application crashes:
The method
onEventCallback!.toRawHandle()
inlib/phone_state_background.dart
on line 32 returns int, but line 56 inandroid/src/main/kotlin/me/sodipto/phone_state_background/PhoneStateBackgroundPlugin.kt
expects long.Can you please fix the conversion so it works with int values as well?