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

FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. #4

Closed
sudipta1411 opened this issue May 11, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@sudipta1411
Copy link

When I run the example app I get the following error
java.lang.RuntimeException: Unable to create service flutter.overlay.window.flutter_overlay_window.OverlayService: java.lang.IllegalArgumentException: com.example.flutter_overlay_window_example: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. E/AndroidRuntime(17128): 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.

It seems that in onCreate method of OverlayService, one needs to pass PendingIntent.FLAG_IMMUTABLE while creating the pending intent.

And also how to show some animation when showing the overlay. Right now it just pops up. It would be nice if there is some nice configurable animation.

@X-SLAYER
Copy link
Owner

hello
i just pushed a fix for this you can test it before I publish a new version

  flutter_overlay_window:
    git:
      url: https://github.com/X-SLAYER/flutter_overlay_window.git

for the animation side in the end you will show a flutter view so you can play with that on the flutter side I think

@sudipta1411
Copy link
Author

@X-SLAYER the proposed solution seems to works. Thanks for such a quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants