我一直在静音模式下工作了很长时间。一切都很好,这是一个很棒的lib。
但是今天,我只是想为客户使用通知方法。
我这样使用了:
在myapplication
中@ReportsCrashes(formKey = "****",
mode = ReportingInteractionMode.NOTIFICATION,
resToastText = R.string.crash_toast_text, // optional, displayed as soon as the crash occurs, before collecting data which can take a few seconds
resNotifTickerText = R.string.crash_notif_ticker_text,
resNotifTitle = R.string.crash_notif_title,
resNotifText = R.string.crash_notif_text,
resNotifIcon = android.R.drawable.stat_notify_error, // optional. default is a warning sign
resDialogText = R.string.crash_dialog_text,
resDialogIcon = android.R.drawable.ic_dialog_info, //optional. default is a warning sign
resDialogTitle = R.string.crash_dialog_title, // optional. default is your application name
resDialogCommentPrompt = R.string.crash_dialog_comment_prompt, // optional. when defined, adds a user text field input with this text resource as a label
resDialogOkToast = R.string.crash_dialog_ok_toast // optional. displays a Toast message when the user accepts to send a report.
)
以及XML文件中的所有次数。
在我的活动中,我会这样崩溃:
String i=null;
i.contains("kj");
以前,日志已正确发送到我的Google文档。
但是,现在我已经激活了通知,最大的问题是我收到通知(Android 4.1.2),当我单击它时,什么也不会发生。
logcat给我这个:
10-19 17:08:36.599: I/ACRA(12018): READ_LOGS granted! ACRA can include LogCat and DropBox data.
10-19 17:08:36.614: D/ACRA(12018): Retrieving logcat output...
10-19 17:08:36.700: D/dalvikvm(12018): GC_CONCURRENT freed 861K, 30% free 6778K/9603K, paused 12ms+3ms, total 33ms
10-19 17:08:36.700: D/dalvikvm(12018): WAIT_FOR_CONCURRENT_GC blocked 14ms
10-19 17:08:36.700: D/ACRA(12018): Writing crash report file 1350659316000.stacktrace.
10-19 17:08:36.732: D/ACRA(12018): About to send status bar notification from #handleException
10-19 17:08:36.732: D/ACRA(12018): Creating Notification for 1350659316000.stacktrace
10-19 17:08:36.763: W/System.err(12018): at java.lang.Thread.run(Thread.java:856)
10-19 17:08:36.771: D/ACRA(12018): Waiting for Toast + worker...
10-19 17:08:39.786: D/ACRA(12018): Wait for Toast + worker ended. Kill Application ? true
有什么想法?
houps,我忘记了:
<activity android:name="org.acra.CrashReportDialog"
android:theme="@android:style/Theme.Dialog"
android:launchMode="singleInstance"
android:excludeFromRecents="true"
android:finishOnTaskLaunch="true" />
现在修复...:d