本文整理汇总了Java中com.bugsnag.android.Bugsnag类的典型用法代码示例。如果您正苦于以下问题:Java Bugsnag类的具体用法?Java Bugsnag怎么用?Java Bugsnag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Bugsnag类属于com.bugsnag.android包,在下文中一共展示了Bugsnag类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override
public void onCreate()
{
super.onCreate();
if (LeakCanary.isInAnalyzerProcess(this))
{
// This process is dedicated to LeakCanary for heap analysis.
// You should not init your app in this process.
return;
}
setupGraph();
Iconify.with(new FontAwesomeModule());
if (!BuildConfig.DEBUG)
Bugsnag.init(this);
else
LeakCanary.install(this);
// Empty string while RxSocialConnect's disk cache is not working
RxSocialConnect.register(this, "")
.using(new GsonSpeaker());
NavigationDrawerBuilder.initialiseMaterialDrawerImageLoader();
}
示例2: onCreate
import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override public void onCreate() {
DaggerTelecineComponent.builder().application(this).build().inject(this);
super.onCreate();
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
} else {
Bugsnag.init(this, BuildConfig.BUGSNAG_KEY);
Bugsnag.setReleaseStage(BuildConfig.BUILD_TYPE);
Bugsnag.setProjectPackages("com.jakewharton.telecine");
final BugsnagTree tree = new BugsnagTree();
Bugsnag.getClient().beforeNotify(new BeforeNotify() {
@Override public boolean run(Error error) {
tree.update(error);
return true;
}
});
Timber.plant(tree);
}
}
示例3: onCreate
import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Bugsnag.init(this);
// Bugsnag.notify(new RuntimeException("Non-fatal"));
// testJavaCrash();
testNativeCrash();
}
示例4: onCreate
import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String bugsnagToken = getBugsnagToken(this);
if(bugsnagToken != null && !bugsnagToken.isEmpty()) {
try {
Bugsnag.register(this, bugsnagToken);
} catch(NoClassDefFoundError e) {
Log.w(TAG, "Busgnag is unsupported when building from Eclipse", e);
}
} else {
Log.i(TAG, "No Bugsnag token found in AndroidManifest, not enabling Bugsnag");
}
Log.i(TAG, "OpenXC Enabler created");
setContentView(R.layout.main);
mAdapter = new EnablerFragmentAdapter(getSupportFragmentManager());
mPager = (ViewPager) findViewById(R.id.pager);
mPager.setAdapter(mAdapter);
if (savedInstanceState != null) {
mPager.setCurrentItem(savedInstanceState.getInt("tab", 0));
}
startService(new Intent(this, VehicleManager.class));
startService(new Intent(this, PreferenceManagerService.class));
}
示例5: log
import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override
protected void log(int priority, String tag, String message, Throwable t) {
message = System.currentTimeMillis() + " " + priorityToString(priority) + " " + message;
synchronized (buffer) {
buffer.addLast(message);
if (buffer.size() > BUFFER_SIZE) {
buffer.removeFirst();
}
}
if (t != null && priority == Log.ERROR) {
Bugsnag.notify(t);
}
}
示例6: onCreate
import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
if (sInstance == null) {
sInstance = this;
}
if("release".equals(BuildConfig.BUILD_TYPE)){
Bugsnag.init(this);
}
mContext = getApplicationContext();
Stetho.initialize(
Stetho.newInitializerBuilder(this)
.enableDumpapp(
Stetho.defaultDumperPluginsProvider(this))
.enableWebKitInspector(
Stetho.defaultInspectorModulesProvider(this))
.build());
sAppModule = new AppModule(this);
sAppComponent = DaggerAppComponent.builder()
.appModule(sAppModule)
.build();
sAppComponent.inject(this);
LocalDataManager.initialize(mContext);
}
示例7: BugsnagLogger
import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
public BugsnagLogger(Context context, Configuration config){
Bugsnag.init(context, config);
}
示例8: debug
import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override
public BugsnagLogger debug(String tag, String message) {
Bugsnag.leaveBreadcrumb(tag + " - " + message);
return this;
}
示例9: warn
import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override
public BugsnagLogger warn(String tag, String message) {
Bugsnag.notify(new Exception(message), Severity.WARNING);
return this;
}
示例10: error
import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override
public BugsnagLogger error(String tag, Exception exception) {
Bugsnag.notify(exception, Severity.ERROR);
return this;
}
示例11: plug
import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override public void plug(Context application) {
Bugsnag.init(application);
}
示例12: onCreate
import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bugsnag.register(this, "7977d834798df3256fcfec6e847a6902");
Bugsnag.setNotifyReleaseStages("production", "staging", "demo");
Bugsnag.setReleaseStage(getResources().getString(R.string.environment_name));
}