Hi developers and Ant team
I am working on Android project for tracking activities (bike rides) and i am using fit.jar from Fit SDK.
In my use case I am trying to write fit file with around 8000 Records Messages (aprox. 20min ride) at the end of ride and I noticed that library needs like 20++ sec to write this fit file.
Resulting file is around 150kb and accepted by Strava so it is valid (written correctly) but I wonder if I did something wrong when library needs so long time to write 150kb file on modern Android phone.
I basically collect everything that needs to be written into the list of Mesg object and than I am trying to do the following:
encode.write(mFitMesgs);
encode.close();
this encode.write(..) is my only call to write method cause i didn't want to access storage too often but just to write everything prepared in one hit.
I implemented simple file observer as well and noticed one more strange behaviour. File is during this call open and close several times and everything last pretty long as mentioned before.