Problem with uninstalling via SW Installer UI client

Login to reply to this topic.
Thu, 2008-01-03 16:56
Joined: 2005-07-20
Forum posts: 4

Anyone have experience with "Uninstall" using SwiUI::RSWInstLauncher? For all my tests, the Uninstall method returns -1 for what I believe are valid parameters. Here's a summary of the code, and what I'm trying to accomplish:

...
RApaLsSession apa;
apa.Connect();
TInt status = apa.GetAllApps();
if (status == KErrNone)
{
TApaAppInfo aInfo;
while (status == KErrNone)
{
status = apa.GetNextApp(aInfo);
if (status == KErrNone)
{
if (appname.Compare(aInfo.iCaption) == 0)
{
SwiUI::RSWInstLauncher iLauncher;
int error = iLauncher.Connect();

error = iLauncher.Uninstall(aInfo.iUid,SwiUI::KJavaMIMEType);
if (error != KErrNone)
logger.WriteFormat(_L("Failed to KJavaMIMEType: %d"), error);

iLauncher.Close();
break;
}
}
}
}
...

It's also worth noting that I've tried every possible MME type available in SwiUI, and in all cases it returns the same result "-1". For some of the MIME types, it displays something like "Remove failed". I'm assuming that's because the MIME type was wrong, although it's curious that it only complained for 2 of the types for a test application that is actually a JAVA application.

Any insight would be appreciated.

Tim


Thu, 2008-01-03 20:17
Joined: 2004-09-14
Forum posts: 140
Re: Problem with uninstalling via SW Installer UI client

The insight would involve reading the documentation
The UID in question is "uid of the installed package" not the application UID.
The package UID is the one at the top of the .pkg file.
Sorry, but unless you are a partner you are going to battle to find any API's to get the package ID from the sis regsistry.


Paul Todd

Thu, 2008-01-03 21:26
Joined: 2005-07-20
Forum posts: 4
Re: Problem with uninstalling via SW Installer UI client


That is interesting.

The application was installed via JAD/JAR and not a SIS/SISX. Thought that for this reason that the Application UID would be the same.

Thu, 2008-02-14 20:10
Joined: 2005-07-20
Forum posts: 4
Re: Problem with uninstalling via SW Installer UI client

For future reference, Nokia has published the information (Feb 8, 2008) that answers this exact question (Installing and Uninstalling MIDlets programmatically).

Here's a link the information, which includes sample code:

http://wiki.forum.nokia.com/index.php/CS000817_-_Installing_and_uninstalling_MIDlets_programmatically

  • Login to reply to this topic.