Bixby Developer Center

References

unlock

optional

Pauses execution if device is locked and informs users they need to unlock their device to continue.

You can allow certain actions to be inaccessible while the device is locked and inform the user to unlock their phone by using this unlock key.

Note

In order to execute any actions while the phone is in the locked state, the proper permissions must be set in the capsule.bxb file.

Examples

Using action validation:

  collect {
input (input) {
type (InputStruct)
min (Required) max (One)
validate {
unlock {
dialog("Unlock your phone!") // Optional, if not specified a default dialog is shown.
}
}
}
}

Catching the error at the output level:

  output (Output) {
throws {
error (LockedState) {
on-catch {
unlock {
dialog("Unlock your phone!") // Optional, if not specified a default dialog is shown.
}
}
}
}
}

Child Keys

dialog
optional
Dialog used to inform the user that the device needs to be unlocked