'setScreenBrightness() fails in qpython

I'm trying to set the screen brightness on a nexus 10 tablet, using qpython3.

The following simple code, running in qpython3, results in an error

from androidhelper import Android
droid = Android()
# This works:
R = droid.getScreenBrightness()
print("SCREEN BRIGHTNESS",R)
# This errors out
print("SET BRIGHTNESS")
droid.setScreenBrightness(60.)

results in the error java.lang.NullPointerException: throw with null exception

This is simplistic, so what I am doing wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source