Revision as of 07:07, 27 July 2012 by
Archived:How to check if the application is in background
From Nokia Developer Wiki
Created:(28 Mar 2008)
Last edited:(27 Jul 2012)
For some programs it may be useful to know whether they are running in the background or in the foreground. This is how to check the focus state of a program (using the standard PySymbian appuifw module):
#A function that tells us the focus status of the application is defined
if(status==1):print 'App is now in the foreground'
else:print 'App is now in the background'
#We assign the function to the focus item of the Application class in appuifw