deleteStoredDeviceData does not wait for files to be deleted
Opened this issue · 4 comments
Platform on which you observed the bug:
- Android
- iOS
- Other
- Platform is not relevant for this bug
Device on which you observed the bug:
- Polar OH1
- Polar Verity Sense
- Polar H10
- Polar H9
- Other
- Device is not relevant for this bug
Describe the bug
Looking at the implementation of deleteDataDirectories on Android it looks like the method does not wait for all the underlying operations to complete. Also, in case of any errors they won't be reported, because the metod always returns complete.
Expected behavior
deleteDataDirectories
method should complete after all files have been deleted, all errors should be reported to the caller that subscribes to it.
We managed to tweak the deleteListedFilesByType
for AUTO_SAMPLE data type in our own fork. It now waits for deleting process to complete. Additionally it has been improved to respect the until
date and log more for better visibility. Feel free to check it out, it may be helpful for someone responsible for implementing it into official repo.
Implemented the same thing for Android.
Thank you for helping to solve this. The fix will be released in the next release.