use of io.fabric.sdk.android.Fabric in project zype-android by zype.
the class ZypeApp method initFabric.
private void initFabric() {
if (!BuildConfig.DEBUG) {
Fabric.with(this, new Crashlytics());
} else {
final Fabric fabric = new Fabric.Builder(this).kits(new Crashlytics()).debuggable(true).build();
Fabric.with(fabric);
}
}
use of io.fabric.sdk.android.Fabric in project Just-Another-Android-App by athkalia.
the class App method initFabric.
/**
* Setup Fabric. We also set the build time and sha key so that we can easily reproduce bug reports.
*
* Note 1: To send an exception to crashlytics use {@link Crashlytics#logException(Throwable)}. It will send a non-fatal exception.
* This is reported separately in the crashlytics dashboard. See
* https://docs.fabric.io/android/crashlytics/caught-exceptions.html?caught%20exceptions#caught-exceptions for more details.
*
* Note 2: To log a statement in Crashlytics use {@link Crashlytics#log(String)}. This log statement will appear when clicking on a
* specific crash report. For example if you have a crash that occurred 10 times, one would need to click through all 10 instances of
* that crash to see the individual log statements for every instance of this crash.
* See https://docs.fabric.io/android/crashlytics/enhanced-reports.html for more info.
*
* Note 3: To log a key-value pair in Crashlytics use {@link Crashlytics#setString(String, String)}. Same concept as logging a
* statement described in Note 2.
*/
private void initFabric() {
CrashlyticsCore crashlyticsCore = new CrashlyticsCore.Builder().disabled(// 'debug' builds not using fabric, 'qa' and 'release' do.
"debug".equals(BuildConfig.BUILD_TYPE)).build();
Crashlytics crashlytics = new Crashlytics.Builder().core(crashlyticsCore).build();
Answers answers = new Answers();
final Fabric fabric = new Fabric.Builder(getApplicationContext()).kits(crashlytics, answers).debuggable(// 'debug' and 'qa' build types have extra log statements, 'release' build type doesn't.
BuildConfig.DEBUG).build();
Fabric.with(fabric);
Crashlytics.setString("GIT_SHA_KEY", BuildConfig.GIT_SHA);
Crashlytics.setString("BUILD_TIME", BuildConfig.BUILD_TIME);
}
use of io.fabric.sdk.android.Fabric in project jianshi by wingjay.
the class JianShiApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
appComponent = DaggerAppComponent.builder().appModule(new AppModule(JianShiApplication.this)).build();
final Fabric fabric = new Fabric.Builder(this).kits(new Crashlytics()).debuggable(true).build();
Fabric.with(fabric);
Stetho.initializeWithDefaults(this);
instance = this;
FlowManager.init(new FlowConfig.Builder(this).openDatabasesOnInit(true).build());
initLog();
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder().setDefaultFontPath("fonts/jianshi_default.otf").setFontAttrId(R.attr.fontPath).build());
}
Aggregations