Joplin does not get battery optimized it is configured to periodically sync, yet it never sinks not once ever. I've been using it for about six months. If I have it in the foreground it will start sinking and as soon as I switch out or the screen turns off it'll stop sinking
Background sync on mobile is not supported, so the app always has to be in the foreground to sync. It’s a long requested feature, but unfortunately it is difficult to implement reliably due to using React Native for the mobile apps, unless implementing a load of native code in the app wrapper. But that would likely require more time and effort for ongoing maintenance, in addition to the initial implementation of the feature.
Those settings still only apply while the app is in the foreground.
It’s also worth noting that the ‘synchronisation interval’ is a periodic sync to ensure incoming changes are automatically downloaded while the app is continuously open, when there are no outgoing changes pending. Outgoing changes will automatically trigger the sync after 1 second on mobile, which is intended to help reduce the possibility of conflicts, due to the lack of background sync support.
I turn on the developer mode "Stay Awake" and then keep it plugged in. As long as it's plugged in it won't go to sleep and Joplin will stay in the foreground and sync as long as it takes. This way you don't need to load anything special to keep it going.
There is no option to keep screen on while in app, we should not need etc party app for that. It also syncs way more than it should need too. I have lots of notes, make a handful of changes and it wants to sync 10, 000+ items…
Find the item labeled "Build number"
Tap it 7 times in a row. This turns on developer mode
Now go back to Settings and scroll to the bottom. You will see "Developer options".
Tap that and on the next screen you will find "Stay awake"
Turn it on and leave your device plugged in. The screen will dim eventually but stay on and Joplin will remain in the foreground and the sync can proceed until it finishes.
I point again to Caffeine on Android. It is a very easy “on/off” setting because it resides in the drop down notification bar. For those occasions that you need an app stay focused (it happens also on large sync jobs for cloud services too), it is really handy to have it on. And off again, without having to dig into dev mode.
@clarkras Not really. That would only work with file system sync, as app data is isolated to the app which owns the data on Android. For file system sync, you already can use other apps to sync the data to the cloud, which may be done in the background, depending on the app
Syncthing seems to be the app mentioned most often for achieving this. There doesn't seem to be a good file system sync solution for iOS though. Has anybody tried Synctrain in conjunction with Joplin (or any other file system sync method for iOS)?