This page was last modified 14:00, 22 February 2008.
KIS000831 - Querying Keypad status using GetIndicatorPayload() does not work with custom screensaver
From Forum Nokia Wiki
| ID | KIS000831 | Creation date | February 22, 2008 |
| Platform | S60 2nd Edition, S60 3rd Edition, and S60 3rd Edition, FP1 | Tested on devices | All S60 2nd Edition, S60 3rd Edition, and S60 3rd Edition, FP1 devices |
| Category | Symbian C++ | Subcategory | Customization, Screensavers |
| APIs | Classes | ||
| Methods |
Overview
MScreensaverPluginHost::GetIndicatorPayload(TScreensaverIndicatorIndex aIndex, TIndicatorPayload & aResult); with EScreensaverIndicatorIndexKeyGuardState as the first parameter always returns a non-zero value irrespective of the keypad status.
Detailed 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();
}
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 5500 keypad issue | xryst | General Discussion | 2 | 2007-01-16 19:37 |
| 6630 contacts question | lencuff | General Discussion | 3 | 2007-02-22 20:48 |
| Detecting Keypad Layout and Screen Layout | chonada | Symbian User Interface | 1 | 2008-02-01 03:13 |
| custom buttons on the idle screen of nokia 6680 | algiz | General Symbian C++ | 0 | 2006-07-13 10:56 |
| Nokia 5300 - Keypad lock on slider close? | maleadt | General Discussion | 0 | 2008-01-06 15:24 |

