I am trying to initialize the FirebaseApp, only by using the FirebaseOptions builder, like this(I use only applicationId and ApiKey, since I only want the analytics for start):
FirebaseOptions options = new FirebaseOptions.Builder()
.setApplicationId(applicationID) // Required for Analytics.
.setApiKey(apiKey) // Required for Auth.
.build();
FirebaseApp.initializeApp(context, options);
I do not have a google-services.json file in my project, I have removed the FirebaseInitProvider, like this, in my AndroidManifest.xml:
<provider android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="${applicationId}.firebaseinitprovider"
android:exported="false"
tools:node="remove"/>
I would like to have the application id sent from my server, since I want more than one projects, and I don't really care if I lose some event during the initialization of the app. When starting the application, while trying to View events in the Android Studio debug log, like this:
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC
I get: Missing google_app_id. Firebase Analytics disabled.
I do not want to use google_app_id in a strings.xml static file since I want more than one projects. However I tried having all the app ids in an XML file and trying to change them using reflection before the FirebaseApp.initializeApp, but that doesn't seem to work.