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?
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)
No, GCM seems to be the only way. See a great analysis of the problems with doze mode including network and GCM here: https://commonsware.com/blog/2015/06/03/random-musing-m-developer-preview-ugly-part-one.html
链接地址: http://www.djcxy.com/p/27790.html