0

I have a library project and different sub-projects with images/teksts etc, that use this library. I want every app (sub-project) to have it's own crashreport formkey, but I can only set it once, statically in the library's Application class, using "@ReportsCrashes(formKey=..."

Is there another way to set it up, so the formkey can differ for every app I create using this library?

Frank
  • 12,010
  • 8
  • 61
  • 78

1 Answers1

0

Found the solution. You'll need the very latest version of Acra, and do exactly this:

@ReportsCrashes(formKey = "")
public class RootApplication extends Application {

@Override
public void onCreate() {

    ACRA.getConfig().setFormKey(
            getResources().getString(R.string.acra_form_key));
    ACRA.init(this);
    ACRA.getErrorReporter().setReportSender(new HockeySender());

    super.onCreate();
}

}

Of course you only use a hockeysender when you use hockeyapp.

Frank
  • 12,010
  • 8
  • 61
  • 78