Closed faragher closed 10 months ago
The telemetry is actually being sent from the background service, but it will not send anything if it doesn't have anything new to send. And that's where we get to the real issue. It's nearly impossible to get access to sensor and location data in the background on Android, so currently, it is the front-end part of the program running updates, and then sending it to the background service, which can then ship it off to the collector at scheduled intervals.
There is likely a way to do it though, and the Android SDK docs vaguely state that you can get "updates a few times per hour", but is very light on the details, so I didn't have time to figure it out for this release.
If anyone knows more, please share!
Also, the intention is to allow the telemetry to be collected from sensors/GPS connected to an RNode as well (which also bypasses the Android permissions/service issues).
I would've never guessed that, but it makes sense. I suggest seeing how Traccar does it, since that continuously updates in the background (and is the cause of my short battery life!) - https://github.com/traccar/traccar-web
Their web and manager repos are basically just browsers for their web service manager AFAIK.
Arbitrary sensors, particularly through the RNode itself, are really great features.
This does make me wonder, though, why did the other two systems keep working? Is there a configuration option I've changed? I change so many configurations . . .
Good idea! I'll check out their code.
Definitely check battery optimisations in the Android settings. Even though Sideband runs a service in the background, Android can still put it to sleep if you don't disable battery optimisations for Sideband. So it might be something like that. Or, maybe just the memory manager shutting down the UI part of the app to free memory, as you said.
Added in version 0.7.7
.
This is likely unavoidable, but in an overnight test the collector and one sender were locked and left to sit while another sender was used as usual. Likely due to memory issues, the Sideband app was put in the background (and required a second pass through "initializing Reticulum") on the second sender and did not send telemetry. This occurred during the use period, not during the overnight hours.
Collector and first sender operated as intended.
Obviously if the program isn't running there's nothing to be done, but is there a possible solution to keep the program in memory or otherwise persist during periods of downtime?