You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
The key has expired.
feat(android): support targetSdkVersion >= 31 (Android 12) (#185)
* feat(android): update Firebase Messaging to 23
This is needed for compatibility with targetSdkVersion>=31. Without it,
push messages cause a crash on Android 12 due to missing
FLAG_MUTABLE/FLAG_IMMUTABLE on PendingIntent[0], notification trampoline
issue, and possibly other such reasons.
Note that Firebase has removed the FirbaseInstanceId class in favor of
FirbaseInstallations. To restore it for now, add the firebase-iid
dependency, see [2].
[0] https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability
[1] https://developer.android.com/about/versions/12/behavior-changes-12#notification-trampolines
[2] https://firebase.google.com/support/release-notes/android#messaging_v22-0-0
* refactor(android): merge PushInstanceIDListenerService into FCMService
Since 1ae3428103298b85263785f1055b04b277feb92a, when
`PushInstanceIDListenerService` was changed away from the deprecated
`FirebaseInstanceIdService` to use
`FirebaseMessagingService::onNewToken`, there is no longer a need to use
a separate service anymore. Further, the `INSTANCE_ID_EVENT` intent
filter is not needed.
* refactor(android): remove unneeded indirection on onNewToken
The callback gets the new token already, there is no need to fetch it
again.
* refactor(android): avoid using deprecated InstanceId methods
These have been deprecated in recent firebase-messaging releases.
* fix(android): specify pending intent mutability for targetSdkVersion>=31
See:
https://developer.android.com/guide/components/intents-filters#DeclareMutabilityPendingIntent
* fix(android): improve the error handling around Tasks.await
Tasks.await throws ExecutionException so it needs to be unwrapped for
the existing error handling to work, otherwise an IOException causes the
app to crash.