2012-10-19 106 views
0

我一直在靜音模式與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"); 

此前,該日誌被正確發送到我的谷歌文檔。

但現在我已經激活了通知,最大的問題是我得到了通知(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

Houps,我忘了:

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

現在固定... :-D

+1

您好,我知道這個問題是很老了,但是我還有抄在這個問題上你的代碼完全和IM沒有得到任何形式的通知。你還有什麼事嗎? – Ogen