DwayneCoussement / flutter_geofence

BSD 3-Clause "New" or "Revised" License
42 stars 40 forks source link

Example not working in Android 11 #47

Closed StripedMittens closed 2 years ago

StripedMittens commented 3 years ago

The example is not working on Android 11

Android 7 worked

naumanmir commented 2 years ago

Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. at android.app.PendingIntent.checkFlags(PendingIntent.java:375) at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645) at android.app.PendingIntent.getBroadcast(PendingIntent.java:632) at com.intivoto.flutter_geofence.GeofenceManager$geofencePendingIntent$2.invoke(GeofenceManager.kt:69) at com.intivoto.flutter_geofence.GeofenceManager$geofencePendingIntent$2.invoke(GeofenceManager.kt:67) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at com.intivoto.flutter_geofence.GeofenceManager.getGeofencePendingIntent(GeofenceManager.kt:67) at com.intivoto.flutter_geofence.GeofenceManager.startMonitoring(GeofenceManager.kt:74) at com.intivoto.flutter_geofence.FlutterGeofencePlugin.onMethodCall(FlutterGeofencePlugin.kt:59) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233) at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:84) at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:865) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:335) at android.os.Looper.loopOnce(Looper.java:161) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

Getting this error on Android 11.

DwayneCoussement commented 2 years ago

53