×
Namespaces

Variants
Actions

Power saving mode with Symbian^3

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: symbianyucca (21 Dec 2010)
Last edited: hamishwillee (30 May 2013)

Power saving mode (PSM) was introduced with Symbian^3. With it some processes in the device can go to more power saving mode according to their own logic.

When PSM is enabled it following system resources are disabled in order to save battery:

  • Bluetooth,
  • WLAN Scanning (WLAN connections still take place),
  • Display settings (clock and screensaver)
  • Tactile feedback,
  • Vibration,
  • 3G->2G,
  • Keypad tones
  • Audio feedback

Additionally any other process could also take account of PSM and save power when PSM is enabled.

PSM can be manually enabled/disabled in two ways:

  • From the menu shown when the off-button in pressed, and
  • From the pop-up that comes when clicking the battery icon on the home screen.

PSM mode can also be controlled with CPsmClient client API. This API is not part of the public SDK, but can be found in Symbian's open source.

Monitoring of PSM can be handled by constructing the CPsmClient and then calling RequestPowerSaveModeNotification(). Note that the function works in a one-shot mode, thus after an error notification or notification of changed status, it needs to be called again.

iPsmClient = CPsmClient::NewL( *this );
iPsmClient->RequestPowerSaveModeNotification();

Current PSM can also be checked with PsmSettings() function as illustrated in the following code snippet:

TInt err( iPsmClient->PsmSettings().GetCurrentMode( iActivePsm ) );
 
if ( err == KErrNone )
{
switch( iActivePsm )
{
case EPsmsrvModeNormal:
{
LogEventL(_L("Currentmode: ModeNormal"));
break;
}
case EPsmsrvModePowerSave:
{
LogEventL(_L("Currentmode: ModePowerSave"));
break;
}
case EPsmsrvPartialMode:
{
LogEventL(_L("Currentmode: PartialMode"));
break;
}
};
}

PSM can be changed with ChangePowerSaveMode() function call, and once using it, remember to cancel the monitoring with the CancelPowerSaveModeNotificationRequest() function call.

A full example of using PSM can be found from: My PowerMode.zip

Also additional method using central repository for monitoring PSM can be found from: My PowerMode Rep.zip

This second example would only require central repository API, thus even though the central repository would not be available on pre-Symbian^3 devices, the code would be safe to use, as long as the KErrNotFound error would be handled. Whereas the first example required static linking to a library which might not be available in pre-Symbian^3 devices.

This page was last modified on 30 May 2013, at 04:35.
48 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.

×