Akshay
Akshay

Reputation: 2534

Firebase screen name is showing not set

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

Upvotes: 11

Views: 14090

Answers (2)

Vesper
Vesper

Reputation: 493

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().

Upvotes: 4

Nitish Kumar
Nitish Kumar

Reputation: 81

put

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

in onResume().

Upvotes: 8

Related Questions