Firebase Analytics Events And Crashlytics Integration With Android Application
Firebase Analytics Events and Crashlytics is an important service provided by Firebase. It enables app developers to see the user analytics and detect app bugs and crashes on a common platform.
Seting up Firebase Analytics events and Crashlytics is a very simple task. Follow the following steps to start integrating
1. Integrate Firebase with your Android project. Click here to read on how to integrate Firebase with Android project.
2. Open Firebase Dashboard panel and go to Analytics link provided. Click on "Learn More"
3. Then go to option called "Android Setup"
4. Since you have already integrated Firebase (Click here if not), then you dont need to add dependency again.
Perform the next two steps given in documentation.
On top of your java file, declare the object for FirebaseAnalytics
private FirebaseAnalytics mFirebaseAnalytics;
Then initialize the object in the onCreate() method.
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Bundle bundle = new Bundle();
The above bundle records the button click event. You can give the id, name, CONTENT_TYPE parameters as per your own project needs.