use of com.crashlytics.android.Crashlytics in project xDrip by NightscoutFoundation.
the class xdrip method initCrashlytics.
public static synchronized void initCrashlytics(Context context) {
if ((!fabricInited) && !isRunningTest()) {
try {
Crashlytics crashlyticsKit = new Crashlytics.Builder().core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build();
Fabric.with(context, crashlyticsKit);
} catch (Exception e) {
Log.e(TAG, e.toString());
}
fabricInited = true;
}
}
use of com.crashlytics.android.Crashlytics in project Shuttle by timusus.
the class ShuttleApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
DaggerAppComponent.builder().create(this).inject(this);
if (LeakCanary.isInAnalyzerProcess(this)) {
// You should not init your app in this process.
return;
}
// Todo: Remove for production builds. Useful for tracking down crashes in beta.
RxDogTag.install();
if (BuildConfig.DEBUG) {
// enableStrictMode();
}
refWatcher = LeakCanary.install(this);
// workaround to fix InputMethodManager leak as suggested by LeakCanary lib
InputMethodManagerLeaks.fixFocusedViewLeak(this);
// Crashlytics
CrashlyticsCore crashlyticsCore = new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build();
Fabric.with(this, new Crashlytics.Builder().core(crashlyticsCore).answers(new Answers()).build());
// Firebase
FirebaseApp.initializeApp(this);
FirebaseAnalytics.getInstance(this);
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
// files with readAgain flag set to false, so always check KEY_HAS_SET_DEFAULT_VALUES
if (!prefs.getBoolean(PreferenceManager.KEY_HAS_SET_DEFAULT_VALUES, false)) {
PreferenceManager.setDefaultValues(this, R.xml.settings_headers, true);
PreferenceManager.setDefaultValues(this, R.xml.settings_artwork, true);
PreferenceManager.setDefaultValues(this, R.xml.settings_blacklist, true);
PreferenceManager.setDefaultValues(this, R.xml.settings_display, true);
PreferenceManager.setDefaultValues(this, R.xml.settings_headset, true);
PreferenceManager.setDefaultValues(this, R.xml.settings_scrobbling, true);
PreferenceManager.setDefaultValues(this, R.xml.settings_themes, true);
}
// Turn off logging for jaudiotagger.
jaudioTaggerLogger1.setLevel(Level.OFF);
jaudioTaggerLogger2.setLevel(Level.OFF);
TagOptionSingleton.getInstance().setPadNumbers(true);
settingsManager.incrementLaunchCount();
Completable.fromAction(() -> {
Query query = new Query.Builder().uri(CustomArtworkTable.URI).projection(new String[] { CustomArtworkTable.COLUMN_ID, CustomArtworkTable.COLUMN_KEY, CustomArtworkTable.COLUMN_TYPE, CustomArtworkTable.COLUMN_PATH }).build();
SqlUtils.createActionableQuery(ShuttleApplication.this, cursor -> userSelectedArtwork.put(cursor.getString(cursor.getColumnIndexOrThrow(CustomArtworkTable.COLUMN_KEY)), new UserSelectedArtwork(cursor.getInt(cursor.getColumnIndexOrThrow(CustomArtworkTable.COLUMN_TYPE)), cursor.getString(cursor.getColumnIndexOrThrow(CustomArtworkTable.COLUMN_PATH)))), query);
}).doOnError(throwable -> LogUtils.logException(TAG, "Error updating user selected artwork", throwable)).onErrorComplete().subscribeOn(Schedulers.io()).subscribe();
Completable.timer(5, TimeUnit.SECONDS).andThen(Completable.defer(this::repairMediaStoreYearFromTags)).doOnError(throwable -> LogUtils.logException(TAG, "Failed to update year from tags", throwable)).onErrorComplete().subscribeOn(Schedulers.io()).subscribe();
Completable.timer(10, TimeUnit.SECONDS).andThen(Completable.defer(this::cleanGenres)).doOnError(throwable -> LogUtils.logException(TAG, "Failed to clean genres", throwable)).onErrorComplete().subscribeOn(Schedulers.io()).subscribe();
Completable.timer(15, TimeUnit.SECONDS).andThen(Completable.defer(this::cleanMostPlayedPlaylist)).doOnError(throwable -> LogUtils.logException(TAG, "Failed to clean most played", throwable)).onErrorComplete().subscribeOn(Schedulers.io()).subscribe();
Completable.timer(20, TimeUnit.SECONDS).andThen(Completable.defer(() -> LegacyUtils.deleteOldResources(this))).doOnError(throwable -> LogUtils.logException(TAG, "Failed to delete old resources", throwable)).onErrorComplete().subscribeOn(Schedulers.io()).subscribe();
}
use of com.crashlytics.android.Crashlytics in project StarWars.Android by Yalantis.
the class App method onCreate.
@Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics());
app = this;
Timber.plant(new Timber.DebugTree());
}
use of com.crashlytics.android.Crashlytics in project SpotiQ by ZinoKader.
the class SpotiqApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics());
FirebaseApp.initializeApp(this);
// java 8 time api backport
AndroidThreeTen.init(this);
appComponent = DaggerAppComponent.create();
injector = new ComponentInjector<>(AppComponent.class, appComponent);
// register notification channels
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationUtil.createNotificationChannels(this);
}
// remove shortcuts on app restart
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
ShortcutUtil.removeAllShortcuts(this);
}
}
use of com.crashlytics.android.Crashlytics in project WanAndroid by dangxy.
the class WanAndroidApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics());
mContext = getApplicationContext();
}
Aggregations