Last active
August 29, 2015 14:03
-
-
Save zaki50/f798b8507db03d9ecea3 to your computer and use it in GitHub Desktop.
android wear のバックライトの明るさ調整方法と、端末ごとの設定値
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AndroidManifest.xml に <uses-permission android:name="android.permission.WRITE_SETTINGS"/> を書くこと | |
final int brightness = 128; // 0-255 の範囲で明るさを指定する | |
// バックライトの明るさの設定方法は、普通のAndroid端末と同じ | |
Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, brightness); | |
// Samsung Gear Live の設定画面では5段階(括弧の中は設定画面で選択した場合の値) | |
// 5(255): 255-230 | |
// 4(204): 229-179 | |
// 3(153): 178-128 | |
// 2(102): 127-77 | |
// 1(51): 76-0 | |
// LG G Watch の設定画面では6段階 | |
// 6: 255-230 | |
// 5: 229-179 | |
// 4: 178-128 | |
// 3: 127-89 | |
// 2: 88-64 | |
// 1: 63-0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment