Hiding an app from the task list on Symbian
S60 5th Edition
S60 3rd Edition FP2
S60 3rd Edition FP1
S60 3rd Edition (initial release)
S60 2nd Edition FP3
S60 2nd Edition FP2
S60 2nd Edition FP1
S60 2nd Edition (initial release)
S60 1st Edition
Updated: March 24, 2010)
This article describes how to control the visibility of an application in all S60 platform versions.
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().
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 );