Languages

Menu
Sites
Language
Detecting when device screen has powered down or gone to lock screen

Does anyone know how to detect when a device's screen has powered down or gone to the lock screen?

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

4 Replies
Raghu Kona
Hi Jezra, You can check Tizen Device API: Power in tizen documentation https://developer.tizen.org/documentation/dev-guide. You can try using void request(PowerStateRequest request, optional SuccessCallback? successCallback, optional ErrorCallback? errorCallback, optional PowerStateChangeCallback? listener);
jezra
I've already checked the Power API. The 'request' method makes a request to set the brightness of the screen, and part of that method is an optional callback for handing the powerstate change. However, I don't want to make a request to change/set the powerstate, I just want to add a listener to let my application know when the state has changed.
Aamir Ali

couldn't find the Power API on Tizen 2.4/3.0 for Web TV Applications, plus do we have any listeners that detect when Device/TV is powered ON or OFF?

Armaan-Ul- Islam

Seems Power API is available for Mobile and Wearable only. You may try Visibility Change (as mentioned on this post) to check out if it performs your desired action.