7

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?

cuihtlauac
  • 1,808
  • 2
  • 20
  • 39
Nick Moskalenko
  • 941
  • 9
  • 10
  • How does GCM help you here anyway? Assuming your VOIP calls are signalled via SIP, and your messaging via XMPP, incoming events need to be on those protocols, not via an outside GCM trigger which other clients that you need to interoperate with will not know to send. – zmarties Sep 09 '15 at 10:47

2 Answers2

3

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)

Community
  • 1
  • 1
cuihtlauac
  • 1,808
  • 2
  • 20
  • 39
-1

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

sec_aw
  • 1,594
  • 1
  • 15
  • 26