0

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

ViTUu
  • 1,204
  • 11
  • 21

1 Answers1

0

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.

Sam Lu
  • 3,448
  • 1
  • 27
  • 39