Extending Android Application class

I wouldn’t bother trying to merge your Constants class with this class. It isn’t worth the effort. Just create a new class that does what is necessary for ACRA. Like this:

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        // do the ACRA init here
    }
}

Now you need to make sure that your MyApplication class gets used. So you need to add android:name to the <application> tag entry in your manifest like so

<application
    android:name="fully.qualified.package.name.MyApplication"

Done.

Leave a Comment