-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Interactions
Documentation has moved! Visit acra.ch for versions 5.8 forward
The default behavior of ACRA is to send crash reports silently. From the application user point of view, the app closes, and that's all. Though, a report has been sent without the user being aware of it.
Depending on the state of your application and your concern of your users data plan usage and private data handling, you might prefer notifying them that a crash report has been sent, or even ask them the authorization to send one... and why not ask them to describe what they were doing during the crash. The following section details those user interactions.
Nothing shown, nothing to configure.
A Toast with your text is shown. No user interaction.
@AcraToast(resText=R.string.acra_toast_text,
length = Toast.LENGTH_LONG)
A widely customizeable dialog is shown. A report will only be sent if the user agrees.
For a complete list of all available options, see @AcraDialog
If you need more control than the configuration provides, you can set your own dialogactivity in reportDialogClass
. Remember, activities have to be registered in the AndroidManifest.xml
:
<activity
<!-- required -->
android:name="my.package.MyCustomCrashReportDialog"
android:process=":acra"
<!-- recommended -->
android:excludeFromRecents="true"
android:finishOnTaskLaunch="true"
android:launchMode="singleInstance"/>
@AcraDialog(resText = R.string.dialog_text,
resCommentPrompt = R.string.dialog_comment)
A notification is shown. A report will only be sent if the user agrees.
For a complete list of all available options, see @AcraNotification
.
Please note that the channel name is not optional if you are targeting Oreo or above.
@AcraNotification(resText = R.string.notification_text,
resTitle = R.string.notification_title,
resChannelName = R.string.notification_channel)