flutter_mapbox_navigation icon indicating copy to clipboard operation
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.

Open DharmeshBasapatiBacancy opened this issue 3 years ago • 16 comments
trafficstars

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.

DharmeshBasapatiBacancy avatar Feb 11 '22 06:02 DharmeshBasapatiBacancy

Same here, I am testing in Pixel 4 Android 31.

lasd14 avatar Feb 11 '22 13:02 lasd14

Have you got the solution???

DharmeshBasapatiBacancy avatar Feb 14 '22 06:02 DharmeshBasapatiBacancy

anything yet ?

mrkencable avatar Mar 31 '22 18:03 mrkencable

@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

R3HP/flutter_mapbox_navigation

R3HP avatar Apr 03 '22 11:04 R3HP

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

mrkencable avatar Apr 06 '22 05:04 mrkencable

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

R3HP avatar Apr 12 '22 20:04 R3HP

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.

LukeStonehm avatar May 10 '22 10:05 LukeStonehm

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

LukeStonehm avatar May 10 '22 10:05 LukeStonehm

Cannot replicate the issue in Mapbox's example, so it must be related to the implementation here in this plugin.

LukeStonehm avatar May 10 '22 11:05 LukeStonehm

Switch to flutter stable channel :)

alexmercier25 avatar May 10 '22 11:05 alexmercier25

@alexmercier25 I am using flutter stable

LukeStonehm avatar May 10 '22 14:05 LukeStonehm

@alexmercier25 I am using flutter stable

Also try flutter upgrade, flutter clean, delete android and ios folders, run "flutter create ." and pub get.

alexmercier25 avatar May 10 '22 14:05 alexmercier25

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?

LukeStonehm avatar May 11 '22 11:05 LukeStonehm

I am also facing the issue. If anyone find the solution let me know.

Thank you in advance.

yanshi2516 avatar Jul 02 '22 15:07 yanshi2516

has this problem been solved yet i am also having the same issue

manandharsudhir avatar Aug 02 '22 14:08 manandharsudhir

@R3HP did you fix the problem?

manandharsudhir avatar Aug 03 '22 04:08 manandharsudhir

This should be resolved

eopeter avatar May 23 '23 00:05 eopeter