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

Web and WebWorks Development

Reply
New Contributor
GaborP
Posts: 9
Registered: ‎07-29-2012
My Device: Torch 9800

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: 165
Registered: ‎09-24-2012
My Device: Passport

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 Device: Torch 9800

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: 165
Registered: ‎09-24-2012
My Device: Passport

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 Device: Torch 9800

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.
New Contributor
nabeelkc
Posts: 7
Registered: ‎09-10-2013
My Device: Blackberry 6 Torch 9800

Re: Delete database in Blackberry Torch - Phonegap

Hi,

 

 

I also have an issue like this.

I have set the language as local storage in the device and it works fine.

But after uninstalling, restarting and then again installing, the local storage is not getting cleared. The value still persists there. 

Could any one find out a solution for this issue??

 

Thanks in advance..

 

 

Thanks..

Nabeel

Please use plain text.