views:

172

answers:

1

The following pertains to the RIM BlackBerry API.

If your app has a memory resident portion and, optionally, a UI portion, and the user downloads an update OTA, the system will, correctly, tell the user that a device reboot is needed in order to fully install the application.

The user then has the option to say "no thanks, I'll restart later when it's more convenient for me".

At this point, the app running is still the older version, and will remain so until a reboot, which can occur hours or days later.

The question is, if the app is of the design where, if a new version is available, it's not "healthy" for the old version to be running (for example, in a situation where the data exchange format has changed between the client/server portion of the app), how do you programatically determine if the device is in this "reboot pending" state so that when the user attempts to continue to use the older version of the software, you can display a warning to the effect that a reboot is still required, and disallow further use of the old version until the reboot takes effect.

It would be preferable if the solution, if one exists, is RIM OS 4.1+, but it would be understandable if there's a new API call somewhere in RIM 4.5+ that I'm not aware of.

+2  A: 

Hi Andrey, as far as I know there is no way to check if the device is in a "reboot-pending" state. But you can use the MODULE_FLAG_DELETE Flag to check if the module is scheduled for a deletion. The Reboot does nothing else than to delete the old module and insert the new one.

Good Luck, rAyt

Henrik P. Hessel
hi andrey, did it work?!
Henrik P. Hessel