Assign a password to a BlackBerry device

If a BlackBerry® device is misplaced, to assign a password to the BlackBerry device, you can use the setDevicePassword() method.
Before you begin:
Retrieve the following attributes:
  • deviceID integer for the ID of the BlackBerry device that you want to assign the password to
  • password string for the password that you want to assign to the BlackBerry device
.
  1. Invoke setDevicePassword().
    SetDevicePasswordResult result=coreWebService.setDevicePassword(deviceID, password);
  2. Check the result for errors and handle any errors.
    if (result.getSetDevicePasswordReturnStatus().getCode()!= SetDevicePasswordReturnStatusEnumType.SUCCESS) 
    {
       // handle any errors
    }

Was this information helpful? Send us your comments.