MozMobileConnection.unlockCardLock()

This API is available on Firefox OS for internal applications only.

Summary

The unlockCardLock method is used to unlock a card lock.

Note: If the unlockCardLock call fails the icccardlockerror event is fired.

Syntax

JavaScript
var request = navigator.mozMobileConnection.unlockCardLock(info);

Parameters

info

An object containing information to unlock the given lock. At a minimum, this object must have a lockType property which specifies the type of lock, e.g., "pin" for the PIN lock. Other properties are dependent on the lock type:

Object for unlocking the PIN:

JavaScript
{
  lockType: "pin",
  pin     : "..." // The current pin number
}

Object for unlocking the network control key (NCK) :

JavaScript
{
  lockType: "nck",
  pin     : "..." // The current pin number
}

Object for unlocking the PUK and supplying a new PIN:

JavaScript
{
  lockType: "puk",
  puk     : "...",
  newPin  : "..."
}

Return

A DOMRequest object to handle the success or error of the method call.

The request's result will be an object containing information about the operation:

The resulting object if the unlock failed:

JavaScript
{
  lockType  : "pin", // Can be "pin", "nck" or "puk"
  success   : false,
  retryCount: 2
}

The resulting object if unlock succeeded:

JavaScript
{
  lockType: "pin", // Can be "pin", "nck" or "puk"
  success : true
}

Specification

Not part of any specification.

See also

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/mozmobileconnection.unlockcardlock

API B2G Firefox OS Method Reference Référence