Delete data and deactivate a BlackBerry device

If a BlackBerry® device is lost, stolen or replaced, to delete the user information and application data that the BlackBerry device stores and deactivate the BlackBerry device, you can use the killHandheld() method.
Before you begin: Retrieve the following integers:
  • deviceID integer for the ID of the BlackBerry device you want to deactivate
  • delayTime integer for the number of minutes that the BlackBerry® Administration API should wait before processing the request
  1. To prevent users from cancelling a killHandheld command, set userOverride to false.
    bool userOverride = false;
  2. Invoke killHandheld().
    killHandheld request = new killHandheld();
    request.deviceId = deviceID;
    request.delayTime = delayTime;
    request.userOverride = userOverride;
    killHandheldResponse response = coreWebService.killHandheld(request);
    killHandheldResult result = response.returnValue;
  3. Check the result for errors and handle any errors.
    if (result.killHandheldReturnStatus.code != KillHandheldReturnStatusEnumType.SUCCESS) 
    {
        // handle any errors
    }
  4. If the BlackBerry device is stolen, verify that the BlackBerry device received the command using the isKillHandheldPending() method or using the BlackBerry Administration Service.
After you finish:

Contact your organization's service provider to turn off service for a stolen BlackBerry device after you send the command to delete all BlackBerry device data and deactivate the BlackBerry device.


Was this information helpful? Send us your comments.