How to hide your application from running tasks list, and how to hide the round circle over your running application icon
This article explains how to hide your application from running tasks list - Task Switcher - and how to hide the round circle over your application icon when it is running in the background.
Reasons: hamishwillee (02 Aug 2012)
This article duplicates information in Hiding an app from the task list on Symbian, How to Hide Application from User Menu, Keeping a Symbian application running in the background on exit. It should be redirected to those, but first should check whether any of the information here is useful and should be included in those documents.
Article Metadata
Tested with
Compatibility
Article
Introduction
Sometimes you want to keep your application running hidden in the background from running tasks list - Task Switcher / Show Open Applications - to avoid accidentally shutting it down by user.
Solution
1- How to send your application to background.
iEikonEnv->RootWin().SetOrdinalPosition(-1); // Change (-1) to (0) to get your application to foreground
2- How to hide your application from running tasks list.
This step needs you to implement a virtual function at your project 'Document' object, which is UpdateTaskNameL()
// implement the following virtual function in your project Document Object (YourProjectDocument.h)
#include <apgwgnam.h> // For CApaWindowGroupName
void UpdateTaskNameL( CApaWindowGroupName* aWgName );
// implement the following virtual function in your project Document Object (YourProjectDocument.cpp)
void CYourApplicationDocument::UpdateTaskNameL( CApaWindowGroupName* aWgName )
{
CAknDocument::UpdateTaskNameL(aWgName);
aWgName->SetHidden(ETrue); // This function hides your application from running tasks list
aWgName->SetSystem(ETrue); // This functions sets your application as System application
}
3- How to hide the round circle over your running application icon.
// Add the following function under your AppUi object ConstructL() function:
void YourAppUi::ConstructL()
{
CAknAppUi::HideApplicationFromFSW(ETrue);
}
Summary
Using The code snippets mentioned above in your project makes sure that your application is running hidden from 'Running Tasks List' to avoid accidentally shutting it down. And gives it a professional look, as most users are annoyed by the round circle over the running applications icons.


Kamalakshan - Duplicate content
Hi,
The above methods have already been documented in the wiki.
http://www.developer.nokia.com/Community/Wiki/Hiding_an_app_from_the_task_list_on_Symbian
http://www.developer.nokia.com/Community/Wiki/How_to_Hide_Application_from_User_Menu
http://www.developer.nokia.com/Community/Wiki/Keeping_a_Symbian_application_running_in_the_background_on_exit
The existing ones could have been edited.kamalakshan 06:15, 26 July 2012 (EEST)
Hamishwillee - Agreed,
the useful content in this article should be merged.hamishwillee 04:37, 2 August 2012 (EEST)