Skip to main content

Custom Extensions

Implementing an extension

Create a class extending one of the supported interfaces.

It has to be public and have a zero-argument public constructor (as a result, it cannot be an inner class).


MyAdmin : ReportingAdministrator {
init {
Log.d("MyAdmin", "MyAdmin was loaded")
Supported ExtensionsUse Case
CollectorCollect additional custom data not covered by acra
ApplicationStartupCollectorCollector which is also called at startup
ReportInteractionUsually not needed, as the provided options (dialog, notification, toast) cover all reasonable choices
ReportingAdministratorControl when reports are generated and when the application should be stopped
ReportSenderFactoryRegister custom report senders
ConfigurationBuilderFactoryRegister custom configurations
SenderSchedulerFactoryRegister custom sender scheduler, e.g. to prevent report sending based on custom conditions
StartupProcessorDo something ACRA related on app start

Registering an extension

Choose one of the following alternatives:

By annotation

Add the following dependencies:

//either for java sources:
//or for kotlin sources (requires kapt gradle plugin):

Then annotate your extension with the following:


By file

See ServiceLoader for manual service registration