Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Soft and Hard Reset

by Developer on ‎01-26-2011 11:42 AM (23,862 Views)

Summary

This article applies to the following:

  • BlackBerry® Device Software 4.0 and later

Details

Resetting a BlackBerry device is a basic requirement as a user of any device. BlackBerry supports two types of resets, namely: soft and hard. Each reset type has got its usage and implications on the device.

 

Soft reset signifies closure and relaunch of all user processes(applications) running on the JVM®. However, JVM doesn't get rebooted in this process. Also, it resets the communication link between the device and the computer. Soft reset can be done by pressing ALT+RIGHT SHIFT(CAP)+DELETE keys.

 

Hard reset signifies closure of all processes including complete shutdown of the JVM and rebooting of JVM and all auto-start processes from start. It is not directly supported programmatically. There are however indirect ways to achieve this. Hard reset is usually achieved by removing the device battery and replacing it. It also occurs whenever there is some change in the platform settings that requires resetting of the device and the OS itself pops up reboot dialog to the user.

 

There are cases where a developer might have a requirement to reboot the device programmatically.

 

There is an API available for this: CodeModuleManager.promptForResetIfRequired():


If promptForResetIfRequired yields true, then it means the BlackBerry should be restarted to complete installation/uninstallation of a code module. As a result the user is prompted with a reboot now/reboot later options. If you select "Reboot Later", it will prompt the user 5 more times to restart the device.  After the 5th prompt the user will be forced to restart.  This reset that occurs as a result of this API is a hard reset.

 

However, The above API invokation may not always result in resetting of device. The same is caused only if certain criteria is met.

 

The following article details the criteria of what cases of application installation/uninstallation may invoke device reset: What Is - The reason a reset is required when upgrading an application

 

Users Online
Currently online: 22 members 3,122 guests
Please welcome our newest community members: