Similarities to C# .Flush() .dispose() — attempting to fix memory issue with acceleration logging activity. Is it possible?

Hi Everyone,

I am creating an app for personal use, where accelerometer data is logged into an activity. After four hours, the activity auto stops and saves for the user, and new 4 hour accelerometer activity starts.

Whether I have one activity session or multiple, after a total accumulation of ~5.5hr the watch says it is low memory and exits. Even when I clear my Activity folder before starting. I know it is a RAM issue thanks to very helpful people in these forums, and I can ensure there is still free space in my 3.4 GB watch—Venu Sq 1 non-music. (The individual fit files are also well below the limit as well)

Since it is a RAM issue due to storing accel data in RAM to write to a fit at the end of the session, I was wondering if anyone knew a way to flush out the RAM/memory (similarly to how C# applications can with .flush() & .dispose() when dealing with CSV’s). That way I can “flush out” the RAM after the fit file has been written with session.save() and before opening a new 4 hr session.

Such a solution would fix my 5.5 hr limit. I was hoping anyone knew if such an idea was possible. The SDK isn’t clear on this topics. Perhaps I am misunderstanding an issue instead, and a helpful commenter can clarify. 

Thank you so much in advance.

  • The Venu sq is about the lowest end device with CIQ right now.  Maybe you can find someone with a forerunner 9x5 or Fenix to give your app a test, to see it works on a high end device.

  • Thank you, I had a deep feeling that would be the answer. 

    Is there any point in time the watch has time to clear its RAM? or is it only when the app is completely exited?

    Say for example I don't start the second 4 hr activity right after the first. Instead, after the first 4hr activity ends it automatically takes the user to a new bitmap/screen that they will wait at for x amount of time while the RAM clears, and afterward, my app will automatically return to the recording screen and start the new activity.