I have been recently testing my app in a strict mode to detect disk reads/writes on UI thread. And I have noticed that strict mode validator hates GA sdk: all calls to trackPageView etc result in a SQLITE disk write (obviously SDK stores this info in case of network fault).
I failed to find the source for SDK to make sure, so I’m asking if anyone else had this issue? It looks like GA SDK tracking should be explicitly called from outside UI thread. But why isn’t this mentioned ANYWHERE in the docs?
Or am I understanding something wrong?
Yes, you should call it outside the UI thread. This guy has some code on his page that acts as a wrapper for google analytics to stop the blocking you’re experiencing.