android firebase analytics example
android firebase analytics example is for the new android developer who want to integrate firebase analytics into android app first time.
It’s amazing journey to integrate firebase analytics into your android app and track everything into your firebase console. Let’s Start!
Step 1 : Start Android Studio
Step 2 : Goto Tools > Firebase (You will find Firebase Assistance in Right Panel)
Step 3 : Click on Analytic and Log an Analytic Event
Step 4 : It will open new window, Here you need to enter your google userid and password to login to firebase console. (If you are doing this first time then I request you to open firebase console in browser and accept terms and condition)
Step 5: Either select project or create new project
Step 6: Now you will be back to Android Studio. Goto Firebase Assistance Right Panel > Analytic > Connect Your App to Firebase
Step 7: Add Analytic to your App
Step 8: Now if you want to track when someone opens your MainActivity then in MainActivity java file goto onResume method and add following code
Bundle bundle = new Bundle();
(Hint: Here you can change id, name, image into your preferred string value.)
That’s It, Firebase integration is very easy compared to previous Google Analytics and GCM Integration, Best Luck. Share your experience with us and Stay Tuned !
If you like my article, Please share with your friends on Facebook, WhatsApp, Twitter, etc. Thanks in Advance.