Does the Google Analytics SDK do disk operations in a user interface thread?

I recently tested my application in strict mode to detect disk read / write in the user interface stream. And I noticed that strict mode validator hates GA sdk: all calls to trackPageView, etc. They are written to the SQLITE disk (obviously, the SDK stores this information in the event of a network failure).

I could not find the source for the SDK to be sure, so I ask if anyone else has this problem? It seems that SD SDK snooping should be explicitly called from an external UI thread. But why is this not mentioned ANY in the docs?

Or do I understand something is wrong?

+4
source share
1 answer

Yes, you should call it outside the user interface thread. This guy has a code on his page that acts like a wrapper for Google analytics to stop the lock you're experiencing.

+1
source

Source: https://habr.com/ru/post/1399252/


All Articles