How can I change brightness of watch using Android Wear SDK (in my code) while my watch-face is running. I want to keep brightness lower than the lowest level of Android Wear brightness settings.
Asked
Active
Viewed 619 times
0
-
Are you talking about the "active" phase of your watchface or when it is in ambient? – Ali Naddaf Jan 19 '16 at 06:25
-
@AliNaddaf Actually Both :) – AVEbrahimi Jan 19 '16 at 06:25
-
Have you tried the usual android approach to change the brightness? – Ali Naddaf Jan 19 '16 at 06:26
-
@AliNaddaf It's lowest level is still not enough dim. – AVEbrahimi Jan 19 '16 at 07:19
-
Do you mean programmatically you have set the brightness to minimum and it is still too bright? – Ali Naddaf Jan 19 '16 at 15:04
1 Answers
0
I found a solution, yes it's vivid! But it's not working in ambient mode on most watches:
private void updateBrightness() {
android.provider.Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE, Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
if (!mAmbient)
android.provider.Settings.System.putInt(getContentResolver(), android.provider.Settings.System.SCREEN_BRIGHTNESS, getBrightness());
else
android.provider.Settings.System.putInt(getContentResolver(), android.provider.Settings.System.SCREEN_BRIGHTNESS, getAmbientBrightness());
}

AVEbrahimi
- 17,993
- 23
- 107
- 210