我可以从api等级8开始禁用自动亮度。 旧版本怎么样? 如何从API 4中禁用自动亮度模式?
答案 0 :(得分:0)
根据Google android dashboard,只有0.3%的设备使用API级别4.感染只有3.5%的设备低于API级别7.因此我猜您不必担心API级别4或者此类问题任何低于API等级8的东西都会浪费时间......
答案 1 :(得分:0)
private static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode";
private static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0;
private static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1;
Settings.System.putInt(resolver, SCREEN_BRIGHTNESS_MODE, mode);
Settings.System.putInt(resolver, Settings.System.SCREEN_BRIGHTNESS, lev);