diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-0F1CB874-391F-5D44-B960-517E447DC712.dita --- a/Symbian3/PDK/Source/GUID-0F1CB874-391F-5D44-B960-517E447DC712.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-0F1CB874-391F-5D44-B960-517E447DC712.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,48 +1,48 @@ - - - - - -Accessing -the Running ApplicationsApplications running on a device are known as tasks. The TApaTaskList class -is used to access applications running on a device, where each task can be -an instance of the TApaTask class, which is used to manipulate -or query tasks. -
Finding an -application by its UID

The following example code shows how to -find or end a running application that is, a task by its UID using the TApaTaskList and TApaTask classes.

// Assign UID of the application to a constant, to find the application by its UID - -const TUid KMyAppUid = {0x10009e9f}; - -// Creates an instance of a TApaTaskList taking reference to a window server session. -// TApaTaskList allows access to all tasks running on the device. - -TApaTaskList taskList(CCoeEnv::Static()->WsSession()); - -// Creates a TApaTask instance that allows us to find out things about the task in question, for example: send a -// key-stroke to it, abort or end the task. - -TApaTask task = taskList.FindApp(KMyAppUid); - -// Checks whether the specified task exists on the device. - -if (task.Exists()) - { - task.EndTask(); // Ends the task - }
-
Bringing an -application to the foreground

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

_LIT(KAppName, "myApp"); -TApaTaskList taskList(CCoeEnv::Static()->WsSession()); -TApaTask task = taskList.FindApp(KAppName); -if (task.Exists()) - { - task.BringToForeground(); - }
+ + + + + +Accessing +the Running ApplicationsApplications running on a device are known as tasks. The TApaTaskList class +is used to access applications running on a device, where each task can be +an instance of the TApaTask class, which is used to manipulate +or query tasks. +
Finding an +application by its UID

The following example code shows how to +find or end a running application that is, a task by its UID using the TApaTaskList and TApaTask classes.

// Assign UID of the application to a constant, to find the application by its UID + +const TUid KMyAppUid = {0x10009e9f}; + +// Creates an instance of a TApaTaskList taking reference to a window server session. +// TApaTaskList allows access to all tasks running on the device. + +TApaTaskList taskList(CCoeEnv::Static()->WsSession()); + +// Creates a TApaTask instance that allows us to find out things about the task in question, for example: send a +// key-stroke to it, abort or end the task. + +TApaTask task = taskList.FindApp(KMyAppUid); + +// Checks whether the specified task exists on the device. + +if (task.Exists()) + { + task.EndTask(); // Ends the task + }
+
Bringing an +application to the foreground

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

_LIT(KAppName, "myApp"); +TApaTaskList taskList(CCoeEnv::Static()->WsSession()); +TApaTask task = taskList.FindApp(KAppName); +if (task.Exists()) + { + task.BringToForeground(); + }
\ No newline at end of file