Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 12 issue changeNotificationOptions parameter onTapBringToFront #702

Open
bbarbosa84 opened this issue Mar 16, 2022 · 16 comments
Open
Labels

Comments

@bbarbosa84
Copy link

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?

@tarunsareen-qss
Copy link

I am also facing the same issue. Any workaround?

@stale
Copy link

stale bot commented Apr 28, 2022

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.

@stale stale bot added the inactive label Apr 28, 2022
@ahmetcj4
Copy link

Any updates?

@stale stale bot removed the inactive label May 25, 2022
@lluisclava
Copy link

I have the same issue, any updates? Tested on Android, API 31 real device. No issue on Android 11 real device.

@bazrafkan
Copy link

I have the same issue, any updates?

@taila-teq
Copy link

Same issue, any updates?

@arg0nath
Copy link

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

@vdjurdjevic
Copy link

I have the same issue, app not working on API 31+. Is there any workaround for this?

@diego-lipinski-de-castro

I guess we're fucked

@lemohammed
Copy link

lemohammed commented Dec 19, 2022

Hot fixes

  1. Downgrading targetSdk to 30 works (if you can)
  2. You can also set onTapBringToFront: false when calling changeNotificationOptions

I think this is the culprit

@mdembny
Copy link

mdembny commented Mar 21, 2023

Same issue here

1 similar comment
@bilalalmofleh
Copy link

Same issue here

@giovanni256
Copy link

Same issue

@TonyHoyle
Copy link

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.

@Cotspheer
Copy link

Cotspheer commented Aug 3, 2023

Possible fix: #640
Duplicated: #639

Would be great to see any movement on this as it is a bummer for the app users :(.

@bbarbosa84
Copy link
Author

The bug has been fixed in version 5.0.3
I tested it and it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.