Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



How to access and manipulate running applications

Applications running on a device are known as tasks. The TApaTaskList class is used to access applications running on a device, where each task has the potential to be an instance of the TApaTask class, which is used to manipulate or query tasks.


How to find an application by its UID

This code example shows how to find (and end) a running application (i.e. a task) by its UID using the TApaTaskList and TApaTask classes.

const TUid KMyAppUid = {0x10009e9f};
TApaTaskList taskList(CCoeEnv::Static()->WsSession());
TApaTask task = taskList.FindApp(KMyAppUid);
if (task.Exists())
    {
    task.EndTask();
    }

The following is a description of each line of the code example above:

[Top]


How to bring an application to the foreground

The following code example shows how to find an application by its name then bring it to the foreground.

_LIT(KAppName, "myApp");
TApaTaskList taskList(CCoeEnv::Static()->WsSession());
TApaTask task = taskList.FindApp(KAppName);
if (task.Exists())
    {
    task.BringToForeground();
    }

[Top]


See also

It may also be worth looking at the following entries in the FAQ Knowledge base C++ FAQs: