本文整理汇总了Java中cat.ereza.customactivityoncrash.CustomActivityOnCrash.install方法的典型用法代码示例。如果您正苦于以下问题:Java CustomActivityOnCrash.install方法的具体用法?Java CustomActivityOnCrash.install怎么用?Java CustomActivityOnCrash.install使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cat.ereza.customactivityoncrash.CustomActivityOnCrash
的用法示例。
在下文中一共展示了CustomActivityOnCrash.install方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
CustomActivityOnCrash.install(this);
//初始化日志
XFrame.initXLog();
//初始化多状态界面View
XFrame.initXLoadingView()
.setErrorViewResId(R.layout._loading_layout_error);
/**
初始化网络请求的引擎,在这里可以一行代码切换,避免更换网络框架麻烦的问题
提供三种常见框架的简单案例:(你也可以按照例子自己实现)
AsyncHttpEngine、OKHttpEngine、VolleyHttpEngine
*/
XFrame.initXHttp(new AsyncHttpEngine());
/**
* 初始化全局图片加载框架
* GlideImageLoader为你的图片加载框架实现类
*/
XFrame.initXImageLoader(new GlideImageLoader(getApplicationContext()));
}
示例2: onCreate
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mContext = this;
//Install CustomActivityOnCrash
CustomActivityOnCrash.install(this);
CustomActivityOnCrash.setErrorActivityClass(ErrorActivity.class);
//Now initialize your error handlers as normal
//i.e., ACRA.init(this);
//or Fabric.with(this, new Crashlytics())
// Bugly.init(getApplicationContext(), "900037586", false);
/*ImageLoader.getInstance().init(new ImageLoaderConfiguration.Builder(this)
.memoryCache(new WeakMemoryCache())
.imageDownloader(new AuthImageDownloader(this)).threadPoolSize(7).build());*/
Fresco.initialize(this);
//init logUtil
LogUtil.setDebugOn(true);
LogUtil.setDebugLevel(5);
}
示例3: onCreate
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
CustomActivityOnCrash.install(this);
EventBus.getDefault().register(this);
EasyImage.configuration(this)
.saveInRootPicturesDirectory()
.setImagesFolderName(getString(R.string.app_name));
Nammu.init(this);
Paper.init(this);
Typekit.getInstance()
.addNormal(Typekit.createFromAsset(this, "fonts/LatoLatin-Regular.ttf"))
.addBold(Typekit.createFromAsset(this, "fonts/LatoLatin-Bold.ttf"))
.addItalic(Typekit.createFromAsset(this, "fonts/LatoLatin-Italic.ttf"))
.addBoldItalic(Typekit.createFromAsset(this, "fonts/LatoLatin-BoldItalic.ttf"))
.addCustom1(Typekit.createFromAsset(this, "fonts/Geomanist-Regular.otf"))
.addCustom2(Typekit.createFromAsset(this, "fonts/Handlee-Regular.ttf"));
initFabric();
initParse();
}
示例4: init
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
public static void init( Context app) {
// 初始化Bugly
if (!BuildConfig.DEBUG) {
// 获取当前包名
String packageName = app.getPackageName();
// 获取当前进程名
String processName = SysUtils.getProcessName(android.os.Process.myPid());
// 设置是否为上报进程
CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(app);
strategy.setUploadProcess(processName == null || processName.equals(packageName));
CrashReport.initCrashReport(app.getApplicationContext(),app.getString(R.string.bugly_app_id), false, strategy);
} else {
if (app.getResources().getBoolean(R.bool.crash_logger_enable)) {
Thread.currentThread()
.setUncaughtExceptionHandler(new CrashLogger(getAppContext()));
} else {
try{
CustomActivityOnCrash.install(app);
}catch (Exception e){
Log.e(e,"CrashReportConfig on CustomActivityOnCrash init");
}
}
}
}
示例5: onCreate
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
CustomActivityOnCrash.install(this);
if (LeakCanary.isInAnalyzerProcess(this)) {
return;
}
LeakCanary.install(this);
}
示例6: onCreate
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
@Override public void onCreate() {
super.onCreate();
instance = this;
PrefHelper.init(this);
TypeFaceHelper.generateTypeface(this);
CustomActivityOnCrash.setRestartActivityClass(MainView.class);
CustomActivityOnCrash.setShowErrorDetails(DEBUG);
CustomActivityOnCrash.install(this);
FacebookSdk.sdkInitialize(getApplicationContext());
FirebaseDatabase.getInstance().setPersistenceEnabled(true);
}
示例7: onCreate
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
@Override public void onCreate() {
super.onCreate();
instance = this;
FileHelper.initFolderName(getString(R.string.app_name));
PrefHelper.init(this);
TypeFaceHelper.generateTypeface(this);
CustomActivityOnCrash.setRestartActivityClass(MainView.class);
CustomActivityOnCrash.setShowErrorDetails(BuildConfig.DEBUG);
CustomActivityOnCrash.install(this);
}
示例8: onCreate
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
sAppComponent = DaggerAppComponent.builder().appModule(new AppModule(this)).build();
sAppComponent.inject(this);
if (BuildConfig.DEBUG || mSetting.isCatchCrashEnable()) {
CustomActivityOnCrash.install(this);
}
}
示例9: onCreate
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
CustomActivityOnCrash.install(this);
if (getSharedPreferences("data", MODE_PRIVATE).getInt("DataVersion", 1) != 3 && getSharedPreferences("data", MODE_PRIVATE).getBoolean("LoggedIn", false)) {
relogin = true;
Toast.makeText(StartActivity.this, getString(R.string.msg_old_version), Toast.LENGTH_LONG).show();
startActivity(new Intent(this, SetupActivity.class));
finish();
}
if (!getSharedPreferences("data", MODE_PRIVATE).getBoolean("LoggedIn", false) || relogin) {
startActivity(new Intent(this, SetupActivity.class));
finish();
} else if (!relogin) {
ConfigUtil configUtil = new ConfigUtil(getApplicationContext());
if (!ServiceUtil.isMyServiceRunning(AppointmentService.class, this) && configUtil.getBoolean("notification")) {
startService(new Intent(this, AppointmentService.class));
}
if (!ServiceUtil.isMyServiceRunning(AutoSilentService.class, this) && configUtil.getBoolean("auto-silent")) {
startService(new Intent(this, AutoSilentService.class));
}
//startService(new Intent(this, NewGradeService.class));
startActivity(new Intent(this, CalendarActivity.class));
finish();
}
}
示例10: onCreate
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
sApplication = this;
sAppComponent = DaggerAppComponent.builder().appModule(new AppModule(this)).build();
sAppComponent.inject(this);
CustomActivityOnCrash.install(this);
FlowManager.init(this);
}
示例11: onCreate
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
controller = this;
CustomActivityOnCrash.setRestartActivityClass(Home.class);
CustomActivityOnCrash.install(this);
Crashlytics crashlytics = new Crashlytics.Builder().disabled(BuildConfig.DEBUG).build();
Fabric.with(this, crashlytics);
mIconCache = new IconCache(this);
}
示例12: onCreate
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
CustomActivityOnCrash.install(this);
}
示例13: initCrashActivity
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
private void initCrashActivity() {
CustomActivityOnCrash.setShowErrorDetails(false);
CustomActivityOnCrash.install(application);
}
示例14: onCreate
import cat.ereza.customactivityoncrash.CustomActivityOnCrash; //导入方法依赖的package包/类
public boolean onCreate() {
CustomActivityOnCrash.install(getContext());
return false;
}