如何使用ACRA发送自定义报告?

时间:2013-08-09 11:12:10

标签: java android acra

ACRA允许您在销毁应用程序时发送报告。如何使用它在必要时刻发送报告?例如,在块中:

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

1 个答案:

答案 0 :(得分:3)

初始化ACRA:

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

尝试使用以下内容:

    try {
        // some code
    } catch (Exception e) {
        ErrorReporter.getInstance().handleException(e);
    }
相关问题