Android 12 issue changeNotificationOptions parameter onTapBringToFront
Just On Android 12 when I call location.changeNotificationOptions with the parameter onTapBringToFront = true flutter generates the error below
E/flutter ( 6703): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(CHANGE_NOTIFICATION_OPTIONS_ERROR, An unexpected error happened during notification options change:com.smartinteragerisk: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
E/flutter ( 6703): 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., null, null)
I tested in Android, API 31 simulator and real device
Someone can help me?
I am also facing the same issue. Any workaround?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any updates?
I have the same issue, any updates? Tested on Android, API 31 real device. No issue on Android 11 real device.
I have the same issue, any updates?
Same issue, any updates?
Nothing yet I guess...
error = PlatformException(CHANGE_NOTIFICATION_OPTIONS_ERROR, An unexpected error happened during notification options change:com.livelikelocal.app: 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., null, null) 🚫
I added implementation 'androidx.work:work-runtime-ktx:2.7.0' in gradle but nothing changed
I have the same issue, app not working on API 31+. Is there any workaround for this?
I guess we're fucked
Hot fixes
- Downgrading
targetSdkto 30 works (if you can) - You can also set
onTapBringToFront: falsewhen callingchangeNotificationOptions
I think this is the culprit
Same issue here
Same issue here
Same issue
No movement in over a year.. I don't think this one is going to get fixed...
Since the play store now has a rule that new apps must target API 33 downgrading just isn't an option.
Possible fix: https://github.com/Lyokone/flutterlocation/pull/640 Duplicated: https://github.com/Lyokone/flutterlocation/issues/639
Would be great to see any movement on this as it is a bummer for the app users :(.
The bug has been fixed in version 5.0.3 I tested it and it worked