Search in sources :

Example 1 with Crashlytics

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());
}
Also used : CrashlyticsTree(com.donnfelker.android.bootstrap.logging.CrashlyticsTree) Crashlytics(com.crashlytics.android.Crashlytics)

Example 2 with Crashlytics

use of com.crashlytics.android.Crashlytics in project sharelock-android by auth0.

the class ComposeActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Fabric.with(this, new Crashlytics());
    setContentView(R.layout.activity_compose);
    Toolbar toolbar = (Toolbar) findViewById(R.id.sharelock_toolbar);
    setSupportActionBar(toolbar);
    getSupportActionBar().setTitle(null);
    bus = EventBus.getDefault();
    handler = new Handler();
    Intent intent = getIntent();
    String action = intent.getAction();
    String type = intent.getType();
    String sharedText = null;
    if (Intent.ACTION_SEND.equals(action) && type != null) {
        if ("text/plain".equals(type)) {
            sharedText = intent.getStringExtra(Intent.EXTRA_TEXT);
        }
    }
    if (savedInstanceState == null) {
        final SecretInputFragment fragment = new SecretInputFragment();
        if (sharedText != null) {
            Bundle arguments = new Bundle();
            arguments.putString(SecretInputFragment.SECRET_INPUT_FRAGMENT_SECRET_ARGUMENT, sharedText);
            fragment.setArguments(arguments);
        }
        getSupportFragmentManager().beginTransaction().replace(R.id.sharelock_compose_container, fragment).commit();
    } else {
        secret = savedInstanceState.getParcelable(COMPOSE_CREATED_SECRET);
    }
}
Also used : Bundle(android.os.Bundle) SecretInputFragment(com.auth0.sharelock.fragment.SecretInputFragment) Handler(android.os.Handler) Intent(android.content.Intent) Crashlytics(com.crashlytics.android.Crashlytics) Toolbar(android.support.v7.widget.Toolbar)

Example 3 with Crashlytics

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);
}
Also used : HueUtils(com.huetoyou.chatexchange.ui.misc.HueUtils) Handler(android.os.Handler) Crashlytics(com.crashlytics.android.Crashlytics)

Example 4 with Crashlytics

use of com.crashlytics.android.Crashlytics in project xabber-android by redsolution.

the class Application method onCreate.

@Override
public void onCreate() {
    super.onCreate();
    if (BuildConfig.DEBUG) {
        /**
         * Leak Canary
         */
        if (LeakCanary.isInAnalyzerProcess(this)) {
            // You should not init your app in this process.
            return;
        }
        LeakCanary.install(this);
        /**
         * Block Canary
         */
        BlockCanary.install(this, new AppBlockCanaryContext()).start();
        /**
         * Android Dev Metrics
         */
        AndroidDevMetrics.initWith(this);
        /**
         * Strict Mode
         */
        StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build());
    }
    /**
     * Crashlytics
     */
    // Set up Crashlytics, disabled for debug builds
    Crashlytics crashlyticsKit = new Crashlytics.Builder().core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build();
    // Initialize Fabric with the debug-disabled crashlytics.
    if (BuildConfig.USE_CRASHLYTICS) {
        Fabric.with(this, crashlyticsKit);
    }
    Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
    addManagers();
    DatabaseManager.getInstance().addTables();
    LogManager.i(this, "onCreate finished...");
}
Also used : AppBlockCanaryContext(com.xabber.android.utils.AppBlockCanaryContext) StrictMode(android.os.StrictMode) Crashlytics(com.crashlytics.android.Crashlytics)

Example 5 with Crashlytics

use of com.crashlytics.android.Crashlytics 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);
    }
}
Also used : Fabric(io.fabric.sdk.android.Fabric) Crashlytics(com.crashlytics.android.Crashlytics)

Aggregations

Crashlytics (com.crashlytics.android.Crashlytics)54 Intent (android.content.Intent)8 SharedPreferences (android.content.SharedPreferences)6 Handler (android.os.Handler)6 View (android.view.View)5 Timber (timber.log.Timber)5 PackageInfo (android.content.pm.PackageInfo)3 PackageManager (android.content.pm.PackageManager)3 StrictMode (android.os.StrictMode)3 TextView (android.widget.TextView)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