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.

Hiding an app from the task list on Symbian

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): All (S60)
Keywords: CApaWindowGroupName, SetHidden
Created: User:Technical writer 2 (September 15, 2003
Updated: March 24, 2010)
Last edited: hamishwillee (30 May 2013)


This article describes how to control the visibility of an application in all S60 platform versions.

Detailed description

An application can be set to behave as the telephone application and not to respond to shutdown events by calling CEikonEnv::SetSystem(ETrue). CEikonEnv::SetBusy() is a similar function. The difference is that the latter shows a Confirm close dialog, but does not kill the application regardless of the answer. It is useful when the application is running a critical task and should not be terminated. In addition, it's possible to prevent an application from being visible in the task list altogether by using CApaWindowGroupName::SetHidden().

Note.pngNote: For a better user experience: If you 'Set' the 'Exit' button in your project to 'Hide' your application rather than shutting it down; You are advised to show a note informing the user that your application is running in the background and not entirely closed.


The following code demonstrates how to hide an application from the task list.

 TInt wgId = iEikonEnv->RootWin().Identifier();
RWsSession session = iEikonEnv->WsSession();
CApaWindowGroupName* wgName = CApaWindowGroupName::NewLC( session, wgId );
wgName->SetHidden( ETrue );
wgName->SetWindowGroupName( iEikonEnv->RootWin() );
CleanupStack::PopAndDestroy(); // wgName

Alternatively, it's possible to override CEikDocument::UpdateTaskNameL(). This function is called by the UI framework during application start-up, allowing the window group name to be modified.

 void CMyAppDocument::UpdateTaskNameL( CApaWindowGroupName* aWgName )
aWgName->SetHidden( ETrue );

Note.pngNote: 3rd party applications should never run as system applications or hidden unless really meaningful and necessary. Users should always be aware of applications running on the device and be allowed to close any application to free up memory.

This page was last modified on 30 May 2013, at 02:46.
61 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.