I have an activity with a sliding bottom sheet. I want to track how long does the user views the bottom sheet or the main activity screen.
I'm trying to use FirebaseAnalytics#setCurrentScreen(Activity activity, String screenName, String screenClassOverride)
so that when the bottom sheet is shown. I specify the screenName with
FirebaseAnalytics.setCurrentScreen(activity, "bottom_sheet", null);
Then when the bottom sheet is closed I call
FirebaseAnalytics.setCurrentScreen(activity, null, null);
to revert to the main activity's name.
However I get a log from FA:
W/FA: setCurrentScreen cannot be called with the same class and name
If anyone can tell me how to properly set the screen name that would be great.