Namespaces
Variants
Actions
(Redirected from How to keep backlight on)

Archived:How to keep backlight on using PySymbian

Jump to: navigation, search
Archived.png
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.


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 (31 May 2013)

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.

This page was last modified on 31 May 2013, at 04:09.
112 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved