question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default NotificationConfigurationBuilder and MailSenderConfigurationBuilder - do not opens e-mail application

See original GitHub issue

ACRA version 5.8.2 (and 5.8.1) using Java (not Kotlin).

Configuration is in Application.attachBaseContext():

        CoreConfigurationBuilder builder = new CoreConfigurationBuilder(this)
                .withBuildConfigClass(BuildConfig.class)
                .withReportFormat(StringFormat.KEY_VALUE_LIST);
        //builder.getPluginConfigurationBuilder(ToastConfigurationBuilder.class)
        //        .setResText(R.string.acra_toast_text)
        //        .setEnabled(true);
        builder.getPluginConfigurationBuilder(NotificationConfigurationBuilder.class)
                .withResChannelName(R.string.notification_channel_crash_report)
                .withResChannelImportance(NotificationManager.IMPORTANCE_DEFAULT)
                .withResIcon(R.drawable.ic_exclamation_notify)
                .withResTitle(R.string.acra_notification_title)
                .withResText(R.string.acra_notification_text)
                .withResSendButtonIcon(0)
                .withResDiscardButtonIcon(0)
                .withSendOnClick(true)
                .withEnabled(true);
        builder.getPluginConfigurationBuilder(MailSenderConfigurationBuilder.class)
                .withMailTo("henrich.gron@gmail.com")
                .withResSubject(R.string.acra_email_subject_text)
                .withResBody(R.string.acra_email_body_text)
                .withReportAsFile(true)
                .withReportFileName("crash_report.txt")
                .withEnabled(true);

        ACRA.DEV_LOGGING = true;

        ACRA.init(this, builder);

  1. In notification are two buttons: OK and CANCEL, Click on it do nothing.

  2. Click on notification body (is enabled by .withSendOnClick(true)) do not opens E-mail application or Share bottom sheet, but generated is:

2021-06-04 16:55:17.779 17970-17970/sk.henrichg.phoneprofilesplus D/ACRA: Found ConfigurationBuilders : [org.acra.config.MailSenderConfigurationBuilder@2c2a7e2, org.acra.config.NotificationConfigurationBuilder@6d48773] 2021-06-04 16:55:17.780 17970-17970/sk.henrichg.phoneprofilesplus D/ACRA: Using default Report Fields 2021-06-04 16:55:17.801 17970-17970/sk.henrichg.phoneprofilesplus D/ACRA: ACRA processName=‘sk.henrichg.phoneprofilesplus:acra’ 2021-06-04 16:55:17.810 17970-17970/sk.henrichg.phoneprofilesplus D/ACRA: Not initialising ACRA to listen for uncaught Exceptions as this is the SendWorker process and we only send reports, we don’t capture them to avoid infinite loops 2021-06-04 16:55:17.821 17970-17970/sk.henrichg.phoneprofilesplus D/ACRA: Registered content provider for authority sk.henrichg.phoneprofilesplus.acra

ACRA 5.7.0 working good.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:29 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
F43nd1rcommented, Jun 7, 2021

and the solution is to bail out of general app initialization if it’s the ACRA sender process

Yes.

1reaction
henrichgcommented, Jun 6, 2021

Workiiing 😃 Both fatal and non-fatal exception.

I’m added: if(ACRA.isACRASenderServiceProcess()) return;

  1. in onCreate() immediatelly after super.onCreate();
  2. in attatchBaseContext() immediatelly after super.attatchBaseContext();
  3. Acra configuration at attachBaseContext() but after if(ACRA.isACRASenderServiceProcess()) return;

Thank you very much.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to send emails from C#/.NET - The definitive tutorial
The ultimate guide to sending emails from C# based on our experiences with the built-in SMTP library in .NET, AWS Simple Email Service, ......
Read more >
How to set up a multifunction device or application to send ...
Option 1: Authenticate your device or application directly with a Microsoft 365 or Office 365 mailbox, and send mail using SMTP AUTH client...
Read more >
The configuration file 'appsettings.json' was not found and is ...
This worked fine running locally but on a production server it failed when the program was started from Powershell . Replaced with Assembly....
Read more >
Guide to Spring Email - Baeldung
In this tutorial, we'll walk through the steps needed to send emails from both a plain vanilla Spring application as well as a...
Read more >
Change General settings in Mail on Mac - Apple Support
To change these settings in the Mail app on your Mac, choose Mail > Settings, then click General. Open Mail for me. Option....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found