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.

System Application Notification API for Symbian C++

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Tested on: Nokia 5800 XpressMusic
Platform(s): S60 5th Edition
S60 5th Edition
Keywords: Symbian, Property, Subscribe
Created: User:Kbwiki (10 Mar 2010)
Last edited: hamishwillee (01 Aug 2012)


Note.pngNote: :This API is not part of the public SDK. It can be found in the SDK API Plug-in.

The System Application Notification API is used for getting a notification of various system events. These include power key events, alarm light on/off, and the soft reject key event. The header file (coreapplicationuisdomainpskeys.h) also contains keys for setting and getting the status for several indicators.

This functionality is accomplished by listening to changes in Publish and Subscribe key values.

Example Code

Header files

 #include <coreapplicationuisdomainpskeys.h>
#include <e32property.h> // RProperty class

Required capabilities


The following code can be used for retrieving the status for various events:

Definitions in header file

  enum TWatcherType
TWatcherType iWatcherType;
RProperty iProperty;
TInt iValue;
// See coreapplicationuisdomainpskeys.h possible values for iKey
iProperty.Attach( KPSUidCoreApplicationUIs, iKey );
iProperty.Get( iValue );
TBuf<128> message( _L("N/A") );
if ( iValue != KErrNotFound )
switch ( iWatcherType )
case EPowerKey:
if ( aValue == ECoreAppUIsHideAlarmUninitialized )
message = _L("Power Key Pressed Alarm Not Initialized");
else if ( aValue == ECoreAppUIsDoNotHideAlarm )
message = _L("Do Not Hide Alarm" );
else if ( aValue == ECoreAppUIsHideAlarm )
message = _L( "Hide Alarm" );
case EAlarm:
if (aValue == ECoreAppUIsDisableKeyguardUninitialized )
message = _L("Disable Keyguard Uninitialized" );
else if ( aValue == ECoreAppUIsEnableKeyguard )
message = _L("Keyguard Enabled");
else if ( aValue == ECoreAppUIsDisableKeyguard )
message = _L("Keyguard Disabled");
case ELight:
if ( aValue == ECoreAppUIsKeyEventUninitialized )
message = _L("Light Uninitialized");
else if ( aValue == ECoreAppUIsNoKeyEvent )
message = _L("Light on");
else if ( aValue == ECoreAppUIsKeyEvent )
message = _L("Light off");
CAknInformationNote* note = new (ELeave) CAknInformationNote;
note->ExecuteLD( message );

See also

Archived:Setting various indicators on S60 3rd Edition FP2

This page was last modified on 1 August 2012, at 04:39.
66 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.