I am not able to change Battery Optimisation settings after enabling App as device admin

306 Views Asked by At

I have an alarm app which requires to changes battery optimisation settings.

Steps to change battery optimisation settings:

  1. When App opens it redirects user to Battery optimisation page
  2. Selects all apps, search for my Alarm App
  3. Click App and select "Don't optimise"

But the as per my new app requirement, I have to add ADMIN permission to lock the screen after alarm fire. I have refer this link to setup admin permission: How to turn Android device screen on and off programmatically?

But once I make Admin settings ON for my App, I am not able to change Battery Optimisation settings.

Issues:

  1. If device admin is activate, My App is shown in both list("Not optimised" and "All Apps" app list).
  2. If device admin is activate, When I click on MyApp it does not show option for selection from "Don't optimise" and "Optimise".
  3. After I deactivate device admin for my App, then battery optimisation settings starts working and able to select options from "Don't optimise" or "Optimise".

Observation:

  1. I have also checked other admin app like "Company Portal", "POCO Launcher". These apps also not allowed to change battery optimisation settings.

I have also tried to check admin permission document, but could not find any reference to battery optimisation settings.

Questions:

  1. Did admin level permission and battery optimisation settings work simultaneously?
  2. What is the solution which allow to change battery optimisation settings when Admin is on for my App?
  3. If device admin is activate for My App, will it make battery optimisation settings for My App to "Don't Optimise" by default ?
0

There are 0 best solutions below