Screen event recorded is out of sync if a event is fired right before a screen view event #425
Labels
priority:medium
On the roadmap.
type:defect
Bugs or weaknesses. The issue has to contain steps to reproduce.
Describe the bug
Especially when an event is triggered right before an activity navigation.
We suspect it is because
screen_view
event from thetrack
method is collected in an Executor thread.https://github.com/snowplow/snowplow-android-tracker/blob/1.7.1/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/Tracker.java#L534-L538
However, the tracking of
screen_view
is not done in the Executor thread.https://github.com/snowplow/snowplow-android-tracker/blob/1.7.1/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/Tracker.java#L528-L531
So it is possible for the recording of
screen_view
to be executed first. By the time the previous track method retrieves thescreen_view
context, it is already out of date.To Reproduce
Steps to reproduce the behavior or code snippets that produce the issue.
Expected behavior
But what we observed is:
Notice that seq2 is recorded as if it is triggered from the next screen (
ActivityB
).Screenshots
N/A
Device informatoin (please complete the following information):
Additional context
.screenviewEvents(false)
)The text was updated successfully, but these errors were encountered: