try {
CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(this);
strategy.setCrashHandleCallback(new CrashReport.CrashHandleCallback() {
public Map (int crashType, String errorType, String errorMessage, String errorStack) {
LinkedHashMap map = new LinkedHashMap();
String x5CrashInfo = com.tencent.smtt.sdk.WebView.getCrashExtraMessage(GFApplication.this);
map.put("x5crashInfo", x5CrashInfo);
return map;
}
public byte[] onCrashHandleStart2GetExtraDatas(int crashType, String errorType, String errorMessage, String errorStack) {
try {
return "Extra data.".getBytes("UTF-8");
} catch (Exception e) {
return null;
}
}
});
CrashReport.initCrashReport(this, "你的appID", false, strategy);
} catch (Exception e) {
e.printStackTrace();
}
近期评论