views:

4187

answers:

2

Does the SDK provide any way to change the brightness of the backlight, or turn it off temporarily?

+1  A: 

No. This is not available in the SDK. If it's something you think would be useful, I suggest you file an enhancement request.

August
+3  A: 

I'm trying to do the same thing. As it happens there are a number posts out there in the internets with "solutions" for this.

The most detailed is here This one is more succinct

The problem is that I've tried these and they all rely on calling this function

GSEventSetBacklightLevel();

which requires this header to be imported

#import <GraphicsServices/GraphicsServices.h>

And that import fails in the SDK reporting that the header file cannot be found.

I've searched for some solution but haven't found it. There is some talk about "building the toolchain" (for the best description I've found see here) but that seems to involve bypassing the SDK altogether. Pretty drastic.

Summary: It's possible, but not with the standard iPhone SDK. I imagine an update to the SDK will come soon that should allow for it.

Let me know if you find any other solution.

Rhubarb