I want to use FirebaseAnalytics
inside a library project on android. I want the events logged to be reported to my Firebase console and not to the console of the app developer. I do not own or control the implementation of the app that will use the library.
Is this possible in any way?
My approach:
I have read this and found out that it is possible to create a FirebaseApp
using my credentials as follows:
FirebaseOptions options = new FirebaseOptions.Builder()
.setApplicationId("Your AppId") // Required for Analytics.
.setApiKey("You ApiKey") // Required for Auth.
.setDatabaseUrl("Your DB Url") // If you wanted to
.build();
FirebaseApp.initializeApp(context, options, "CompanyA");
Is there a way to use this FirebaseApp
to log events as in FirebaseAnalytics
?