Le 26/03/2019 à 11:02, Brian J. Murrell
a écrit :
On Mon, 2019-03-25 at 23:07 +0000, Christopher Woods wrote:
Yep, that's right - it's a helper service which runs as a keep-alive
and
prevents Android from suspending / killing the core Linphone process
while
it's backgrounded.
But I thought that was OK to happen if there was a push notification
available to wake it up when it was needed again.
Push notifications and background services were a bit of a mess a
while ago
(
https://medium.freecodecamp.org/why-your-push-notifications-never-see-the-light-of-day-3fa297520793)
and unfortunately on some flagship devices are still a mess without
an
active notification service handling the background tasks.
Yes. I see. Interesting article. Indeed, I have one of these phones
(Huawei Honor 8 with Oreo) with an aggressive battery manager. It does
have settings to except applications from the aggressive power
management features.
I'm still trying to figure out what the right combination of Linphone
options and battery manager options are necessary though.
So maybe a good starting point is to understand with phones that don't
have these aggressive battery managers, which linphone settings are
normally needed to allow linphone to always (i.e. screen on, off, in
doze mode, etc.) receive push notifications and be nice on battery?
Obviously Account->Allow push notification. What about Settings-
Advanced->Background mode? Is that necessary? Or Enable service
notifications? Is that necessary on a phone without aggressive battery
management?
Maybe I need to dig out my Nexus 5 with Lineage 15.1 on it to
understand functionality without aggressive battery management. But
would appreciate input from the experienced folks here too.
Also, why isn't Enable service notification sticky across linphone
restarts? Bug?
Yes that's a bug caused by these 3 lines of code in
NotificationsManager.java that automatically resets the setting to
false: