statsig-io / android-sdk

Statsig's SDK for client-side Android applications written in Java or Kotlin
ISC License
9 stars 4 forks source link

Coroutine fixes and enhancements #1

Closed pablobaxter closed 3 years ago

pablobaxter commented 3 years ago

This fixes a major bug when calling initialize() from the main dispatcher. This could potentially throw NetworkOnMainThread exceptions, due to the network calls not being handled on an IO thread. This also performs some cleanup to ensure that calls are more Java/Kotlin friendly. More details about the changes in comments.

pablobaxter commented 3 years ago

Overall some much needed cleanup - thanks for the PR!

Curious to learn more about how to support Pre API 24 Java for initializeAsync() - everything else represents notable improvements with no API breaking changes

So everything in this code base works with API 19+ (the min API). I see no issues with supporting <24.