本文整理汇总了Java中org.acra.ACRAConfiguration.setCustomReportContent方法的典型用法代码示例。如果您正苦于以下问题:Java ACRAConfiguration.setCustomReportContent方法的具体用法?Java ACRAConfiguration.setCustomReportContent怎么用?Java ACRAConfiguration.setCustomReportContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.acra.ACRAConfiguration
的用法示例。
在下文中一共展示了ACRAConfiguration.setCustomReportContent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import org.acra.ACRAConfiguration; //导入方法依赖的package包/类
/**
* We do not do any loading or starting when the application is loaded.
* This can be requested by using useService()
*/
@Override
public void onCreate() {
super.onCreate();
LoadStoreIconData.onCreate(this);
ACRAConfiguration config = ACRA.getNewDefaultConfig(this);
config.setFormUri(getString(R.string.acralyzer_http_url));
config.setFormUriBasicAuthLogin(getString(R.string.acralyzer_http_login));
config.setFormUriBasicAuthPassword(getString(R.string.acralyzer_http_pwd));
config.setReportType(HttpSender.Type.JSON);
config.setResToastText(R.string.crash_toast_text);
config.setBuildConfigClass(BuildConfig.class);
try {
config.setMode(ReportingInteractionMode.TOAST);
} catch (ACRAConfigurationException e) {
e.printStackTrace();
}
config.setCustomReportContent(new ReportField[]{ReportField.REPORT_ID, ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME, ReportField.PACKAGE_NAME, ReportField.PHONE_MODEL, ReportField.ANDROID_VERSION, ReportField.BUILD, ReportField.BRAND, ReportField.PRODUCT, ReportField.TOTAL_MEM_SIZE, ReportField.AVAILABLE_MEM_SIZE, ReportField.CUSTOM_DATA, ReportField.STACK_TRACE, ReportField.USER_COMMENT, ReportField.USER_APP_START_DATE, ReportField.USER_CRASH_DATE, ReportField.USER_EMAIL, ReportField.IS_SILENT, ReportField.DEVICE_FEATURES, ReportField.SHARED_PREFERENCES, ReportField.THREAD_DETAILS});
ACRA.setConfig(config);
ACRA.init(this);
lifecycleHandler = new LifecycleHandler();
registerActivityLifecycleCallbacks(lifecycleHandler);
}
示例2: onCreate
import org.acra.ACRAConfiguration; //导入方法依赖的package包/类
@Override
public void onCreate() {
/*
* The following line triggers the initialization of ACRA
* ACRA is used to help with debug logs etc.
*/
ACRA.init(this);
ACRA.getErrorReporter().setReportSender(new CrashReporterSave(this));
ACRAConfiguration conf = ACRA.getNewDefaultConfig(this);
try {
conf.setCustomReportContent(new ReportField[] { DISPLAY, USER_COMMENT, USER_EMAIL, TOTAL_MEM_SIZE, AVAILABLE_MEM_SIZE });
conf.setResDialogCommentPrompt(R.string.crash_dialog_comment_prompt);
conf.setResToastText(R.string.crash_toast_text);
conf.setResDialogText(R.string.crash_dialog_text);
conf.setResDialogEmailPrompt(R.string.crash_dialog_email_prompt);
conf.setResDialogTitle(R.string.crash_dialog_title);
conf.setResDialogOkToast(R.string.crash_dialog_ok_toast);
conf.setMode(ReportingInteractionMode.DIALOG);
} catch (ACRAConfigurationException e) {
e.printStackTrace();
}
ACRA.setConfig(conf);
// Have to call this to continue loading Android
super.onCreate();
}
示例3: setErrorReportContentCrash
import org.acra.ACRAConfiguration; //导入方法依赖的package包/类
public static void setErrorReportContentCrash() {
ACRAConfiguration config = ACRA.getConfig();
config.setCustomReportContent(new ReportField[]{ReportField.REPORT_ID, ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME, ReportField.PACKAGE_NAME, ReportField.PHONE_MODEL, ReportField.ANDROID_VERSION, ReportField.BUILD, ReportField.BRAND, ReportField.PRODUCT, ReportField.TOTAL_MEM_SIZE, ReportField.AVAILABLE_MEM_SIZE, ReportField.CUSTOM_DATA, ReportField.STACK_TRACE, ReportField.USER_COMMENT, ReportField.USER_APP_START_DATE, ReportField.USER_CRASH_DATE, ReportField.USER_EMAIL, ReportField.IS_SILENT, ReportField.DEVICE_FEATURES, ReportField.SHARED_PREFERENCES, ReportField.THREAD_DETAILS});
ACRA.setConfig(config);
}
示例4: setErrorReportContentMessage
import org.acra.ACRAConfiguration; //导入方法依赖的package包/类
public static void setErrorReportContentMessage() {
ACRAConfiguration config = ACRA.getConfig();
config.setCustomReportContent(new ReportField[]{ReportField.REPORT_ID, ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME, ReportField.PACKAGE_NAME, ReportField.PHONE_MODEL, ReportField.ANDROID_VERSION, ReportField.BUILD, ReportField.BRAND, ReportField.PRODUCT, ReportField.TOTAL_MEM_SIZE, ReportField.AVAILABLE_MEM_SIZE, ReportField.CUSTOM_DATA, ReportField.USER_COMMENT, ReportField.USER_APP_START_DATE, ReportField.USER_CRASH_DATE, ReportField.USER_EMAIL, ReportField.IS_SILENT, ReportField.DEVICE_FEATURES, ReportField.SHARED_PREFERENCES, ReportField.THREAD_DETAILS});
ACRA.setConfig(config);
}
示例5: setErrorReportContentLogFile
import org.acra.ACRAConfiguration; //导入方法依赖的package包/类
public static void setErrorReportContentLogFile(String filename) {
ACRAConfiguration config = ACRA.getConfig();
config.setApplicationLogFile(filename);
config.setCustomReportContent(new ReportField[]{ReportField.REPORT_ID, ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME, ReportField.PACKAGE_NAME, ReportField.PHONE_MODEL, ReportField.ANDROID_VERSION, ReportField.BUILD, ReportField.BRAND, ReportField.PRODUCT, ReportField.CUSTOM_DATA, ReportField.APPLICATION_LOG, ReportField.USER_COMMENT, ReportField.USER_APP_START_DATE, ReportField.USER_EMAIL, ReportField.DEVICE_FEATURES, ReportField.SHARED_PREFERENCES});
ACRA.setConfig(config);
}