×
Namespaces

Variants
Actions
Revision as of 01:02, 7 December 2008 by bogdan.galiceanu (Talk | contribs)

Archived:How to handle user inactivity with PySymbian

From Nokia Developer Wiki
Jump to: navigation, search
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: (25 Mar 2008)
Last edited: bogdan.galiceanu (07 Dec 2008)

Overview

This snippet shows how to determine and reset the user inactivity time in Python.

Source code

import e32
 
 
print e32.inactivity()
#The time in seconds since the user of the device was last active
 
#Reset the inactivity period
e32.reset_inactivity()

Postconditions

The number of seconds since the user was last active is displayed, then the inactivity timer is reset. As a consequence of resetting the inactivity timer, the device's backlight will be turned on.

48 page views in the last 30 days.