×
Namespaces

Variants
Actions

Archived:Querying Keypad status using GetIndicatorPayload() does not work with custom screensaver (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Tested with
Devices(s): All S60 2nd Edition, S60 3rd Edition (initial release) and FP1 devices
CompatibilityArticle
Created: User:Technical writer 1 (22 Feb 2008)
Last edited: hamishwillee (19 Jun 2012)

Contents

Overview

MScreensaverPluginHost::GetIndicatorPayload(TScreensaverIndicatorIndex aIndex, TIndicatorPayload & aResult); with EScreensaverIndicatorIndexKeyGuardState as the first parameter always returns a non-zero value irrespective of the keypad status.

Description

To create a customized screensaver, MScreensaverPluginHost::GetIndicatorPayload() needs to be used to query the status of Keypad, missed calls, new messages, active profile, etc. Using this API for querying the keypad status does not work in any of the S60 2nd Edition, S60 3rd Edition, and S60 3rd Edition, FP1 devices.


How to reproduce

 TIndicatorPayload result;
TInt status = MScreensaverPluginHost::GetIndicatorPayload (
EScreensaverIndicatorIndexKeyGuardState, result );
 
// If result is other than '0', keylock is activated
if (status == KErrNone && result.iInteger != 0)
{
// Draw key symbol
}

Solution

A workaround is to query the keylock status with the RAknKeyLock method.

 RAknKeyLock keyLock;
if (keyLock.Connect() == KErrNone)
{
TBool locked = keyLock.IsKeyLockEnabled();
if (locked)
{
// Draw key symbol
}
keyLock.Close();
}
This page was last modified on 19 June 2012, at 11:00.
54 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.

×