mixpanel / mixpanel-android

Official Android Tracking Library for Mixpanel Analytics
http://mixpanel.com/
Apache License 2.0
1.02k stars 366 forks source link

synchronous sending of data and verification #820

Open nadavf24 opened 11 months ago

nadavf24 commented 11 months ago

we have a use case where we are trying to send all the data in the queue before we close the application for the end user. but even after calling flush() the code is not able to send the data before the application closes and there is no indication when the data will be sent and if the data was sent successfully. we thought maybe we could somehow get the SDK to send the data synchronously so that only when the data is sent we can close the application but again the SDK has no option for this use. so we thought maybe we could send the data and attempt to validate it until we get a confirmation that it was sent and only after that close the app. but again no normal option to do such validation and not wait for ages until the rest API updates with the record (most of the time takes more than a minute and even 10 minutes) and this also requires me to add another HTTP client to the already bloated application due to the use of your sdk.

nadavf24 commented 10 months ago

i created a pull request to fix this issue.

822