Device Lock/Unlock

The BlackBerry 10 device can be locked at any point in time and this impacts your app regardless of what state it is in. You need to prepare for the event that the device becomes locked while your app is running.

Unlock/Lock from the Invisible State

When the app is in the invisible state, the BlackBerry 10 OS sends the event NAVIGATOR_DEVICE_LOCK_STATE to notify the app that the device has become locked or unlocked. The app is already in a stopped state, so there are not a lot of actions that your app needs to perform to manage this transition. Also, no window states are changed because the app is already invisible on the screen and there is no change from the app's perspective.

The following digram shows the events that are received when the app is in an invisible state and the device is locked: Diagram showing events received when the app is in an invisible state and the device is locked

Unlock/Lock from the Thumbnail State

If the device is locked while the app was in a thumbnail state, the app transitions from the thumbnail state to the invisible state and the following events are sent:

When the device is unlocked, having been locked from a thumbnail state, the app transitions from the invisible state back to the thumbnail state and receives the following events:

The following diagram shows the events that are received when the app is locked from the thumbnail state: Diagram showing events received when the app is locked from the thumbnail state

Unlock/Lock from the Full Screen State

When the device is locked with the app in the full screen state, the app transitions from the full screen state to the invisible state and the following navigator events are sent:

When the device is unlocked, having been locked from a full screen state, the app transitions from the invisible state back to the full screen state and receives the following events:

The following diagram shows the events that are received when the app is locked from full screen state: Diagram showing events received when the app is locked from full screen state

Your code needs to handle the reception of each of the above events and respond properly to each of them. For more information regarding each of these events, see Various States and BPS Navigator Events sections.