Reputation: 2534
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.
Upvotes: 11
Views: 14090
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
Reputation: 81
put
analytics.setCurrentScreen(this, "Screen Name", this.getClass().getSimpleName());
in onResume()
.
Upvotes: 8