10

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

CodeChimp
  • 4,745
  • 6
  • 45
  • 61
Akshay
  • 2,506
  • 4
  • 34
  • 55

2 Answers2

8

put

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

in onResume().

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Nitish Kumar
  • 81
  • 1
  • 2
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().

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Vesper
  • 493
  • 4
  • 7
  • 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. – Akshay Jul 04 '18 at 06:32
  • 1
    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. – Vesper Jul 04 '18 at 07:02