loup-v / beacons

Flutter beacons plugin for Android and iOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

java.lang.IllegalArgumentException: Unsupported value: Result(isSuccessful=true, region=null, data=true, error=null)

indiluk opened this issue · comments

When we try to use requestPermission function the Android app crashes with the following error log. iOS works just fine.

await Beacons.requestPermission(
  new LocationPermission(
    ios: LocationPermissionIOS.always, 
    android: LocationPermissionAndroid.fine
 )
);

E/AndroidRuntime: FATAL EXCEPTION: main Process: at.pluscity.PlusCity, PID: 7565 java.lang.IllegalArgumentException: Unsupported value: Result(isSuccessful=true, region=null, data=true, error=null) at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:293) at io.flutter.plugin.common.StandardMethodCodec.encodeSuccessEnvelope(StandardMethodCodec.java:57) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:194) at io.intheloup.beacons.channel.Channels$requestPermission$1.doResume(Channels.kt:54) at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:42) at kotlinx.coroutines.experimental.DispatchedTask$DefaultImpls.run(Dispatched.kt:161) at kotlinx.coroutines.experimental.DispatchedContinuation.run(Dispatched.kt:25) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6934) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

Use it on Beacon.ranging(permission: LocationPermissionAndroid.course)