4.0.0-dev.0
bluetech
tagged this
20 Aug 07:02
* 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.
Assets 2
-
2022-08-20T07:02:12Z -
2022-08-20T07:02:12Z -