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

Java Development

Reply
Developer
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810
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 answerSmiley Happy. Instead, I would like my app to clean up after itself when leaving. 



"Listen carefully, I shall say this only once"
Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
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 Smiley Happy
----------------------------------------------------------
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
Developer
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810

Re: upon uninstalling also remove files ?

Thanks for the smile Smiley Wink



"Listen carefully, I shall say this only once"
BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
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.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Highlighted
Developer
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810

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"
BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
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.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810

Re: upon uninstalling also remove files ?

Thank you for the answer.

I (reluctantly) accept it Smiley Happy

 



"Listen carefully, I shall say this only once"
Developer
Posts: 558
Registered: ‎11-25-2008
My Device: Not Specified

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.....