×
Namespaces

Variants
Actions

Archived:How to check if the application is in background

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

Article Metadata
Article
Created: bogdan.galiceanu (28 Mar 2008)
Last edited: hamishwillee (31 May 2013)

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):

import appuifw
 
#A function that tells us the focus status of the application is defined
def foc(status):
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
appuifw.app.focus=foc
This page was last modified on 31 May 2013, at 04:08.
46 page views in the last 30 days.
×