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.

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

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.

  1. Numbered list item
Article Metadata
Platform(s): S60 1st Edition
S60 2nd Edition
S60 2nd Edition (initial release)
S60 1st Edition
Created: User:Technical writer 2 (14 Apr 2004)
Last edited: lpvalente (26 Jul 2014)


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


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 26 July 2014, at 23:30.
19 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.