Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Keeping a Symbian application running in the background on exit
S60 3rd Edition, FP1
S60 3rd Edition, FP2
S60 3rd Edition FP2
S60 3rd Edition FP1
S60 3rd Edition (initial release)
There are instances where some time-consuming operations need to be done during application exit. To avoid unneccessary delays and improve usability, an application can be switched to the background and hidden from the task list/fast-swap window once user interaction is no longer required.
The application can be hidden and made to run in the background using the below code in the implementation of the AppUI class.
#include <apgwgnam.h> // link against apgrfx.lib
#include <w32std.h> // link against ws32.lib
CMyAppUi::HandleCommandL( TInt aCommand )
switch( aCommand )
CApaWindowGroupName* wgName = CApaWindowGroupName::NewLC(
wgName->SetHidden( ETrue );
wgName->SetWindowGroupName( iEikonEnv->RootWin() );
// Hide the application from fast-swap window
// CAknAppUi::HideApplicationFromFSW() is available
// from S60 3rd Ed, FP1 onwards
HideApplicationFromFSW( ETrue );
// Send this application to background
iEikonEnv->RootWin().SetOrdinalPosition( -1 );
CleanupStack::PopAndDestroy( wgName );
// Proceed to do cleanup and call Exit() when done.