I have an Android foreground service with a WiFi lock that acts as a web service for another local device. Before Doze mode, acquiring a WiFi lock and being a service as needed worked great.
Even with battery optimizations turned off for my app, the phone is still killing the app when the screen is off for a few minutes.
How do I properly alert Android that a service requested by the customer explicitly is being performed in the foreground, and they do not want their phone to go to sleep at this time?
EDIT: This issue still exists in Android 8.0 (Oreo)