I would to know if I can programmatically turn the screen off when Google Navigation is open.
I've made a Wear app, which launches Google Navigation on the phone, but the screen stays on. The same feature happens when I launch Google Navigation by myself.
So can I force the system to turn the screen off after a delay, without my app being admin?
Edit: I've use this :
WindowManager.LayoutParams params = getWindow().getAttributes();
params.flags |= WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
params.screenBrightness = 0;
getWindow().setAttributes(params);
But this only turn the dim to its minimum, not really turning the screen off And I think this function work only for our activity, in my case, the last activity on screen is the Google Navigation activity's.
Thanks ;)