First, add ACRA to your project:
Maven
<dependency>
<groupId>ch.acra</groupId>
<artifactId>acra</artifactId>
<version>4.9.2</version>
<type>aar</type>
</dependency>
Gradle
compile 'ch.acra:acra:4.9.2'
Now, you need a java class that extends Application. This is also defined in the manifest so no initialisation of the class is needed!
@ReportsCrashes(
formUri = "http://example.com/reportpath"
)
public class MyApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
ACRA.init(this);
}
}
In your manifest:
<application android:icon="@drawable/icon" android:label="@string/app_name"
IMPORTANT! ---> android:name="MyApplication" >
You need these permissions: (read logs is not necessary if you do not need to read the logcat)
<uses-permission android:name="android.permission.INTERNET"/>
That is everything you need java-wise. From here it splits in two. If your site supports CouchDB:
Install Acralyzer: https://github.com/ACRA/acralyzer
If your server doesn't have CouchDB, try one of these: https://github.com/ACRA/acra/wiki/Backends