Namespaces
Variants
Actions

How can I determine if a specified app is in the foreground using Symbian C++?

Jump to: navigation, search



Article Metadata

Compatibility
Platform(s): S60 1st Edition
S60 2nd Edition

Article
Created: User:Technical writer 2 (14 Apr 2004)
Last edited: hamishwillee (14 Jun 2012)

Overview

How can I determine if a certain application is in the foreground?

Description

To determine whether, for example, the telephone application is in the foreground, you can use TApaTaskList and TApaTask. You can find out the topmost application by calling TApaTaskList::FindByPos(0). The function parameter is the window's ordinal position and zero means the foreground window. The function returns the TApaTask object. You can use it to find out the window group of the application by calling wgId(). After this you can, for example, construct an CApaWindowGroupName object with the window ID returned by the wgId(). The AppUid() function returns the UID of the application. All you need to do is test if it is the same as the UID of the telephone application (0x100058B3).The Window Server also provides some useful functions (see RWsSession).

This page was last modified on 14 June 2012, at 09:01.
77 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