Revision as of 04:33, 30 May 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How to detect if application launched from Home-screen

From Nokia Developer Wiki
Jump to: navigation, search

This article explains how to detect if the application has been launched from Home-Screen or Menu.

Article Metadata
Tested with
Devices(s): Nokia E7
Platform(s): Symbian^3, Symbian Anna
Device(s): All Symbian^3
Created: ashraf fawzy (09 Feb 2012)
Last edited: hamishwillee (30 May 2013)


Sometimes when you create an application you want it to do a specific action when user launches it from Home-Screen, and to do another action when user launches it from menu.

Note.pngNote: This method doesn't work on Nokia Belle, as Both Home-screen and Applications Menu has the same UID.

Code Example

TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
TApaTask task = taskList.FindByPos(1);
TInt WgId = task.WgId();
CApaWindowGroupName* wgn = CApaWindowGroupName::NewLC(CEikonEnv::Static()->WsSession(), WgId);
TUid uid = wgn->AppUid();
if (uid == TUid::Uid(0x102750F0)) // HomeScreen UID
// Launched from Homescreen
// Launched from Menu


For example, if you create a memory cleaner application you may want user to add a shortcut of your application on Home-Screen to clean memory with one simple touch / click, and if user wants to access your application to select manually specific actions to clean memory, he / she has to launch your application from Menu.

This page was last modified on 30 May 2013, at 04:33.
40 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.