03-02-2011 08:10 AM - edited 03-02-2011 08:13 AM
Hi, is there a way to programatically delete an application from the device? For e.g. when a trial period expires. I can do a System.exit(0). But I want the application removed from the device in some way. Is this possible?
Thanks.
David
03-02-2011 08:14 AM
03-02-2011 08:17 AM
Thanks Simon I'll have a look.
03-02-2011 08:38 AM
Thanks, that was of great help. Just a question,
int handle = CodeModuleManager.getModuleHandle("test_module");
Does the getModuleHandle() take the Application Name as a parameter?
In Short can I do something like,
int handle = CodeModuleManager.getModuleHandle("MyApplication") ;?
thanks,
David
03-02-2011 04:18 PM - edited 03-02-2011 04:19 PM
It will take the name of your module which is usually the name of your .jad file. I don't think there is a way you could give it the name of your application and have it return a handle.
03-02-2011 09:45 PM
You should provide either the RIM-COD-Module-Name or MIDlet-Name from your jad file. They should be the same, but if different, try them both to see which one works.
05-01-2012 09:51 PM - edited 05-01-2012 09:52 PM
Invoke deleteModuleEx(int, Boolean) and provide the following parameters:
int - the handle of the module to delete
Boolean - a Boolean value to specify whether to delete the module and any data it contains, or to delete the module only if it does not have data associated with it
int handle = CodeModuleManager.getModuleHandle("test_module");
if( handle != 0 )
{
Boolean success = CodeModuleManager.deleteModule( handle, true );
}