Button to force sync / enable sync for 5 minutes?

Hi, is there a way to temporarily enable sync for like 5minutes?

What am I trying to achieve: I have enabled sync only on wifi + charging. But sometimes I would like to sync files (new photos…) even on mobile data/battery.

My idea is to have a widget that would enable sync for like 5 minutes and then revert back to default settings. Is there a way to do it with some “command line magic”? It would be awesome to have it as a widget button!

You may want to try out Syncthing-Fork (https://github.com/Catfriend1/syncthing-android). It does have some features similar to what you are asking for, e.g. to sync for 5 minutes every hour, etc.

1 Like

What I do is only run the Android app when I’m home and actually have files that need to be synched. Otherwise I exit the app and leave it alone until the next day.

It takes no more than five minutes for me to sync new pictures and other files and then I exit.

Works fine for me.

This way there’s no battery drain 23 hours and three quarters every day.

1 Like

Hi, thanks for suggesting the syncthing fork but the functionality of “5minutes of every hour” is not what I need. I simply want sometimes to force sync of new files (photos) right now. And leave the functionality of sync running “on the background” only while charging to backup (sync) everything (even when I don’T interact with the syncthing at all for weeks)

You may then try to disallow Syncthing from running in background in the Android app settings. This should prevent the app from running when the phone is in doze mode (see https://developer.android.com/training/monitoring-device-state/doze-standby). The only other way I can think of would be to use some kind of an automation app to control Syncthing via Android intents or the API.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.