Archived:Modifying notification light settings using Symbian C++
Article Metadata
Article Metadata
Tested with
Nokia E75
Nokia 5800 XpressMusic
Nokia N8-00
Compatibility
S60 5th Edition
Symbian^3
Article
Description
This article gives an overview of modifying the notification light settings associated with E-series and 5th Edition devices.
Solution
The following code snippet is used for modifying the settings. The code snippet makes use of CRKeys. Headers
#include <blinklightinternalcrkeys.h>
Code for modifying the Blink light time
TInt value = -1;
CRepository* CRep = CRepository::NewL( KCRUidNotificationLightSettings );
TInt err = CRep->Set( KNotificationLightNotificationTime, value ) ;
value can be either -1(no limit), 5, 30, or 60 min.
Code for enabling/disabling the events to be notified The notification light feature is available for events like new message, new e-mail, and missed call. Depending on the requirement the events to be notified can be enabled/disabled.
TInt value = 1;//0 for diabling the notification
CRepository* CRep = CRepository::NewL( (KCRUidNotificationLightSettings) );
TInt err = CRep->Set( KNLBlinkForMissedCall, value ) ;
KNLBlinkForMissedCall - for missed call KNLBlinkForMessages - for messages KNLBlinkForEmail - for e-mail
Code for setting the visibility of the event The event to be notified can be made visible/hidden. The corresponding CR keys include:
KNLCCallSettingVisible - for missed call setting KNLMessageSettingVisible - for message setting KNLEmailSettingVisible - for mail setting
TInt value = 0;//1 for making the message setting visible
CRepository* CRep = CRepository::NewL( (KCRUidNotificationLightSettings) );
err = CRep->Set( KNLMessageSettingVisible, value ) ;
Code for Symbian^3 Corresponding CR keys are used to get the blinking time duration. The duration will be copied in check.
CRepository *light; TInt check; light=CRepository::NewL(KCRUidNotificationLightSettings); TInt errCode = light->Get(KNotificationLightNotificationTime,check); delete light;


(no comments yet)