Skip navigation

Unable To Reset Brightness On Application Exit

689 Views 3 Replies Latest reply: Apr 27, 2012 8:12 AM by xnav RSS
Arshu Level 1 Level 1 (0 points)
Currently Being Moderated
Apr 27, 2012 2:37 AM

Why can't I set screen brightness in applicationDidEnterBackground or applicationWillResignActive?

This is my code:

- (void) applicationDidEnterBackground : (UIApplication *)application) {

[[UIScreen mainScreen] setBrightness:1.0];

}

Can't understand it...!? It works in applicationDidEnterForeground etc, just not when i close the app using the home button.

Is there any other solution to this problem?

Thanks to anyone that can help..

  • Michael Superczynski Level 5 Level 5 (7,105 points)
    Currently Being Moderated
    Apr 27, 2012 2:48 AM (in response to Arshu)

    If by "close the app using the home button" you mean touching the app icon in the recent apps bar until it jiggles and then closing it by touching the icon's X, you need to restore the screen setting the next time the user starts your app.

     

    It doesn't make any sense to set the screen brightness anyway if your app is not in the foreground.

     

    An app can't control the overall iPad screen brightness; you can't set the brightness and expect it to stay when your app quits.  Not allowed.

  • xnav Level 5 Level 5 (6,625 points)
    Currently Being Moderated
    Apr 27, 2012 8:12 AM (in response to Arshu)

    This is a known issue and I'm sure enhancement requests have been filed.  The user can toggle the device On/Off button to restore the 'usual' brightness setting.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.