Leanplum / Leanplum-Android-SDK

Leanplum's integrated solution delivers meaningful engagement across messaging and the in-app experience.
https://www.leanplum.com
Apache License 2.0
46 stars 40 forks source link

E2-2014 Moved SQLite writes to background thread #372

Closed milos1290 closed 5 years ago

milos1290 commented 5 years ago
What Where/Who
JIRA Issue E2-2014
People Involved @milos1290

Background

SQLite writes were executed on main thread which could cause ANRs and is causing hiccups in Unity. To solve this OperationQueue is added which writes to SQLite in background thread sequentially to ensure all events are written in the generated order.

Implementation

OperationQueue which runs on background thread.

Testing steps

Is this change backwards-compatible?

Yes