Skip to main content

Delete Database Automatically When Application Uninstalled

2 replies [Last post]
Joined: 2009-02-25


I wrote one application which stores the Contact number as well their personal details.. every thing working well. To run my application i am using SunWTK2.5 Default Color Phone Emulator. I run my application successfully. To store the personal information i am using Perst Lite Data base and i am using perst-jsr75.jar to store the data base in root.

Here my issue is : i would like to delete Database from the root when we Uninstall the Application

Can any one Help Me Out.....

Advance Thanks for Any suggestion or Examples

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-15

No you can't do this. There are no hooks in JavaME to detect and notify a MIDlet that you are about to delete it so that it can do some lastminute cleanup. Some devices have a uninstall notify command for the JAD file, but this only takes a URL to call the server (MIDlet-Delete-Notify). But it is only a Nokia phone thing so I've heard. (I have not used it personally).

You might see if you could set the notify up to be a SMS call back into the phone to do a pushregistry start on your midlet to tell it that it's about to be removed. But I think this JAD option requires a HTTP scheme, and would not support the SMS:// scheme. however it's worth a try.


Joined: 2008-06-18

It is a little bit confusing with crossposting ;-)

I answered on the same question in another thread while Shawn answered it here.