Namespaces
Variants
Actions

How to hide your application from running tasks list, and how to hide the round circle over your running application icon

Jump to: navigation, search

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.

Needs-update.png
This article needs to be updated: If you found this article useful, please fix the problems below then delete the {{ArticleNeedsUpdate}} template from the article to remove this warning.

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
Devices(s): Nokia N8, Nokia E7, Nokia C7, Nokia E6, Nokia X7, Nokia 808 PureView

Compatibility
Platform(s): Symbian^1 and later

Article
Created: ashraf fawzy (22 Jul 2012)
Last edited: hamishwillee (02 Aug 2012)

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
Note.png
Note: For a better user experience: If you 'Set' the 'Exit' button in your project to 'Hide' your application rather than shutting it down; it's better to show a note informing the user that your application is running in the background and not entirely closed.

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.

This page was last modified on 2 August 2012, at 05:07.
142 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved