Over a million developers have joined DZone.

Keeping The Screen Light On

·
Miso library provides a feature to turn your phone's screen light on.

import miso
miso.reset_inactivity_time()

Read the documentation and download miso from here.

To make it always on. You can put the call into a loop
with ao_sleep.

def light_on():
    import miso, e32
    miso.reset_inactivity_time()
    e32.ao_sleep(10, light_on)  # forever loop
light_on()      # always keep light on
Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}