Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:How to keep backlight on using PySymbian

From Wiki
Jump to: navigation, search

Archived.pngArchived: 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 01:09.
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.

×