TelemetryDeck / FlutterSDK

Flutter SDK for TelemetryDeck, a privacy-conscious analytics service for apps and websites.
https://telemetrydeck.com/
MIT License
3 stars 2 forks source link

Invoking stop() should be done from the main thread #17

Closed kkostov closed 3 months ago

kkostov commented 3 months ago

This PR addresses #16 by adapting the way we call stop() in the KotlinSDK. Since start() and stop() manage subscriptions for lifecycle events, they always need to be invoked on the main thread.

The README has been updated to clarify the effect of stop().

We can consider improving the KotlinSDK in the future to ensure both method calls are executed on the main loop, however this will require some consideration for the way we implement the TelemetryProvider interface which is public and allows custom implementations to be provided to the SDK.