I want to notify user that my app will not work properly if he has SONY android phone with STAMINE energy profile ON. This profile is blocking AlarmManager and device is not waked up when I want.
Currently, there is no official way to detect if the STAMINA energy profile is selected. However, if there is enough community demand we may be able to open this up.
You could check it via
Settings.Secure.getInt(contentResolver, "somc.stamina_mode", 0) == 1
Works at least on the Sony Xperia XZ1 Compact (8.0.0)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With