-1

I am developing my android project for my university, a medicine ordering app. I was following a tutorial to make the LoginActivity based on Firebase authentication and using Firebase database. The tutorial uses the Fabric Crashlytics instead of Firebase Crashlytics. I have already integrated the Firebase Crashlytics in my project using Firebase Assistant, but I am unable to figure out how to write the tutorial's code using Firebase Crashlytics.

I tried hard to find how to convert the code to Firebase Crashlytics, but everywhere they have told the procedure to migrate from Fabric Project to Firbase Project, which is not my case.

The Fabric-based Crashlytics code I want to be converted in Firebase-based Crashlytics code is below:

import android.app.Application;

import com.crashlytics.android.Crashlytics;
import com.crashlytics.android.core.CrashlyticsCore;
import com.digits.sdk.android.Digits;

import com.twitter.sdk.android.core.TwitterAuthConfig;
import com.twitter.sdk.android.core.TwitterCore;

import io.fabric.sdk.android.Fabric;
import timber.log.Timber;

public class App extends Application {
    .
    .
    .

    @Override
    public void onCreate() {
        .
        .
        .
        // Fabric initialization
        Crashlytics crashlyticsKit = new Crashlytics.Builder()
                .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
                .build();

        Fabric.with(this, new TwitterCore(authConfig), new Digits(), crashlyticsKit);

        if (BuildConfig.DEBUG) {
            Timber.plant(new Timber.DebugTree());
        }

        Timber.plant(new CrashlyticsTree());

    }
.
.
.
}
Sunderam Dubey
  • 1
  • 11
  • 20
  • 40
Neha AK
  • 67
  • 1
  • 10
  • Fabric was deprecated back in 2020 according to the 'web. I think you should read the docs on Firebase Crashlytics and follow their instructions. Asking us to reinvent the tutorial for you is a over-broad for this site. – markspace May 29 '22 at 17:19
  • @markspace I studied the docs but it did not help. – Neha AK May 29 '22 at 17:30
  • Well you need to focus more, regardless. Make as good a start as you can. Then post here with a specific question about a specific problem you are having. You'll likely get an answer for that. What you are asking in this post is for someone to do the whole thing for you, and that'll never fly. – markspace May 29 '22 at 17:39

1 Answers1

0

I just found out that we don't need to initialize the Firebase Crashlytics as we used to do for Fabric Crashlytics. Just integrate the Firebase Crashlytics using Firebase Assistant and it will do the rest automatically.

Neha AK
  • 67
  • 1
  • 10