Skip to main content
pecacheu
Inspiring
February 13, 2014
Question

Change Screen Brightness

  • February 13, 2014
  • 1 reply
  • 1029 views

Is there any way to adjust the brightness of the screen in Adobe Air for Desktop (running in Windows 8.1)?

I have an app that I want to always run at full screen brightness.

If not, does anyone know of any ANEs that will work?

If also not, does anyone know where to find a tutorial on making ANEs?

This topic has been closed for replies.

1 reply

Inspiring
February 14, 2014

Excellent tutorial on iOS ANEs: http://diadraw.com/easynativeextensions/

You'll need to know both AS3 and Objective-C to do this yourself.

I believe that, in iOS, there's a UIScreen class property called 'brightness.'

pecacheu
pecacheuAuthor
Inspiring
February 14, 2014

Thanks, I think I might try and create an ANE. Not that it's an absolutly critical feature to the app, but I think it will be much be better with screen brightness adjusting capabliltes.

I wish it wasn't Objective-C though. I know alot of program languages, and Objective-C happens to be my least favorite of all of them. That's right, it worse than FOURTH, and BASIC, at least for me.

User Unknow
Legend
February 16, 2014

I you not familar with Native Extensions and C++ / C - you can try avoid using it using already done external apps. Just find one that can work in background so users will not see it.

http://www.nelsonpires.com/software/dimmer/ go there and download simple app.

Using executing NativeProcess you can run it. But before you can edit Opacity value in XML. So scheme may be next:

1) using adobe air edit xml and update opacity value

2) attach listener to main app exit so when you close it - you also must termiate your Dimmer

3) run Dimmer with NativeProcess API from Adobe Air

4) when you exit from main app - listener from step 2 will fire and you must close Dimmer from step using exit() method

This app actually not reduce brightness and just add black overlay with opacity. In most cases it's work prefectly. When you need to terminate external NativeProcess just call exit()

You may note that if you have some external app that can cover your functionality - better to use it instead developing own DLL Because Developing DLLs require addition skills.