本文整理汇总了Java中me.drakeet.library.CrashWoodpecker类的典型用法代码示例。如果您正苦于以下问题:Java CrashWoodpecker类的具体用法?Java CrashWoodpecker怎么用?Java CrashWoodpecker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CrashWoodpecker类属于me.drakeet.library包,在下文中一共展示了CrashWoodpecker类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import me.drakeet.library.CrashWoodpecker; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
resource = context.getResources();
if (hasMemoryLeak()) {
refWatcher = LeakCanary.install(this);//预定义的 RefWatcher,同时也会启用一个 ActivityRefWatcher
}
if (hasCrashLog()) {
CrashWoodpecker.fly().to(this);//崩溃异常捕获
}
}
示例2: initCrashWoodpecker
import me.drakeet.library.CrashWoodpecker; //导入依赖的package包/类
/**
* 崩溃提示
*/
private void initCrashWoodpecker() {
CrashWoodpecker.instance()
.withKeys("widget", "me.drakeet")
.setPatchMode(PatchMode.SHOW_LOG_PAGE)
.setPatchDialogUrlToOpen("https://drakeet.me")
.setPassToOriginalDefaultHandler(true)
.flyTo(this);
}
示例3: onCreate
import me.drakeet.library.CrashWoodpecker; //导入依赖的package包/类
/**
* Build object graph on creation so that objects are available
*/
@Override
public void onCreate() {
super.onCreate();
Prefs.with(this).useDefault().init();
boolean enableLeakCanary = Prefs.getBoolean("prefs_debug_enable_leak_canary", true);
boolean enableCrashWoodpecker = Prefs.getBoolean("prefs_debug_enable_crash_woodpecker", true);
if(enableLeakCanary)
LeakCanary.install(this);
if(enableCrashWoodpecker)
CrashWoodpecker.fly().to(this);
boolean isNightMode = Prefs.getBoolean(PreferenceConstant.SHARED_PREFERENCE_IS_NIGHT_MODE, false);
if(isNightMode) {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
} else {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
}
AnalyticsUtils.init(this, getString(R.string.UMENG_APPKEY_VALUE));
Fabric.with(this, new Crashlytics());
Timber.plant(new CrashReportingTree());
UmengUpdateAgent.setAppkey(getString(R.string.UMENG_APPKEY_VALUE));
UmengUpdateAgent.update(this);
mAndroidNavigation = new AndroidNavigation();
appComponent = DaggerAppComponent
.builder()
.appModule(new AppModule(this, mAndroidNavigation))
.build();
/*Intent chapterContentCacheServiceIntent = new Intent(this, ChapterContentsCacheService.class);
startService(chapterContentCacheServiceIntent);
Intent loadLocalTextServiceIntent = new Intent(this, LocalFileImportService.class);
startService(loadLocalTextServiceIntent);*/
}
示例4: onCreate
import me.drakeet.library.CrashWoodpecker; //导入依赖的package包/类
@Override public void onCreate() {
super.onCreate();
CrashWoodpecker.flyTo(this).withKeys("me.drakeet");
LeakCanary.install(this);
TimeKey.install(getString(R.string.app_name), "drakeet");
}
示例5: onCreate
import me.drakeet.library.CrashWoodpecker; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
CrashWoodpecker.fly().to(this);
}