×
Namespaces

Variants
Actions
Revision as of 08:14, 18 September 2012 by hamishwillee (Talk | contribs)

Archived:How to keep backlight on using PySymbian

From Nokia Developer Wiki
Jump to: navigation, search

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

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: cyke64 (19 Mar 2007)
Last edited: hamishwillee (18 Sep 2012)

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.

80 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.

×