Firebase screen name is showing not set
Asked Answered
S

2

11

I have created a project in Google Firebase Analytics and I am able to log screen names in the console. But for one screen screen_view is not recorded and it is showing as not set in the screen view list. I have used a default function for logging screen view event (i.e. setCurrentScreen()).

I am using Firebase:16.0.0 version. Can anyone please guide me for this.

Firebase Issue

Shipmaster answered 20/6, 2018 at 15:38 Comment(0)
W
8

put

analytics.setCurrentScreen(this, "Screen Name", this.getClass().getSimpleName());

in onResume().

Walrath answered 29/11, 2018 at 9:20 Comment(1)
setCurrentScreen is deprecated, any suggestions? I am unable to see the screen name.Kathleenkathlene
T
4

Debug it in real-time with logcat to figure out why it's not properly set. My best guess is that you're trying to call setCurrentScreen() while passing an activity that's not in the proper state.

Possible solution: move logging to onResume().

Teepee answered 26/6, 2018 at 13:31 Comment(2)
You are right I used setCurrentScreen() I debugged it and it is showing event is sent. I can see the class name of the screen but I am not able to see Screen name in Screen name tab.Shipmaster
Is it the automatic screen tracking or your own manual that is logged? Watch for "W/FA: setCurrentScreen cannot be called while no activity active". Possible solution in edited answer.Teepee

© 2022 - 2025 — McMap. All rights reserved.