ACRA/acra

Notification does not launch intent

jefflongo opened this issue · 2 comments

Required reading
https://github.com/ACRA/acra/wiki/How-to-debug-ACRA

Describe the bug
When using a notification to prompt the user to submit a bug report with something like MailSender, the following error arises:

Indirect notification activity start (trampoline) from com.example.acracrashdemo blocked

The following demo application can reproduce the bug using the API 33 resizable emulator device. Seems like this could be related to some changes with Android 12.

The ACRA initialization looks like this:

ACRA.init(this, new CoreConfigurationBuilder()
        .withBuildConfigClass(BuildConfig.class)
        .withReportFormat(StringFormat.JSON)
        .withLogcatArguments("-t", "100", "-v", "long")
        .withPluginConfigurations(
                new NotificationConfigurationBuilder()
                        .withTitle("title")
                        .withText("text")
                        .withChannelName(getString(R.string.app_name))
                        .withSendOnClick(true)
                        .build(),
                new MailSenderConfigurationBuilder()
                        .withMailTo("dummy@dummy.com")
                        .withReportAsFile(true)
                        .withReportFileName("filename")
                        .withSubject("Subject")
                        .withBody("body")
                        .build()
        )
);

Expected behavior
Tapping the notification should launch the email application.

Version

  • Samsung S22+
  • Android: 13 (API 33)
  • ACRA 5.9.8-beta02
  • Compile SDK version: 33
  • Target SDK version: 33
  • Java

Note that the workaround for this issue is an intermediate activity instead of a broadcast receiver. If the phone is slow enough, this activity might be visible to the user (but I can't make it transparent because android detects it and flags it as background if I try).

Can confirm this solved the issue. Thanks!