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
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

Local Storage problem in Blackberry 9810 .?

Hi

I have problem in blackberry 9810 ..? actually i  am getting some data from server in starting of my app and this data i stored  in local storage while application launch .but when i delete my application and and reinstall same application .this time it  not store the data(mean it  not call web service) , it goes to else condition. i think device can't able to delete local storage..?

 

why this happen?

 

is there any function which we can call before deletion of app..?

Contributor
paroxysm
Posts: 35
Registered: ‎09-15-2012
My Device: AT&T Torch 9810

Re: Local Storage problem in Blackberry 9810 .?

There is api for clearing localStorage

I believe, localStorage.clear actually function you're looking for.

Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

Re: Local Storage problem in Blackberry 9810 .?

actually i know localstorage.clean() is function is to clean local storage. But i need to call this function on deleting ? how can i call this function while deleting the app
Developer
Nitish_Pheonix
Posts: 29
Registered: ‎09-17-2012
My Device: 9810, 9800, 9700, 9900, 9300

Re: Local Storage problem in Blackberry 9810 .?

Hii,
I think it can't be possible to delete the LocalStorage.
However you can remove the Item stored in the localstorage

here's the code:

localStorage.setItem("name", "Hello World!"); //saves to the database, key/value
document.write(localStorage.getItem("name")); //Hello World!
localStorage.removeItem("name"); //deletes the matching item from the database

 try it and check once.... may be it will help you.

Thanks & Regards,
Himansu

Thanks & Regards,
Nitish_Pheonix

Hit like if the above post is helpful to you.
Please Accept this as Solution if the above post is a solution for you.
Contributor
paroxysm
Posts: 35
Registered: ‎09-15-2012
My Device: AT&T Torch 9810

Re: Local Storage problem in Blackberry 9810 .?