DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Keeping The Screen Light On

09.18.2005
| 2203 views |
  • submit to reddit
        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 <a href=http://pdis.hiit.fi/pdis/download/miso/>here</a>.

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