navigator_get_device_lock_state()

Query the navigator to determine the lock state.

Synopsis:

#include <bps/navigator.h>
 
BPS_API int navigator_get_device_lock_state(void)

Since:

BlackBerry 10.0.0

Arguments:

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

An application can call this function to determine if the device is currently NAVIGATOR_DEVICE_LOCK_STATE_UNLOCKED, NAVIGATOR_DEVICE_LOCK_STATE_SCREEN_LOCKED, or NAVIGATOR_DEVICE_LOCK_STATE_PASSWORD_LOCKED. An application can also monitor NAVIGATOR_DEVICE_LOCK_STATE events.

Returns:

On success, one of NAVIGATOR_DEVICE_LOCK_STATE_UNLOCKED, NAVIGATOR_DEVICE_LOCK_STATE_SCREEN_LOCKED, or NAVIGATOR_DEVICE_LOCK_STATE_PASSWORD_LOCKED. Otherwise, return BPS_FAILURE with errno set.