Hiding an app from the task list on Symbian
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 );