Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase .setCurrentScreen for view-based apps

My app is build with single Activity and every screen is simple View.

Activity(stack)
    - screen1
    - screen2

I log my current screen like this firebaseAnalytics.setCurrentScreen(activity, screenName, null) where activity is a single activity for every screen and screenName is name of actually screen represented by View.

And this is what do I see in my Firebase dashboard :( enter image description here

It prints out activity class instead of screen name! Of course, I can navigate to details and switch from Screen classes to Screen names but I must do it every time I open Firebase Dashboard!

How can log my actual Screen class (MainScreenView) instead of one stupid activity AppActivity.

Is there any way to overcome this?

like image 703
Alexandr Avatar asked Nov 22 '25 13:11

Alexandr


1 Answers

You can use that 3rd parameter of the setCurrentScreen method instead of just sending null. Further reading

firebaseAnalytics.setCurrentScreen(activity, screenName, "YourViewClassNameHere")
like image 162
Khairil Ushan Avatar answered Nov 24 '25 04:11

Khairil Ushan