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 S requires extra flag on PendingIntent #88

Closed
ericleb010 opened this issue May 20, 2021 · 2 comments
Closed

Android S requires extra flag on PendingIntent #88

ericleb010 opened this issue May 20, 2021 · 2 comments
Labels
bug Something isn't working released

Comments

@ericleb010
Copy link

ericleb010 commented May 20, 2021

I was testing our app against Android S, and we're encountering crashes when starting a background service. Logcat gave the following error:

05-20 14:47:08.017 10882 10882 E AndroidRuntime: java.lang.RuntimeException: Unable to start service 
com.asterinet.react.bgactions.RNBackgroundActionsTask@7363fa8 with Intent { cmp=<app>/com.asterinet.react.bgactions.RNBackgroundActionsTask (has extras) }: 
java.lang.IllegalArgumentException: <app>: Targeting S+ (version 10000 and above) requires 
that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

05-20 14:47:08.017 10882 10882 E AndroidRuntime: 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.

Some info on the change here: https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability

@Rapsssito Rapsssito added the bug Something isn't working label May 22, 2021
@Rapsssito
Copy link
Owner

@ericleb010, thanks for the feedback! I will start working on it ASAP.

github-actions bot pushed a commit that referenced this issue Oct 4, 2021
## [2.6.3](v2.6.2...v2.6.3) (2021-10-04)

### Bug Fixes

* **Android:** Add Android S extra flag FLAG_IMMUTABLE ([824fe35](824fe35)), closes [#88](#88)
* Fix Gradle 7 compatibility ([92f9752](92f9752))
github-actions bot pushed a commit that referenced this issue Oct 4, 2021
## [2.6.4](v2.6.3...v2.6.4) (2021-10-04)

### Bug Fixes

* **Android:** Fix Gradle 7 and Android S compatibility ([e7452ba](e7452ba)), closes [#88](#88) [#87](#87)
@github-actions
Copy link

github-actions bot commented Oct 4, 2021

🎉 This issue has been resolved in version 2.6.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

2 participants