S
S
swargsgt2019-02-26 07:49:27
Android
swargsgt, 2019-02-26 07:49:27

How to programmatically disable power optimization for an android application?

Good day.
How can I programmatically disable power optimization (on Xaiomi Android 7.x, for example, there are such types of optimizations as "disabled", "optimal", "soft", "hard ", etc.)?
For example, to make a request to the user to disable optimization.
Android 6.0+

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Sorokin, 2019-02-26
@Vass

If I understood the question correctly, then you need to request permission on
android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS

D
Denis Zagaevsky, 2019-02-26
@zagayevskiy

No way. Moreover, as far as I know, it cannot even be determined programmatically.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question