Languages

Menu
Sites
Language
How to lock the display in a Dali application?

According to the API reference for Tizen wearable 3.0 it is deprecated to use device_power_request_lock to lock the display. Instead it is recommended to use efl_util_set_window_screen_mode. However, this function requires an Evas_Object and our app is developed using the Dali C++ classes. How can we lock the display without an Evas_Object? Or is there an Evas_Object somewhere behind the Dali scene? Or even better, is there an option for locking the display somewhere in Dali. Any help would be appreciated!

Best regards, Stian

Responses

3 Replies
K Johnson

One idea to implement this can be following Lockscreen sample app from tizen studio. Though it's done using EFL, you may go through the way it's implementation is done and find corresponding APIs for DALi.

Stian Andre Olsen

Thanks!

I can't find the Lockscreen sample among the native samples for wearable 3.0. However, since you mention that it is using EFL I suspect that it uses the recommended efl_util_set_window_screen_mode. The problem is that the required Evas_Object is not available in Dali, as far as I know.

After my first post I have found the perfect function inside Dali, but it is not available in Tizen 3.0:

https://developer.tizen.org/development/api-references/native-application?redirect=https://developer.tizen.org/dev-guide/4.0.0/org.tizen.native.wearable.apireference/classDali_1_1Window.html#a2226716981ec10720dc0afe9129fdf7d

For now, I am using the deprecated device_power_request_lock and it seems to work ok. My guess is that I have to use this function until Tizen 4.0 comes along.

Best regards, Stian

K Johnson

According to your referred link, it seems so.