We are trying to set a custom name or class name to the screen of the screen_view event but the event is sent twice even if we do it inside onResume of the activity.
https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics#setCurrentScreen(android.app.Activity,%20java.lang.String,%20java.lang.String)
@llooz can you provide some code that reproduces the problem? Is this in an Activity or a Fragment? And does it send twice automatically or do you have to resume the app?
I'm experiencing the same issue. I call setCurrentScreen in the onResume of an activity and I see in the debug view in my firebase console 2 events: one with the default name and one with the custom name I passed to setCurrentScreen.
This is the exact same behaviour reported for the iOS sdk here: https://github.com/firebase/firebase-ios-sdk/issues/1894
Do you have any insight on how to avoid this? Tracking screen views at the moment is pretty unusable because I can't rely on the numbers I see, due to those duplications.
Same issue here. It's really not hard to repro at all. Just put a call to setScreenName() in any activity's onResume() and no-where else and you get double events.
Definitely disappointing to expect it to work properly. It only dupes when creating the Activity. IOS bug hasn't moved in almost an entire year so not expecting much any traction at all. It's fixable, but I can see why y'all would punt.
You could probably use WeakReference
Still facing this issue, is there a fix for this yet?
Still encountering the same problem.
In fact, a lot of trouble reporting events and parameters using firebase...
Most helpful comment
Still facing this issue, is there a fix for this yet?