Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kcjones

macrumors newbie
Original poster
Aug 4, 2008
8
0
Hey everyone. I need my application to be able to dim the device screen for a while and restore it to the original brightness. Does anyone know where I should be looking, UIScreen, UIDevice or something else.

I've seen other applications on the AppStore modifying brightness so I think it is possible.

Could someone point me in the right direction. Thanks in advance.
 

TripleJ

macrumors regular
Jul 30, 2008
128
0
Hey everyone. I need my application to be able to dim the device screen for a while and restore it to the original brightness. Does anyone know where I should be looking, UIScreen, UIDevice or something else.

I've seen other applications on the AppStore modifying brightness so I think it is possible.

Could someone point me in the right direction. Thanks in advance.

Be careful with this, because I seem to recall somewhere stating that modifying the brightness of the screen through apps is not allowed by apple. I think one of the flashlight apps got pulled for it. Have a read through the sdk agreement, just in case :)
 

ayasin

macrumors 6502
Jun 26, 2008
318
0
There's no need to read the license to find this out. Basically if you don't see the API to do it in the official SDK then you can't do it in an app on the app store. Hint: there's no set brightness API call. Would be nice though.
 

DipDog3

macrumors 65816
Sep 20, 2002
1,191
812
"Light" got pulled from the App Store because it modified the Brightness setting, so it is not allowed by Apple.
 

mspatts

macrumors newbie
Aug 28, 2008
8
0
any way to do this if i'm just writing an app for myself (on my jailbroken iphone) and not through the AppStore ??
 

capofalcone

macrumors newbie
Dec 19, 2008
1
0
any way to do this if i'm just writing an app for myself (on my jailbroken iphone) and not through the AppStore ??

did you find a solution? I'm looking for the same as I have to do an app for myself and it will not go on the app store. But I really need to lower the brightness when the app is not used by me as otherwise it would drain the battery really quickly.

let me know if you found an api call.
marco
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
I'd suggest consulting with the jailbreaking sites for answers like this. This forum is mainly concerned with programming on non-jailbroken devices.
 

cgarmstrong

macrumors newbie
Sep 2, 2010
1
0
I've been looking into this myself for an app, turns out the way that developers get around the private API usage is to just overlay a completely black image over the entire view, then adjust the image's opacity with a 'brightness' slider.

Hacky, but it works. It's what I'll probably be using. Hope that helps somebody...;)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.