Open Albertoperezs90 opened 1 year ago
Hello @Albertoperezs90. Thanks for opening the issue. Indeed, loading time reporting may be not correct because of the delayed lifecycle calls as you've described.
We will try to look at this and see how we can improve reporting.
Thanks @0xnm ! If you need any help, just let me know :)
Describe what happened Fragments loaded by viewpager are created when visiting adjacents fragments but if you specify the flag
BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT
onResume()
is not triggered until the fragment is actually visible to the user.The above behavior is triggering
viewLoadingTimer.onCreated()
on all the adjacents fragments created, but becauseonResume()
is not called until fragment is visible, the loadingTime is invalid giving bigger values than the real loadingTime.Steps to reproduce the issue:
BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT
flag.onResume()
is not calledonFragmentResumed
is triggered and therefore measuring the loadingTime at this point, making it a bigger value than it should be.Describe what you expected:
ViewLoadingTime
should be stopped temporally if fragments belong to viewpager and are not visible to the user.Additional context
com.datadoghq:dd-sdk-android:1.14.0
com.datadoghq:dd-sdk-android-gradle-plugin:1.5.1