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

feat(android): support targetSdkVersion >= 31 (Android 12) #185

Merged
merged 6 commits into from
Aug 20, 2022

Commits on Apr 28, 2022

  1. 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
    bluetech committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    1cea759 View commit details
    Browse the repository at this point in the history
  2. refactor(android): merge PushInstanceIDListenerService into FCMService

    Since 1ae3428, 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.
    bluetech committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    44cd2db View commit details
    Browse the repository at this point in the history
  3. refactor(android): remove unneeded indirection on onNewToken

    The callback gets the new token already, there is no need to fetch it
    again.
    bluetech committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    8b069d6 View commit details
    Browse the repository at this point in the history
  4. refactor(android): avoid using deprecated InstanceId methods

    These have been deprecated in recent firebase-messaging releases.
    bluetech committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    3e48f5f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3260579 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2022

  1. 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.
    bluetech committed May 2, 2022
    Configuration menu
    Copy the full SHA
    cef6e8a View commit details
    Browse the repository at this point in the history