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. Thanks for all your past and future contributions.

Sending an application to background

From Wiki
Jump to: navigation, search
Article Metadata
Created: vvsnaresh (02 May 2007)
Last edited: hamishwillee (09 Aug 2012)



To send an application to background or to bring to foreground TApaTask class will be used.


Class for Application task. A task is a running application. At any one time, for any given application, there may be zero, one, or more tasks running on a device. A task is identified by its association with the running application's window group. An instance of the TApaTaskList class is used to find and access specific tasks.

Functions defined in this class are:

  • BringToForeground()
  • EndTask()
  • Exists()
  • KillTask()
  • SendKey()
  • SendMessage()
  • SendSystemEvent()
  • SendToBackground()
  • SetWgId()
  • SwitchCreateFile()
  • SwitchOpenFile()
  • TApaTask()
  • ThreadId()
  • WgId()

The good example for these functions in this class will be a Task Manager.


Sends the specified task to the background. The task whose window group is at the next ordinal position is brought up to the foreground. In addition, the new foreground task's top view is activated, if it uses the View architecture.

TApaTask task(iEikonEnv->WsSession());
task.SetWgId( CEikonEnv::Static()->RootWin().Identifier());


This page was last modified on 9 August 2012, at 04:29.
46 page views in the last 30 days.