Back to project page mcdroid.
The source code is released under:
Apache License
If you think the Android project mcdroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * /*from ww w .j a v a 2 s . co m*/ */ package cn.mibcxb.android.app; import org.acra.ACRA; import org.acra.ACRAConfiguration; import org.acra.annotation.ReportsCrashes; import android.app.Application; import android.text.TextUtils; import cn.mibcxb.acra.CrashReportWriter; import cn.mibcxb.android.util.Logger; /** * @author chenxb * */ @ReportsCrashes(formKey = "", formUri = "http://acra.mibcxb.org/report") public abstract class McApplication extends Application { private static final String TAG = Logger.getSimpleTag(McApplication.class); private static final String[] LOGCAT_ARGUMENTS = { "-t", "200", "-v", "threadtime" }; @Override public void onCreate() { super.onCreate(); Logger.i(TAG, "Application: " + getSimpleTag() + " onCreate"); ACRA.init(this); ACRAConfiguration config = ACRA.getConfig(); config.setLogcatArguments(LOGCAT_ARGUMENTS); if (!TextUtils.isEmpty(getFormUri())) { config.setFormUri(getFormUri()); } if (saveCrashReport()) { ACRA.getErrorReporter().addReportSender(new CrashReportWriter()); } } protected String getSimpleTag() { return TAG; } protected abstract String getFormUri(); protected abstract boolean saveCrashReport(); }