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

Fix App Launched event in CT #521

Closed hborisoff closed 1 year ago

hborisoff commented 1 year ago
What Where/Who
People Involved @hborisoff

Background

There was a race condition when running the LP.start and creating the first activity of the application, because LP.start is starting a second thread to offload some of the heavy work. For that reason the wrapper is created in the same thread that the LP.start was called. If you call LP.start(userId) with different userId the wrapper must be updated to comply with that. Previously this wasn't needed, because the wrapper factory uses the userId from APIConfig.