Namespaces
Variants
Actions

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

Jump to: navigation, search
Archived.png
Archived: 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

Compatibility
Platform(s): S60 2nd Edition, S60 3rd Edition, and S60 3rd Edition, FP1

Article
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.
145 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved