iOS

// 此方法是获取手机屏幕的亮度值,也就是你手机设置的亮度值

double currentLight = [[UIScreen mainScreen] brightness];

//这个方法会在app失去激活状态的时候调用  比如说程序进入后台

- (void)applicationWillBecomeActive:(UIApplication *)application

{

    [[UIScreen mainScreen] setBrightness: 0.5];//0.5是自己设定认为比较合适的亮度值

 

 

Android

http://blog.csdn.net/android_ls/article/details/8678313

http://blog.csdn.net/wzy_1988/article/details/49472611