×
Namespaces

Variants
Actions
Revision as of 00:40, 27 September 2009 by fasttrack (Talk | contribs)

Archived:How to keep backlight on using PySymbian

From Nokia Developer Wiki
Jump to: navigation, search
{{{width}}}


{{{width}}}
Article Metadata
Tested with
Devices(s): Nokia N95, Nokia E90
Compatibility
Platform(s): S60 1st Edition, S60 2nd Edition, S60 3rd Edition
Article
Keywords: e32
Created: (19 Mar 2007)
Last edited: fasttrack (27 Sep 2009)

Overview

This snippet shows how to keep the phone's backlight on in Python.

Source code

import appuifw, e32
 
 
app_lock = e32.Ao_lock()
#Define the exit function
def quit():
#Cancel the timer when the user exits, if it has not expired
t.cancel()
app_lock.signal()
appuifw.app.exit_key_handler = quit
 
#Instantiate a timer
t = e32.Ao_timer()
 
def light_on():
#Reset the user inactivity time, turning the backlight on
e32.reset_inactivity()
#Set the timer to call this function every few seconds
t.after(10, light_on)
 
light_on()
 
#Wait for the user to request the exit
app_lock.wait()

Postconditions

The device's backlight is turned on with each passing of the specified number of seconds.

74 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×