BlackBerryForums.com : Your Number One BlackBerry Community
     

»Sponsored Links


BlackBerryApps.com Best Sellers



Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
deepakjain Offline
Knows Where the Search Button Is
 
Posts: 17
Join Date: Jun 2009
Model: 8310
PIN: N/A
Carrier: Airtel
Default how to Delete persistenceStore - 08-18-2009, 05:17 AM

Hi all,

I am new to Blackberry development. I am using persistenceStore and persistenceObject for storing my data through a HashMap. How do i delete the persistence store while deleting the app. How and when do I invoke the PersistentStore.destroyPersistentObject(). Read that this method would delete the object. Can anyone help with sample code?
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
hrbuckley Offline
CrackBerry Addict
 
Posts: 826
Join Date: Jan 2006
Model: 9000
OS: 4.6.0.303
Carrier: Rogers CA
Default 08-18-2009, 11:04 AM

A persistent store is deleted from the device when the last application using it is removed, or when the structure of the store as coded in an application is different from the structure of the store on the device.

Other than that, you may destroy your store when ever it makes sense for the operation of your program.


BPS/Zarafa
   
Reply With Quote
  (#3 (permalink)) Old
deepakjain Offline
Knows Where the Search Button Is
 
Posts: 17
Join Date: Jun 2009
Model: 8310
PIN: N/A
Carrier: Airtel
Default 08-19-2009, 08:50 AM

I am storing the data as string and when i delete the application from the device. After i install the application again if find the persistance store still exists.
   
Reply With Quote
  (#4 (permalink)) Old
hrbuckley Offline
CrackBerry Addict
 
Posts: 826
Join Date: Jan 2006
Model: 9000
OS: 4.6.0.303
Carrier: Rogers CA
Default 08-19-2009, 09:10 AM

This KB article has the specifics, and links to other documents. Maybe you can find your answer there: Livelink - Redirection


BPS/Zarafa
   
Reply With Quote
  (#5 (permalink)) Old
ptys Offline
Knows Where the Search Button Is
 
Posts: 26
Join Date: Jul 2008
Model: none
PIN: N/A
Carrier: none
Default 08-21-2009, 08:28 PM

Store it in a Persistable object whose class is defined in your application. So, for example, instead of storing it in a Hashtable, store in MyHashtable like this

Quote:
public class MyHashtable extends java.util.Hashtable implements Persistable {
}
This way when your application is uninstalled, the persistent entry created with your class will be removed as well.

Quote:
Originally Posted by deepakjain View Post
I am storing the data as string and when i delete the application from the device. After i install the application again if find the persistance store still exists.
   
Reply With Quote
  (#6 (permalink)) Old
doni49 Offline
Thumbs Must Hurt
 
Posts: 82
Join Date: Aug 2009
Model: Tour
PIN: N/A
Carrier: Verizon
Default Properties/Methods of Parent class not available in the child? - 10-21-2009, 07:31 PM

Sorry every one--don't know how that happened. I thought I was in a new thread.


Don

Handspring Visor -> Handspring Visor Deluxe -> Palm Treo 650 on VZW -> Palm Treo 700p on VZW -> Blackberry Tour 9360 on VZW

Last edited by doni49 : 10-21-2009 at 07:33 PM.
   
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright © 2004-2009 BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.