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.
    boolean userOverride = false;
  2. Invoke killHandheld().
    KillHandheldResult killHandheldResult=coreWebService.killHandheld(deviceID, delayTime, userOverride);
  3. Check the result for errors and handle any errors.
    if (killHandheldResult.getKillHandheldReturnStatus().getCode() != KillHandheldReturnStatusEnumType.SUCCESS) 
        System.out.println("Error occured: " + killHandheldResult.getKillHandheldReturnStatus().getMessage());
  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.