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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
New Contributor
GaborP
Posts: 9
Registered: ‎07-29-2012
My Carrier: none

Delete database in Blackberry Torch - Phonegap

[ Edited ]

I am building cross platform applications using Phonegap. Additionally I use Lawnchair to store data in the local database.

My question is quite general. I install an application that I built for iPhone, Android and Blackberry, then create some items to store in the database. This is done without any problem on any platform, however I would like to delete the whole database so I delete the application and reinstall it. On iPhone and Android the database is cleared automatically, however on Blackberry the items are still stored in the database.

I know that I could use localStorage.clear() in my javascript code, however I need to achieve clearing the database without modifying my application.

So why is the database not deleted when I uninstall a Blackberry application?

Please use plain text.
BlackBerry Development Advisor
anzor_b
Posts: 99
Registered: ‎09-24-2012
My Carrier: Bell

Re: Delete database in Blackberry Torch - Phonegap

In my experience, Java devices (BlackBerry 6,7) will require a reboot to clean up after the application. I have tested local storage on BB10 and PlayBook and the data gets deleted when uninstalling the app. Have you tried a reboot?

Please use plain text.
New Contributor
GaborP
Posts: 9
Registered: ‎07-29-2012
My Carrier: none

Re: Delete database in Blackberry Torch - Phonegap

Yes when I delete an app it asks for a reboot so I do it. Then when I install the app again the DB is still there.

Please use plain text.
BlackBerry Development Advisor
anzor_b
Posts: 99
Registered: ‎09-24-2012
My Carrier: Bell

Re: Delete database in Blackberry Torch - Phonegap

Please provide me with the following information for further testing:

 

1. Device Model and OS version.

2. WebWorks SDK version.

Please use plain text.
New Contributor
GaborP
Posts: 9
Registered: ‎07-29-2012
My Carrier: none

Re: Delete database in Blackberry Torch - Phonegap

I am using BB Tourch 9800 and OS 6.

 

Also I am not using webworks at all, I build my application with javascript and HTML, zip them together and upload it to phonegap build which build a BB app for me.

Please use plain text.