Active Low Power

The SmartWatch 2 includes a feature that enables user interaction and always-on-visibility for your app, while saving power by having the backlight turned off on an accessory. Your app will still be fully visible on the SmartWatch 2 screen, and it will still listen and respond to interactions such as taps.

The basics

To utilize the full potential of the Active Low Power mode, follow the steps below:

  1. Register your app to use Active Low Power Mode.  This registration is what actually causes your app to go into low power mode when the screen times out instead of going to the watch face screen.
  2. Adapt your layout code to support a different layout for low power mode if necessary.
  3. If you choose, you can also manually enable or disable low power mode programmatically.

Register your app

In order for your app to use the Active Low Power Mode, you are required to override the supportLowPowerMode()method in your HelloActiveLowPowerRegistrationInformation class:

@Override public boolean supportsLowPowerMode() { return true; }

Adapt an app to support Active Low Power mode

When the SmartWatch 2 is running in low power mode, the screen only displays content in four grayscale colors. We highly recommend that apps provide a layout or drawable with elements containing high contrast colors when being run in low power mode.

When the SmartWatch 2 switches power mode, for example when switching the backlight on or off, while your app is running, you will receive anonActiveLowPowerModeChange() callback. Typically this callback is used as a trigger for your app to adapt to the new mode.

@Override public void onActiveLowPowerModeChange(boolean lowPowerModeOn) {
    if (lowPowerModeOn) {
        // Adapt your app layout when the Low Power Mode is
        // enabled
    } else {
        // Adapt your app layout to the Low Power Mode is
        // disabled
    }
}

Programmatically enable and disable Active Low Power Mode

You can control the Active Low Power mode by using:

ControlExtension.setScreenState()

To enable Active Low Power Mode, which switches off the SmartWatch 2 backlight, use:
setScreenState(Control.Intents.SCREEN_STATE_OFF)

To disable Active Low Power Mode, use:
setScreenState(Control.Intents.SCREEN_STATE_AUTO)

Handle timed out Low Power mode

You will receive an onActiveLowPowerModeChange() when the screen switches to Low Power Mode through a timeout, for example when there has been no user interaction with the screen after a period of time. In this state, any user interaction will turn the backlight on. This automatically sets the screen to SCREEN_STATE_AUTO.

Test your Active Low Power Mode app

Testing your app’s usage of this functionality can only be done towards the hardware accessory. The Accessory Emulator does not provide any support for it. After you’ve installed your app on your mobile device, you will be able to find your app in the SmartWatch 2 app drawer. Tap your app in the app drawer to launch your app and test the functionality.

Active Low Power Mode code example

For an example of how to use Low Power mode in your development, refer to the HelloActiveLowPower sample project in the /samples folder of the Sony Add-on SDK. Specifically look at the HelloActiveLowPowerRegistrationInformation class, which contains the required implementation for enabling your app to use the Active Low Power Mode.