1
votes

Is it possible on android to programmatically initialize firebase-crashlytics SDK so it would not use the data in google-services.json ?

I am asking this because we use two firebase projects and currently google-services.json is of the project we use for Push notifications and AdMob integration, and I cannot replace it with google-services.json of the second project we have set up for crashlytics.

I have already tried using FirebaseOptions from my Application onCreate as follows:

 FirebaseOptions options = new FirebaseOptions.Builder()
                .setApplicationId("firebase_crashlytics_application_id")
                .setApiKey("firebase_crashlytics_api_key")
                .setProjectId("firebase_crashlytics_project_id")
                .build();
 FirebaseApp.initializeApp(this, options, "crashlytics");

So far no luck - firebase crashlytics is not properly initialized.

2

2 Answers

2
votes

I got an official answer from google support - we cannot programmatically initialize firebase crashlytics. I.e. it requires having the google services file related to the project you want to see the craslytics data for.

Therefore we would have to use a single firebase project somehow for all firebase services including admob and push.

0
votes

Great question. You can set this up by following these steps.