当前位置: 首页>>代码示例>>Java>>正文


Java Bugsnag类代码示例

本文整理汇总了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();
}
 
开发者ID:jbmlaird,项目名称:DiscogsBrowser,代码行数:23,代码来源:App.java

示例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);
  }
}
 
开发者ID:JakeWharton,项目名称:Telecine,代码行数:23,代码来源:TelecineApplication.java

示例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();

    }
 
开发者ID:devilWwj,项目名称:Android-Tech,代码行数:13,代码来源:MainActivity.java

示例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));
}
 
开发者ID:bibhrajit,项目名称:openxc-androidStudio,代码行数:29,代码来源:OpenXcEnablerActivity.java

示例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);
  }
}
 
开发者ID:JakeWharton,项目名称:Telecine,代码行数:14,代码来源:BugsnagTree.java

示例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);
}
 
开发者ID:dinosaurwithakatana,项目名称:hacker-news-android,代码行数:29,代码来源:HackerNewsApplication.java

示例7: BugsnagLogger

import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
public BugsnagLogger(Context context, Configuration config){
    Bugsnag.init(context, config);
}
 
开发者ID:adriankeenan,项目名称:uob-timetable-android,代码行数:4,代码来源:BugsnagLogger.java

示例8: debug

import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override
public BugsnagLogger debug(String tag, String message) {
    Bugsnag.leaveBreadcrumb(tag + " - " + message);
    return this;
}
 
开发者ID:adriankeenan,项目名称:uob-timetable-android,代码行数:6,代码来源:BugsnagLogger.java

示例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;
}
 
开发者ID:adriankeenan,项目名称:uob-timetable-android,代码行数:6,代码来源:BugsnagLogger.java

示例10: error

import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override
public BugsnagLogger error(String tag, Exception exception) {
    Bugsnag.notify(exception, Severity.ERROR);
    return this;
}
 
开发者ID:adriankeenan,项目名称:uob-timetable-android,代码行数:6,代码来源:BugsnagLogger.java

示例11: plug

import com.bugsnag.android.Bugsnag; //导入依赖的package包/类
@Override public void plug(Context application) {
    Bugsnag.init(application);
}
 
开发者ID:ubiratansoares,项目名称:pluggable-frameworks-demo,代码行数:4,代码来源:CrashReporter.java

示例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));
}
 
开发者ID:eggheadcreative,项目名称:GeoFencingDemo,代码行数:7,代码来源:GeoFencingActivity.java


注:本文中的com.bugsnag.android.Bugsnag类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。