Module to control the bright of Android device.
To access this module from JavaScript, you would do the following:
var bright = require("com.apaladini.brightness");
The bright variable is a reference to the Module object.
Return a float value (0-1) of current system bright level
Set a float value (0-1) to system bright level
Return a float value (0-1) of current window bright level
Set a float value (0-1) to window bright level
On Android, to use "setSystemBrightLevel", your app need permission to write on system settings. To do this, edit your tiapp.xml and insert this:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
</manifest>
</android>
See sample code
Adriano Paladini