I am the developer of a messaging application. My application get put on an automatic power save mode which prevents messages from getting through.
When I go to the App
You can ask user to ignore battery optimizations: https://developer.android.com/training/monitoring-device-state/doze-standby.html#support_for_other_use_cases
But your use case needs to be acceptable for Google Play validation: https://developer.android.com/training/monitoring-device-state/doze-standby.html#whitelisting-cases