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:

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

{{ parent.tldr }}

{{ parent.urlSource.name }}