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

Native Development

Reply
Regular Contributor
Posts: 75
Registered: ‎11-30-2012
My Device: curve
My Carrier: airtel

Upgrading an app

I want to upgrade my app.I have few settings that need to remain intact, when I upgrade.

Are there any APIs to delete an app and keep its settings?

 

-thanks

 

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Upgrading an app

[ Edited ]

There are a few ways of keeping persistant storage past an upgrade, and settings (QSettings), sql files, etc. are some of these. A standard upgrade does not delete the app just replaces the non-persistant parts, i.e executable, assets, etc..

 

If a user deletes the app first though all this is lost. If you want to keep settings in this scenario then some kind of export/import or backup/restore app feature would need to be written.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Regular Contributor
Posts: 75
Registered: ‎11-30-2012
My Device: curve
My Carrier: airtel

Re: Upgrading an app

Thanks for the reply.

 

Are there any APIs for handling uninstalltion of App programatically.?

 

-thanks

 

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Upgrading an app

[ Edited ]

Not specifically to do with this as I'm aware and to be honest it would be very risky for you to implement your own as you'd have to stay in lock step with OS changes.  Even if you could get deep enough into the security that your app is allowed to remove from secured areas any security changes or hidden files placed elsewhere in the file structure in future OS's subsequently added by BlackBerry would likely leave your implementation broken.

 

So unless you are writing a 'Removal/Clean up app' then my advice is to leave it well alone.

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Highlighted
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Upgrading an app

Btw, if you store the settings in shared folder I believe they will be preserved even when user deletes the app. They can also be accessed by other apps there.

Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Upgrading an app

Zmey is correct. Files in the shared are are not removed when the generating app is deleted.