I'm working on legacy VOIP application on Android. It doesn't use Google Cloud Messaging technology right now, but just keeping its own TCP connection forever.
Recently Google has introduced its Android M preview release with Doze mode
So the question: is there any workaround how the app can receive incoming calls/messages in Doze mode without redesigning the whole system to use GCM?
Doze mode suspends battery-draining network activities, such as location services, syncing and Wi-Fi® scanning in the background when you have not been using your device for a long time. Phone calls and text messaging (SMS) are not affected.
Understanding Doze. If a user leaves a device unplugged and stationary for a period of time, with the screen off, the device enters Doze mode. In Doze mode, the system attempts to conserve battery by restricting apps' access to network and CPU-intensive services.
Another nice feature of WorkManager is that it respects power-management features so that if a job is scheduled to run at a defined time and the device is in Doze at that time, WorkManager will try to run the task during a maintenance window if the constraints are met or after Doze is lifted.
You may use ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
to ask the user permission to be ignored by battery optimization. However, double check Optimizing for Doze and App Standby, it seems to be allowed only for enterprise VoIP/IM (see questions #33114063 and #31154128)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With