iPhone/iPod screen brightness

Discussion in 'iOS Programming' started by kcjones, Aug 11, 2008.

  1. kcjones macrumors newbie

    Aug 4, 2008
    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.
  2. TripleJ macrumors regular

    Jul 30, 2008
    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 :)
  3. ayasin macrumors 6502

    Jun 26, 2008
    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.
  4. DipDog3 macrumors 65816


    Sep 20, 2002
    "Light" got pulled from the App Store because it modified the Brightness setting, so it is not allowed by Apple.
  5. mspatts macrumors newbie

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

    Dec 19, 2008
    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.
  7. wonza macrumors member

    Oct 15, 2008
    Anyone find a solution for this? Im also needing to use it.
  8. dejo Moderator


    Staff Member

    Sep 2, 2004
    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.
  9. cgarmstrong macrumors newbie

    Sep 2, 2010
    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...;)

Share This Page