use of org.acra.annotation.ReportsCrashes in project acra by ACRA.
the class ACRA method init.
/**
* <p>
* Initialize ACRA for a given Application.
*
* The call to this method should be placed as soon as possible in the {@link Application#attachBaseContext(Context)} method.
*
* Uses the configuration as configured with the @ReportCrashes annotation.
* Sends any unsent reports.
* </p>
*
* @param app Your Application class.
* @throws IllegalStateException if it is called more than once.
*/
public static void init(@NonNull Application app) {
final ReportsCrashes reportsCrashes = app.getClass().getAnnotation(ReportsCrashes.class);
if (reportsCrashes == null) {
log.e(LOG_TAG, "ACRA#init(Application) called but no ReportsCrashes annotation on Application " + app.getPackageName());
return;
}
init(app, new ConfigurationBuilder(app));
}
Aggregations