Created
October 8, 2018 04:37
-
-
Save yosh1/d74da63267e17c71063c2754c0081863 to your computer and use it in GitHub Desktop.
QRコードやバーコードを表示するときに画面の明るさを最大にする ref: https://qiita.com/yoshi1125hisa/items/de6e09bdfec1dafccec6
This file contains 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
WindowManager.LayoutParams layoutParams = getWindow().getAttributes(); | |
layoutParams.screenBrightness = WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_FULL; | |
getWindow().setAttributes(layoutParams); |
This file contains 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
UIScreen.mainScreen().brightness = 1.0f |
This file contains 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
[[UIScreen mainScreen] setBrightness:1.0f]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment