Google recently released new verison of Firebase. So I was trying to migrateto Firebase analytics.
So what is the difference between these libraries
com.google.firebase:firebase-analytics:9.0.0
and
com.google.firebase:firebase-core:9.0.0
I found that core is for analytics too. So whats the difference? Which should I use.
The firebase_core plugin is responsible for connecting your Flutter app to your Firebase project. The plugin must be installed and initialized before the usage of any other FlutterFire plugins. It provides basic functionality such as: Initializing FlutterFire. Creating Secondary Firebase App Instances.
Firebase, we see that they have the same data model — one that depicts user interactions as events. That's why both platforms also share the same implementation process — the only difference between Firebase Analytics and Google Analytics in this regard lies in where you first set up your Android and iOS data streams.
firebase-core is no longer listed as a required dependency in the Android getting started guide and was removed from the list of available libraries. Now adding firebase-analytics to your app is optional in the getting started guide.
Core. DEPRECATED: FirebaseApp. configure method is now deprecated in favor of the Firebase.
Based on google docs you don't need firebase-core anymore:
You no longer need to add the Android library com.google.firebase:firebase-core. This SDK included the Firebase SDK for Google Analytics. Now, to use Analytics (or any of the Firebase products that require or recommend the use of Analytics), you need to explicitly add the Analytics dependency: com.google.firebase:firebase-analytics:17.2.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With