1

Steps:

Result:

  • Activity does not start.
  • Following log is printed in Logcat

10-06 10:18:22.977 1534 3091 E NotificationService: Indirect notification activity start (trampoline) from com.example.app blocked


By rewriting following code

builder.setContentIntent(
          NotificationManager.redirectIntentForAnalytics(
            context,
            PendingIntent.getActivity(
              context,
              Random().nextInt(),
              Intent(context, MainActivity::class.java),
              PendingIntent.FLAG_UPDATE_CURRENT
            ),
            notificationMessage,
            true
          )
        )

with

builder.setContentIntent(
          PendingIntent.getActivity(
              context,
              Random().nextInt(),
              Intent(context, MainActivity::class.java),
              PendingIntent.FLAG_UPDATE_CURRENT
          )
        )

the app is launches correctly.

I think this problem is related to https://developer.android.com/about/versions/12/behavior-changes-12?hl=en#notification-trampolines

How to fix this problem?

4
  • Thank you. Researching.
    – Bill Mote
    Oct 6, 2021 at 11:43
  • An immediate fix, obviously, would be to temporarily eliminate the redirectForAnalytics() wrapper of the PendingIntent, but this will affect the open analytics reported for the messages. We're looking into a solution.
    – Bill Mote
    Oct 6, 2021 at 11:49
  • Alternatively, you could target Android 30 which would work as-is today while we prepare a fix.
    – Bill Mote
    Oct 6, 2021 at 13:12
  • 1
    I'm going to leave targetSdkVersion at 30 until this issue is fixed. Thank you.
    – virifi
    Oct 6, 2021 at 23:26

1 Answer 1

0

Please update to version 8.0.1 which has been released to address this issue.

1
  • 1
    I confirmed that the issue has been fixed on version 8.0.1. Thank you.
    – virifi
    Oct 15, 2021 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.