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
.
-
Invoke setDevicePassword().
setDevicePassword request = new setDevicePasswordRequest();
request.deviceId = deviceID;
request.devicePassword = password;
setDevicePasswordResponse response = coreWebService.setDevicePassword(request);
setDevicePasswordResult result = response.returnValue;
-
Check the result for errors and handle any errors.
if (result.setDevicePasswordReturnStatus.code != SetDevicePasswordReturnStatusEnumType.SUCCESS)
{
// handle any errors
}
Was this information helpful? Send us your comments.