【问题标题】:How to use ACRA to send custom reports? [closed]如何使用 ACRA 发送自定义报告? [关闭]
【发布时间】:2013-08-09 11:12:10
【问题描述】:

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

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

【问题讨论】:

    标签: java android acra


    【解决方案1】:

    初始化 ACRA:

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

    尝试使用以下内容:

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

    【讨论】:

    • 谢谢!它也可以在没有ErrorReporter.getInstance().addReportSender(new CustomReportSender()); 的情况下工作
    猜你喜欢
    • 2013-07-02
    • 2013-12-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多