I am working on a Voice over IP (VoIP) application using SIP, which requires the application to listen for incoming calls. This means that the application should not sleep or die.
For the old code, it seems like to do this in order to get PARTIAL_WAKE_LOCK .
Now with Android 6.0 and up there is a new Doze . It is recommended that if you do not want your application to go into standby mode, you need to "rename it" by requesting REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission . This is specifically for VoIP applications as per the documentation .
These two different things seem to be related. I’m not sure how they are connected , if they interfere with each other , if I should use one or the other or both , and if there are other considerations . Explain, please.
Also, I am not allowed to use Push Notifications for this project. If you have any other battery saving tips, please let me know.
source
share