本文整理汇总了Java中org.acra.ACRAConfiguration.setFormUriBasicAuthPassword方法的典型用法代码示例。如果您正苦于以下问题:Java ACRAConfiguration.setFormUriBasicAuthPassword方法的具体用法?Java ACRAConfiguration.setFormUriBasicAuthPassword怎么用?Java ACRAConfiguration.setFormUriBasicAuthPassword使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.acra.ACRAConfiguration
的用法示例。
在下文中一共展示了ACRAConfiguration.setFormUriBasicAuthPassword方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import org.acra.ACRAConfiguration; //导入方法依赖的package包/类
@Override
public void onCreate() {
ACRA.init(this);
ACRAConfiguration config = ACRA.getConfig();
config.setFormUriBasicAuthLogin(getString(R.string.acra_login));
config.setFormUriBasicAuthPassword(getString(R.string.acra_password));
if (!BuildConfig.DEBUG) {
new ANRWatchDog().setANRListener(new ANRWatchDog.ANRListener() {
@Override
public void onAppNotResponding(ANRError error) {
ACRA.getErrorReporter().handleException(in.vesely.eclub.yodaqa.ANRError.New("app", false));
}
}).start();
}
super.onCreate();
}
示例2: onCreate
import org.acra.ACRAConfiguration; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
// Initialization of ACRA
final int toastText = getId("toast_text");
final String url = getText("url");
final String username = getText("username");
final String password = getText("password");
Log.d(TAG, String.format("Configuration Setup: PUT_URI='%s'", url));
final ACRAConfiguration config = ACRA.getNewDefaultConfig(this);
config.setResToastText(toastText);
config.setFormUri(url);
config.setFormUriBasicAuthLogin(username);
config.setFormUriBasicAuthPassword(password);
ACRA.setConfig(config);
ACRA.init(this);
}
示例3: onCreate
import org.acra.ACRAConfiguration; //导入方法依赖的package包/类
@Override
public void onCreate()
{
super.onCreate();
ACRA.init(this);
final ACRAConfiguration config = ACRA.getConfig();
config.setHttpMethod(Secrets.ACRA_HTTP_METHOD);
config.setReportType(Secrets.ACRA_REPORT_TYPE);
config.setFormUri(Secrets.ACRA_FORM_URI);
config.setFormUriBasicAuthLogin(Secrets.ACRA_FORM_URI_BASIC_AUTH_LOGIN);
config.setFormUriBasicAuthPassword(Secrets.ACRA_FORM_URI_BASIC_AUTH_PASSWORD);
ACRA.getErrorReporter().setDefaultReportSenders(); // see https://github.com/ACRA/acra/issues/58
if (isDebug())
{
Log.d("Application", "Disabling ACRA in debug mode");
ACRA.getErrorReporter().setEnabled(false);
}
}
示例4: 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);
}