flutter_mapbox_navigation
flutter_mapbox_navigation copied to clipboard
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Hi Team,
I have tried using the code provided by you guys in the package's 'Example' section. But getting the below error when clicking the button 'Start A to B' for navigation.
Caused by: java.lang.IllegalArgumentException: com.example.mapbox_flutter_demo: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
E/MapboxModuleProvider( 3460): 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.
Anyone faced the same issue?
I am using the latest version of the plugin i.e 0.0.26 in my project.
Thanks in advance.
Same here, I am testing in Pixel 4 Android 31.
Have you got the solution???
anything yet ?
@mrkencable @lasd14 @DharmeshBasapatiBacancy hello i have made a pull requet in matter of this issue untill it gets approved you can use the link below for fixed version
Hey R3HP, just included your version from the Repo, updated AndroidManifest and built my app ... unfortunatley, the map doesn't seem to be acknowledging the waypoints that i assign... instead of zooming in to my lat lon positions and starting the routing as it did before my phone updated...
it only zooms in to a point just below the coast of Africa in the ocean.
--- additional info --- in the example app, hitting back button, then clicking Start A to B button, causes the waypoints to cause map to move to designated location but no Directions UI or Routes are showing
Hey R3HP, just included your version from the Repo, updated AndroidManifest and built my app ... unfortunatley, the map doesn't seem to be acknowledging the waypoints that i assign... instead of zooming in to my lat lon positions and starting the routing as it did before my phone updated...
it only zooms in to a point just below the coast of Africa in the ocean.
--- additional info --- in the example app, hitting back button, then clicking Start A to B button, causes the waypoints to cause map to move to designated location but no Directions UI or Routes are showing
Hi @mrkencable
i am aware of the error but i haven't fixed it yet .
it seems odd too as i didn't change kotlin code i just changed workmanager and changed androidManifest.xml.
will let you know if i get to fix it
I'm experiencing this as well. MapboxModuleProvider seems like something that would exist within the actual Mapbox android Maven plugin. I'm tempted to spin up their Android example on Android > 12 to see if it works.
Following up, after doing some research:
The high-level class throwing the exception is here: https://github.com/mapbox/mapbox-base-android/blob/master/common/src/main/java/com/mapbox/common/module/provider/MapboxModuleProvider.kt
It looks like they have a "support Android 12" issue: https://github.com/mapbox/mapbox-base-android/issues/64
Cannot replicate the issue in Mapbox's example, so it must be related to the implementation here in this plugin.
Switch to flutter stable channel :)
@alexmercier25 I am using flutter stable
@alexmercier25 I am using flutter stable
Also try flutter upgrade, flutter clean, delete android and ios folders, run "flutter create ." and pub get.
I've also tried the sample application, with latest versions of stable. Same issue in the sample application. @alexmercier25 Do you have it working under android 12?
I am also facing the issue. If anyone find the solution let me know.
Thank you in advance.
has this problem been solved yet i am also having the same issue
@R3HP did you fix the problem?
This should be resolved