Question

I want to disable the back action key when my smart extension is in Power Save Mode, that means the display is dimmed after several seconds but the control extension remains on. When it is not in Power Save Mode the back action key should work again.

I tried to figure out how to check the current POWER SAVE MODE, but couldn't manage it. When the control switches to Power Save Mode LogCat says:

onReceive: com.sonyericsson.extras.aef.control.ACTIVE_POWER_SAVE_MODE_STATUS_CHANGED

The API also says that there are following allowed values: ACTIVE_POWER_SAVE_MODE_OFF and ACTIVE_POWER_SAVE_MODE_ON

Does anyone know how to check the current Power Save Mode state?

I would then check the current display state in onKey()-method and decide whether back action key should react or not.

Many thanks in advance.

Was it helpful?

Solution

The way I would suggest to achieve what are you trying to do is to register to listen for the CONTROL_ACTIVE_POWER_SAVE_MODE_STATUS_CHANGED_INTENT. When you receive that it will tell you the current status of the active power save mode. Save this to a member variable in your extension and check that to disable/enable the back key.

http://developer.sonymobile.com/reference/sony-addon-sdk/com/sonyericsson/extras/liveware/aef/control/Control.Intents#CONTROL_ACTIVE_POWER_SAVE_MODE_STATUS_CHANGED_INTENT

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top