안녕하세요 에어 브레이크에 충돌 보고서를 보내야합니다.하지만 ACRA는 안드로이드 플랫폼에서이 목적을 위해 훨씬 더 강력한 도구라고 믿습니다. AirbrakeNotifier.notify();
을 수행하는 ACRA에 대해 ReposrtSender
을 구현하십시오. 아쉽게도 예외로 매개 변수를 사용해야하지만 send()
메서드는 CrashReportData
만 제공합니다. 여기 ACRA 커스텀 센더에서 Exception 또는 Throwable을 얻는 방법
public interface ReportSender {
/**
* Send crash report data. You don't have to take care of managing Threads,
* just implement what is necessary to handle the data. ACRA will use a
* specific Thread (not the UI Thread) to run your sender.
*
* @param errorContent
* Stores key/value pairs for each report field. A report field
* is identified by a {@link ReportField} enum value.
* @throws ReportSenderException
* If anything goes fatally wrong during the handling of crash
* data, you can (should) throw a {@link ReportSenderException}
* with a custom message.
*/
public void send(CrashReportData errorContent) throws ReportSenderException;
}
는 에어 브레이크에 보고서를 보내야 보낸 사람의 내 구현 :
public class MyReportSender implements ReportSender {
public void send(CrashReportData errorContent) throws ReportSenderException {
AirbrakeNotifier.notify(/*Exception is required here*/);
// But only key/value pairs are available here in errorContent param.
}
}
내가
CrashReporData
에서 일부 데이터를 새로운 예외를 만들 수 있지만 원래 하나를 얻을 훨씬 더 나은 것으로 나타났습니다
만약에 가능하다면.
프로젝트의 libs와 디렉토리 내부
예외는 어디입니까? –
이것은 예외 정보를 수집하기 위해 프로젝트를 ACRA에 등록 할 수있는 방법입니다. 모든 클래스에서 예외를 원한다면 정수에서 null 값을 파싱 할 수 있습니다. ACRA에서 예외가 발생합니다. –
불행히도 어떤 식 으로든 도움이되지 않습니다. 프로젝트의 등록 ACRA가 아니라 맞춤 발신자의 Excetion에 대한 질문입니다. 시도해 주셔서 감사합니다. –