Onosendai icon indicating copy to clipboard operation
Onosendai copied to clipboard

Configurable "low battery" threshold

Open ianrenton opened this issue 7 years ago • 4 comments

Could you make the battery threshold at which OnoSendai stops background syncing configurable? My phone is unusual, granted, but for me the current default (30%) is about a full day's normal use!

ianrenton avatar Mar 02 '17 18:03 ianrenton

(Or if possible honour the device's power saving mode setting, but i don't know if that's core Android functionality or a vendor added thing, and if core, what API level.)

ianrenton avatar Mar 03 '17 07:03 ianrenton

Hehe, I wondered if this would be requested. The 30% has been hard coded for years, I just made it much more visible. :) I will have a think and come up with something. Not sure which device power settings you are referring. As far as I know, there are no settings that apps get any choice about. If they get energy-saved, they can't really avoid it.

haku avatar Mar 04 '17 09:03 haku

I meant settings like this that automatically turn on a device-wide power saving mode when you reach a certain battery level:

samsung-galaxy-s6-ultra-power-saving-mode-e1428611548386-640x386

But like I said, I have a suspicion that these features are vendor-specific.

ianrenton avatar Mar 04 '17 13:03 ianrenton

Sorry for taking aaaages to do this. The code is in but barely tested at all.

That OS "power saving" is a recent android addition, 6+ I think. Basically it reduces the frequency at which "alarms" (wot android calls cron entries) fire. OS always tries wakes up every 15 min but then only does stuff if needed. The OS low power thing means that it does almost nothing at each wakeup, making them effectively irreverent (they last less than a second).

haku avatar Mar 28 '17 21:03 haku