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

Java Development

Reply
Developer
myraddin
Posts: 391
Registered: ‎09-12-2008
Accepted Solution

upon uninstalling also remove files ?

Hi all.

 

My app uses files to store settings.

I would like to delete those files after a user uninstalls the application.

 

Is that possible ?

 

So I am not trying to invoke the uninstall process (because then I know the answer:smileyhappy:. Instead, I would like my app to clean up after itself when leaving. 



"Listen carefully, I shall say this only once"
Please use plain text.
Developer
simon_hain
Posts: 13,830
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: upon uninstalling also remove files ?

if you use persistant store: these files are linked to the application and get removed automatically.
if you use the file system: no clue about it :smileyhappy:
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
myraddin
Posts: 391
Registered: ‎09-12-2008

Re: upon uninstalling also remove files ?

Thanks for the smile :smileywink:



"Listen carefully, I shall say this only once"
Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
My Carrier: Bell

Re: upon uninstalling also remove files ?

For the record, here is a link to an DKB article that describes this.

 

How To - Handle stored data when removing an application
Article Number: DB-00424

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800708/800647/How_To_...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
myraddin
Posts: 391
Registered: ‎09-12-2008

Re: upon uninstalling also remove files ?

Sorry to be such a noob, but could you please elaborate? I don't see the answer in the link (which I've read previously, of course).

 

My application (during it's work) deploys 20-30 setting files to the file system. ("file:///store/home/user/someFolder").

 

Is there a way to 'register' those files so that the native uninstaller knows that that specific folder/files should be removed?

OR

Is there a way to 'listen' to an uninstall event.

 

Is there a third way ?

(My app is a background app so I could register it as a listener to global events... if that might help)



"Listen carefully, I shall say this only once"
Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
My Carrier: Bell

Re: upon uninstalling also remove files ?

This can be done if you are using persistent store.  There is no support for this if you are writing files using a FileConnection.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
myraddin
Posts: 391
Registered: ‎09-12-2008

Re: upon uninstalling also remove files ?

Thank you for the answer.

I (reluctantly) accept it :smileyhappy:

 



"Listen carefully, I shall say this only once"
Please use plain text.
Developer
webmasterpdx
Posts: 558
Registered: ‎11-25-2008

Re: upon uninstalling also remove files ?

I heard (and am looking for right now) about a way to receive an uninstall exception, so you can write your own handler to uninstall the files.

I'ts supposed to exist.....

Please use plain text.