iPhone/iPod screen brightness

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

  1. kcjones macrumors newbie

    Joined:
    Aug 4, 2008
    #1
    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

    Joined:
    Jul 30, 2008
    #2
    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

    Joined:
    Jun 26, 2008
    #3
    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

    DipDog3

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

    Joined:
    Aug 28, 2008
    #5
    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

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

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

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #8
    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

    Joined:
    Sep 2, 2010
    #9
    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