Question

ACRA allows you to send reports when an application is destroyed. How to use it to send a report during the necessary moment? For example, in block:

    try {
        // some code
    } catch (Exception e) {
        // send custom report with exception stack trace
    }
Was it helpful?

Solution

Initialize ACRA:

ACRA.init(this);
ErrorReporter.getInstance().addReportSender(new CustomReportSender());

Try to use following:

    try {
        // some code
    } catch (Exception e) {
        ErrorReporter.getInstance().handleException(e);
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top