ACRA显示通知,然后没有关于通知点击的对话框

时间:2012-10-19 15:10:25

标签: android acra

我在ACRA的静音模式下工作了很长时间。 一切都很好,这是一个很棒的库。

但是今天,我只是想为客户端使用通知方法。

我这样用过:

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

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

侯普斯,我忘了:

<activity android:name="org.acra.CrashReportDialog"
    android:theme="@android:style/Theme.Dialog"
    android:launchMode="singleInstance"
    android:excludeFromRecents="true"
    android:finishOnTaskLaunch="true" />

现在修复...... :-D