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
Trusted Contributor
Posts: 145
Registered: ‎05-01-2011
My Device: 9780
My Carrier: Developer

How can I delete the reference files when my app get deleted

Hello All,

  

                I have my application installed in device and for some purpose I've stored data in a file and stored that file in the device/home/user/documents folder, If the user delete the app all that is I want to delete that stored file along with the app.

 

How can i do that?

 

Thanks in advance,

Karthi

Trusted Contributor
Posts: 145
Registered: ‎05-01-2011
My Device: 9780
My Carrier: Developer

Re: How can I delete the reference files when my app get deleted

Anyone help me

Developer
Posts: 404
Registered: ‎05-31-2011
My Device: curve
My Carrier: devel

Re: How can I delete the reference files when my app get deleted

Trusted Contributor
Posts: 145
Registered: ‎05-01-2011
My Device: 9780
My Carrier: Developer

Re: How can I delete the reference files when my app get deleted

Hi

 

Am doin good thank you...

 

I can't understand the link could you please explain me in detail on how to delete a single file which is stored in device memory.

Highlighted
Developer
Posts: 404
Registered: ‎05-31-2011
My Device: curve
My Carrier: devel

Re: How can I delete the reference files when my app get deleted

you must create a thread running in the background this thread must listing to CodeModuleListener to detect the delete action, and if it detects the main application is deleted, it delete the file, then delete itself  using CodeModuleManager.deleteModuleEx

Developer
Posts: 404
Registered: ‎05-31-2011
My Device: curve
My Carrier: devel

Re: How can I delete the reference files when my app get deleted

to delete a single file use this code:

FileConnection fconn = (FileConnection) Connector.open(SETTINGS_FILENAME, Connector.READ_WRITE);
if (fconn.exists()) {
fconn.delete();
}
fconn.close();}

 

Trusted Contributor
Posts: 145
Registered: ‎05-01-2011
My Device: 9780
My Carrier: Developer

Re: How can I delete the reference files when my app get deleted

I am developing for Blackberry 4.5 where there is no codemodulelistener class?

Trusted Contributor
Posts: 145
Registered: ‎05-01-2011
My Device: 9780
My Carrier: Developer

Re: How can I delete the reference files when my app get deleted

How can I detect the app deletion in JDE4.5?

Trusted Contributor
Posts: 145
Registered: ‎05-01-2011
My Device: 9780
My Carrier: Developer

Re: How can I delete the reference files when my app get deleted

Anyone please help me?

Trusted Contributor
Posts: 145
Registered: ‎05-01-2011
My Device: 9780
My Carrier: Developer

Re: How can I delete the reference files when my app get deleted

Anyone??