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

Reply
Developer
SamuelD
Posts: 166
Registered: ‎01-14-2009
My Device: Curve 8330
Accepted Solution

Manually install no reboot required

Hello,

I'm manually installing a library package that contain some bitmaps. I'm able to download and install the cod file but when I save the new module, the method isResetRequired() method return false.

 

Next I start the application but no images are shown. Images are obtained with Bitmap.getBitmapResource(module, name);

 

I tried to force the reset of the device with :

 

int timeDelay = 1000 * delay;
ApplicationManager myMgr = ApplicationManager.getApplicationManager();
ApplicationDescriptor myDsc = ApplicationDescriptor.currentApplicationDescriptor(); 

Date myDate = new Date();

myMgr.scheduleApplication(myDsc, myDate.getTime()+timeDelay, true);
Device.requestPowerOff(true);

 

But it doesn't seem to work on simulator. If I restart (Shift + ALT + DEL) the device (real one) the images appears without any problem.

 

I'm using OS 4.5 with a Curve 8330.

 

Thank you, have a nice day.

--
Samuel D.
BlackBerry Development Advisor
MSohm
Posts: 14,851
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Manually install no reboot required

Has the library been loaded before the application?  If not, a reset may be required.  Note that the library itself may not require a reset (which is why you see false) but a reset could be required for your application to link to the library (if it was already installed).

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
SamuelD
Posts: 166
Registered: ‎01-14-2009
My Device: Curve 8330

Re: Manually install no reboot required

Hi,

the application is installed on the device and after that, it look for required module. If those modules can't be found, the application will download and install it. Is there a way to link my application to the newly installed library to force a restart?

Thank you, have a nice day.

--
Samuel D.
BlackBerry Development Advisor
MSohm
Posts: 14,851
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Manually install no reboot required

There is no way for a third party application to programmatically kick off the linking process.  I think the closest you can get is to prompt the user to manually perform a hard reset to complete your install.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
SamuelD
Posts: 166
Registered: ‎01-14-2009
My Device: Curve 8330

Re: Manually install no reboot required

Ok I tought that would be the answer. For the hard reset, Is there a way to show the (Reset is require) popup? I saw some hints on the forum, but it talk about installing - running - uninstalling a dummy application. I'd love to avoid that kind of manipulation if possible.

Thank you, have a nice day.

--
Samuel D.
BlackBerry Development Advisor
MSohm
Posts: 14,851
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Manually install no reboot required

There is no direct way to show that reset prompt, unless an action taken on an individual COD file actually does require a reset (such as the workaround you describe).

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker