use of com.crashlytics.android.Crashlytics 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 com.crashlytics.android.Crashlytics in project MusicDNA by harjot-oberai.
the class MusicDNAApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics());
refWatcher = LeakCanary.install(this);
}
use of com.crashlytics.android.Crashlytics in project android-bootstrap by AndroidBootstrap.
the class BootstrapApplicationImpl method init.
@Override
protected void init() {
// Start Crashlytics.
Fabric.with(this, new Crashlytics());
// Set the type of logger, crashlytics in release mode
Timber.plant(new CrashlyticsTree());
}
use of com.crashlytics.android.Crashlytics 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());
}
use of com.crashlytics.android.Crashlytics in project ChatExchange by HueToYou.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Fabric.with(this, new Crashlytics());
setContentView(R.layout.activity_main);
hueUtils = new HueUtils();
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
mEditor = mSharedPrefs.edit();
mEditor.apply();
mHandler = new Handler();
// mEditor.putInt("tabIndex", 0).apply();
mUseDark = mSharedPrefs.getBoolean("isDarkMode", false);
mFragmentManager = getSupportFragmentManager();
mIntent = getIntent();
setup();
hueUtils.setActionBarColorDefault(this);
hueUtils.setAddChatFabColorDefault(this);
//ColorPickerDialog.newBuilder().setColor(color).show(activity);
}
Aggregations