I tried search but I didn't search anything about it.
Can I turn on my ambient display with code? I think do a service to turn on when I proximity my hand in device like Motorola.
Thanks advance
I tried search but I didn't search anything about it.
Can I turn on my ambient display with code? I think do a service to turn on when I proximity my hand in device like Motorola.
Thanks advance
You can do that by calling
Settings.Secure.putInt(getContentResolver(), Settings.Secure.DOZE_ENABLED, on ? 1 : 0);
Unfortunately, writing vale to Secure setting is not allowed on a non-root device.