I work on an Android application that uses voice recognition for user 
interaction and communicates to a server to process the responses. The 
users will use the application continuously for several hours at a time. 
The app holds a partial wake lock to keep the device running but allow the 
display to turn off to conserve battery power. This has worked fine until 
Marshmallow. The Doze feature disables network access, preventing the 
application from working. I have disabled battery optimization for the app, 
but it still fails to communicate with the server properly after running 
for an hour or two. If the app holds a full wake lock, the application 
properly communicates to the server, but the screen stays on and drains the 
battery too quickly. Using GCM as recommended by Google is not an option, 
since the communication is initiated by the device whenever a user speaks.

Is there any way to disable the network access limitations of the Doze 
feature and still allow the screen to turn off?

Ironically, the Doze feature will cause us a much larger battery drain, if 
requesting a full wake lock is the only solution.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/8863ab11-596b-41d2-9fe7-d7288b0f9ad2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to