New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setCurrentScreen in onResume sends screen_view twice #782
Comments
@llooz can you provide some code that reproduces the problem? Is this in an |
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. 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 if setScreenName is called in Activity.onCreate() and if Activity isn't known, hold the reference and resolve it when the onResume() gets called that generates the bad event. This would also help you avoid the other behavior where calling setScreenName in onCreate() doesn't fire anything if the Activity isn't known yet. Then the SDK would work forgivingly without the extra event noise. You also wouldn't have to worry about knowing whether an explicit call to setScreenName is coming, you could just assume if someone tries to set early, resolve it when you get the actual lifecycle event. No need to try to translate intent. |
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... |
Guys please follow @raderto's comment. Lets close this issue. |
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 insideonResume
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)
The text was updated successfully, but these errors were encountered: