Hiding an app from the task list on Symbian

From Nokia Developer 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 05:46.
118 page views in the last 30 days.