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. Thanks for all your past and future contributions.

ScreenSaver plug-in example for S60 3rd Edition

From Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: kiranmudiyam (13 Feb 2008)
Last edited: hamishwillee (30 May 2013)

This ScreenSaver plug-in example demonstrates the usage of the ScreensaverPlugin API (screensaverplugin.h) to implement an own, customized utility screen saver on top of the default S60 screen saver. The basic functionality of the screen saver can be similar to the default screen saver but the appearance of the activated screen saver can be customized.


Features of Screensaver

The default screen saver is designed so that it is easily expandable with user plug-ins. The same screen saver engine can support multiple different plug-ins. This allows the user to create many different-looking screen saver plug-ins and the used plug-in can be changed in the Themes application.

This example draws a screen saver that contains a digital clock, color-changing status indicator, missed calls indicator(s), new message indicator(s), keylock indicator, and used profile indicator.

Usually the status indicator is green, but if messages or calls have arrived, the indicator turns red. On the left of the status indicator there are indicators for missed calls. There will be as many device symbols as there are missed calls in a row. On the right of the status indicator there are indicators for new messages and they operate in the same way as missed calls indicators. The keylock symbol appears on top of the status indicator. On top of all there is the used profile indicator, which is visible if the device's current profile is other than General.

In 3.0 devices to set customized screensaver, Open themes->Options->Edit->Power Saver

In 3.1 devices to set customized screensaver, Open Settings->General->Personalisation->Themes->Power Saver

How to create screensaver

MScreensaverPlugin: A base class that each screen saver plug-in must inherit and implement. It provides, for example, the InitializeL, Draw, and HandleScreensaverEventL methods. Steps to be followed to create screensaver is explained here

Known Issues

It is not possible to get the keylock indicator to work using GetIndicatorPayload (EScreensaverIndicatorIndexKeyGuardState, result) of the screensaverpugin API. Instead, the keylock status is queried with the RAknKeyLock method.

This screensaver plug-in example has few known issues in 3rd Edition devices:

Setting a custom screen saver as the active one does not work on some early firmware versions of certain S60 3rd Edition devices. See KI Custom screensaver cannot be set as active on Symbian

The default screen saver is activated instead of a correctly implemented custom screen saver if the keypad of the device is unlocked after the first screen saver activation.See KI Archived:Custom screen saver is not activated again after keypad has been unlocked (Known Issue)

Example Application

This application works in both 3.0 and 3.1 devices and requires following Capabilities:

NetworkServices LocalServices Location ReadUserData WriteUserData ReadDeviceData WriteDeviceData SwEvent UserEnvironment PowerMgmt

This page was last modified on 30 May 2013, at 04:40.
60 page views in the last 30 days.