Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android VOIP applications behavior in Doze mode

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?

like image 409
Nick Moskalenko Avatar asked Jul 24 '15 06:07

Nick Moskalenko


People also ask

Which of these activities will occur when a device is in doze mode?

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.

What is dozing in Android?

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.

Does Work Manager work in doze mode?

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.


1 Answers

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)

like image 187
cuihtlauac Avatar answered Oct 04 '22 21:10

cuihtlauac