Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn off Auto-Brightness programmatically?

I was wondering if there is a method to toggle the "Auto-Brightness" option to the OFF position on iOS devices and if so, what is it?

like image 383
David Avatar asked Dec 04 '22 00:12

David


2 Answers

Brightness can be adjusted when you are inside the app and it is available inside the UIScreen class -

Here's the documentation - http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScreen_Class/Reference/UIScreen.html#//apple_ref/occ/instp/UIScreen/brightness

But Apple's official public APIs do not allow an iOS app to access General settings in the Settings app. So you will not be able to change the toggle button inside the settings app.

like image 102
Ashish Agarwal Avatar answered Dec 14 '22 01:12

Ashish Agarwal


I can't speak with any authority (can't prove a negative, etc.), but this doesn't seem like a setting that Apple would give 3rd party apps the ability to modify. Sure, Settings.app modifies it, but that doesn't mean there's public API to do it. Since there's no jailbreak tag on this post, I'm gonna go ahead and assume that the asker is asking about public API. I'm gonna go with "you can't."

like image 43
ipmcc Avatar answered Dec 14 '22 02:12

ipmcc