SecUSo/privacy-friendly-pedometer

Make widgets update more frequently

Opened this issue · 8 comments

Please make widgets update more frequently.
I think it updates every 30 minutes now and I think that's too slow.

I think updating every 1 minute is good.

What version of the pedometer are you using?

Since v3.0.1 released here (not yet on F-Droid or in PlayStore), Settings->General->"Background Counter Return Frequency" also controls the widget update interval. You cannot set the interval to 1 min, currently, but to 5 min.

Thanks!
I should have checked the settings first.

I have changed the "Background Counter Return Frequency" to 5 minutes and it is definitely not updating every 5 minutes.

I have changed the "Background Counter Return Frequency" to 5 minutes and it is definitely not updating every 5 minutes.

Thank you for testing! I can confirm that it doesn't work as expected and will have a look into it.

I hadn't tested this in practice as the configurable update frequency was mainly a side effect of fixing #109.

Just a quick update on this issue: it's not so easy to update every 5 minutes, as this apparently requires android.permission.HIGH_SAMPLING_RATE_SENSORS, which makes it unlikely to be published in the PlayStore. It also seems to me that the current implementation does not quite do what it is supposed to do in terms of intervals. All in all, it seems to me that the effort here is quite great for the effect that can possibly be achieved.

morckx commented

Sorry, I just realized that the actual widget update frequency is not updated. Will fix this later...

morckx commented

updatePeriodMillis for widgets doesn't support values of less than 30 min, see https://developer.android.com/develop/ui/views/appwidgets/advanced#periodic

With WorkManager the effective minimum interval is also 30 min.

Closing this.