Search in sources :

Example 26 with Crashlytics

use of com.crashlytics.android.Crashlytics in project Tapad by berict.

the class LauncherActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Fabric.with(new Fabric.Builder(this).kits(new Crashlytics()).debuggable(false).build());
    setContentView(R.layout.activity_launcher);
    activity = this;
    // load ads
    MobileAds.initialize(this, getStringFromId(R.string.admob_app_id, this));
    // White screen set
    toolbar.setStatusBarTint(this);
    window.getNavigationBar(R.id.root, activity);
    window.getStatusBar(R.id.root, activity);
    // Logo fade out + intent
    Handler handler = new Handler();
    handler.postDelayed(new Runnable() {

        public void run() {
            anim.fadeOut(R.id.root, 0, 400, activity);
            checkVersionCode();
        }
    }, 500);
}
Also used : Handler(android.os.Handler) Crashlytics(com.crashlytics.android.Crashlytics)

Example 27 with Crashlytics

use of com.crashlytics.android.Crashlytics in project Reader by TheKeeperOfPie.

the class CustomApplication method onCreate.

@Override
public void onCreate() {
    application = this;
    super.onCreate();
    refWatcher = LeakCanary.install(this);
    Fabric.with(this, new Crashlytics());
    AppSettings.initPrefs(getApplicationContext());
    if (BuildConfig.DEBUG) {
        ButterKnife.setDebug(true);
        Stetho.initializeWithDefaults(this);
    }
}
Also used : Crashlytics(com.crashlytics.android.Crashlytics)

Example 28 with Crashlytics

use of com.crashlytics.android.Crashlytics in project SeriesGuide by UweTrottmann.

the class SgApp method initializeLogging.

private void initializeLogging() {
    if (BuildConfig.DEBUG) {
        // debug drawer logging
        LumberYard lumberYard = LumberYard.getInstance(this);
        lumberYard.cleanUp();
        Timber.plant(lumberYard.tree());
        // detailed logcat logging
        Timber.plant(new Timber.DebugTree());
    } else {
        // crash and error reporting
        Timber.plant(new AnalyticsTree(this));
        if (!Fabric.isInitialized()) {
            Fabric.with(this, new Crashlytics());
        }
    }
    // Ensure GA opt-out
    GoogleAnalytics.getInstance(this).setAppOptOut(AppSettings.isGaAppOptOut(this));
    if (BuildConfig.DEBUG) {
        GoogleAnalytics.getInstance(this).setDryRun(true);
    }
    // Initialize tracker
    Analytics.getTracker(this);
}
Also used : LumberYard(io.palaima.debugdrawer.timber.data.LumberYard) Timber(timber.log.Timber) Crashlytics(com.crashlytics.android.Crashlytics)

Example 29 with Crashlytics

use of com.crashlytics.android.Crashlytics in project Rutgers-Course-Tracker by tevjef.

the class RutgersCTApp method onCreate.

@Override
public void onCreate() {
    super.onCreate();
    //refWatcher = LeakCanary.install(this);
    Once.initialise(this);
    objectGraph = ObjectGraph.create(new RutgersCTModule(getApplicationContext()));
    //Initalize crash reporting apis
    Fabric.with(this, new Crashlytics());
    if (BuildConfig.DEBUG) {
        //When debugging logs will go through the Android logger
        Timber.plant(new Timber.DebugTree());
        Stetho.initializeWithDefaults(this);
    } else {
        //Mint.enableDebug();
        //Mint.initAndStartSession(this, "2974ff7f");
        //Gets a unique id for for every installation
        String s = getsID(getApplicationContext());
        //Set unique user id
        //Mint.setUserIdentifier(s);
        Crashlytics.setUserIdentifier(s);
        //Diverts logs through crash reporting APIs
        Timber.plant(new CrashReportingTree());
    }
}
Also used : Timber(timber.log.Timber) Crashlytics(com.crashlytics.android.Crashlytics)

Example 30 with Crashlytics

use of com.crashlytics.android.Crashlytics in project qksms by moezbhatti.

the class QKSMSApp method onCreate.

@Override
public void onCreate() {
    super.onCreate();
    Fabric.with(this, new Crashlytics());
}
Also used : Crashlytics(com.crashlytics.android.Crashlytics)

Aggregations

Crashlytics (com.crashlytics.android.Crashlytics)51 SharedPreferences (android.content.SharedPreferences)6 Handler (android.os.Handler)6 Intent (android.content.Intent)5 Timber (timber.log.Timber)5 View (android.view.View)4 PackageInfo (android.content.pm.PackageInfo)3 PackageManager (android.content.pm.PackageManager)3 StrictMode (android.os.StrictMode)3 Fabric (io.fabric.sdk.android.Fabric)3 File (java.io.File)3 Manifest (android.Manifest)2 SuppressLint (android.annotation.SuppressLint)2 ContentUris (android.content.ContentUris)2 DialogInterface (android.content.DialogInterface)2 IntentFilter (android.content.IntentFilter)2 Bundle (android.os.Bundle)2 Environment (android.os.Environment)2 NonNull (android.support.annotation.NonNull)2 FloatingActionButton (android.support.design.widget.FloatingActionButton)2