I have an legacy VoIP app for which I want to provide Android's new doze and standby mode support. I have my own messaging/signaling mechanism for which I can't use Android's GCM feature. The documentation stated that white-listing the app will permit to use own signaling mechanism and keep the app alive in Doze mode.
Also I am generating keepAlive alarm using setExtract()
and setRepeating()
currently to keep alive the persistent connection of XMPP. If I add setExactAndAllowWhileIdle
for newer version, its stated that - the Alarm will be triggered at most one in every 15 minutes. But I need to generate it 1 in every 12 seconds interval. I went through Android documentation, many threads in SO and found an article on it. It seems what I want to achieve is not completely possible by white-listing the app and using AlarmManager
's new APIs.
What can I do to keep my functionality as like before? Keeping the app alive in doze & standby mode, generating alarm alert with 12 seconds interval to keep the connection alive and keep the network connection open?