Languages

Menu
Sites
Language
[ANSWERED] Event for monitoring device wake up?

Platform: Tizen 2.3.2, Gear S3.

I need to refresh my screen immediately when a device is waken up (either by gesture, by pressing the power button, turning the rotary ring, etc) to ensure that the user see the latest update when the screen is turned on.

Which event should I monitor? Preferably an event attached to an Evas_Object rather than an Ecore event, if possible.

Thank you.

Edited by: James B on 16 Feb, 2017
View Selected Answer

Responses

2 Replies
Mark as answer
Onur Şahin

 

 

/**
 * @brief Enumeration for the device state callback.
 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
 */
typedef enum
{
    DEVICE_CALLBACK_BATTERY_CAPACITY,    /**< Called when a battery charge percentage is changed */
    DEVICE_CALLBACK_BATTERY_LEVEL,       /**< Called when a battery level is changed */
    DEVICE_CALLBACK_BATTERY_CHARGING,    /**< Called when battery charging state is changed */
         DEVICE_CALLBACK_DISPLAY_STATE,       /**< Called when a display state is changed */
    DEVICE_CALLBACK_MAX
} device_callback_e;

/**
 * @brief Adds a callback to the observing device state.
 *
 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
 *
 * @param[in] type          The device type to monitor
 * @param[in] callback      The callback function to add
 * @param[in] user_data     The user data to be passed to the callback function
 *
 * @return @c 0 on success,
 *         otherwise a negative error value
 *
 * @retval #DEVICE_ERROR_NONE                   Successful
 * @retval #DEVICE_ERROR_INVALID_PARAMETER      Invalid parameter
 * @retval #DEVICE_ERROR_ALREADY_IN_PROGRESS    Operation already
 * @retval #DEVICE_ERROR_OPERATION_FAILED       Operation failed
 */
int device_add_callback(device_callback_e type, device_changed_cb callback, void *user_data);

 

James B

Thank you - this is just what I need.