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
Posts: 27
Registered: ‎11-18-2008
My Device: Not Specified
Accepted Solution

RuntimeStore Phone Reset

Hello,

 

I am currently developing a blackberry application for multiple devices. As such I have three releases to date one using v4.0.2 of the JDE, another using 4.2.1, and finally another using 4.6.0. Now I am receiving comments back to me that when users power off their Bold handhelds the next time they power on my application menu itemsI have added are not there and they need to run my application again to populate the menu items. I have not been able to recreate this behaviour on earlier devices like the 8830,8310 and 7520. So my question is what constitues a reset in the Bold? I am assuming that the device must be experiencing a reset which then clears the RuntimeStore where I place a key value pair to determine if my menu items have already been populated.

 

If this is expected behaviour on simply a shutdown, then I assume I must go forward using the PersistentStore approach. If so, when or how does the PersistentStore get cleared? Thinking further down the road if a client removes my app will this key/value pair persist inperpituity?

 

Thanks to any who can shed some light.

Highlighted
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: RuntimeStore Phone Reset

PersistentStore would be cleared of your data when your aopplication is removed.

 

Why don't you set up an alternate entry point and install the menu items on startup?

 

Developer
Posts: 27
Registered: ‎11-18-2008
My Device: Not Specified

Re: RuntimeStore Phone Reset

Hi Rex,

 

Looks like once again you have bailed me out of the fire. Thanks for the answer regarding the PersistentStore behaviour. Also, I am not too sure why I didn't add an alternate entry point to add the menu items on startup. I guess this would solve the issue on each reboot anyways, because the background thread would run each time the phone is rebooted, correct? Of course I will still need to check the store to make sure the menu items arent there already ... in the case of the phone not dropping them on a reboot, since it doesn't appear to happen everytime. I will try this approach and see if it corrects the issue at hand.

 

 

Thanks

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: RuntimeStore Phone Reset

[ Edited ]

Setting up an alternate entry point isn't the same as having a backgorund thread.

 

You create a 2nd project and click the property "alternate entry point". Then you add the arg that will be passed when your main() (something like 'gui')

 

So, what happens is your main gets called twice, once during startup and the again the first time your app icon is clicked on by the user.

 

So, you add your menu items on intitial startup, then you enter the event dispatcher and push your screens on the "gui" entry.

 

There is an example is in the developers guide.

Message Edited by RexDoug on 12-06-2008 02:57 PM