×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    73

    Uninstall s60 application

    hi all
    I want to uninstall my application programmaticly from the mobile and i used this code then made some modification to it but nothing occur
    http://wiki.forum.nokia.com/index.ph...ogrammatically
    my code
    void CreinstallContainerView::UninstallSisL()
    {
    RFs fileSession;
    CDir* dirList;
    TInt i;
    TFileName fullPath;
    TUint contextUid;
    TFileName fileName;
    _LIT(KDirName1, "c:\\system\\install\\registry\\");
    _LIT(KFileSpec1,"c:\\system\\install\\registry\\AlMosaly");

    User::LeaveIfError( fileSession.Connect() );
    CleanupClosePushL( fileSession );

    // Get the file list, sorted by name
    User::LeaveIfError( fileSession.GetDir( KFileSpec1,
    KEntryAttMaskSupported,
    ESortByName, dirList ) );
    CleanupStack::PushL(dirList);

    for ( i=0; i < dirList->Count(); i++ )
    {
    fileName = (*dirList)[i].iName;
    if( fileName.Compare(_L("Application name")) == KErrNone )
    {
    continue;
    }

    fullPath = KDirName1;
    fullPath.Append(fileName);
    RFile lFile;
    TInt err = lFile.Open( fileSession, fullPath, EFileShareAny | EFileRead );

    if(err == KErrNone)
    {
    TInt lSize;
    lFile.Size(lSize);
    RBuf8 lBuf;
    lBuf.Create(lSize);
    lBuf.CleanupClosePushL();
    lFile.Read(lBuf);//read contents into buffer
    RBuf buff;
    buff.Create(lSize);
    buff.CleanupClosePushL();
    buff.Copy(lBuf);//Copy into 16 bit buffer
    lFile.Close();
    if (err == KErrNone)
    {
    // Check for MIDlet name in the file
    err = buff.Find(_L("Application name.sis"));
    if (err != KErrNotFound)
    {
    TLex lex( fileName.Mid(0,8) );
    lex.Val( contextUid, EHex );
    SwiUI::RSWInstSilentLauncher inst;
    inst.Connect();
    SwiUI::TUninstallOptions options;
    SwiUI::TUninstallOptionsPckg optionsPckg;
    options.iKillApp = SwiUI::EPolicyAllowed;
    options.iBreakDependency = SwiUI::EPolicyAllowed;
    optionsPckg = options;
    TInt resp = inst.SilentUninstall( TUid::Uid(contextUid),
    optionsPckg,
    SwiUI::KSisMimeType );
    if(resp==1)
    { TBuf<300> c;
    c = (GetNote('%'));
    RunConfQuery1L(&c);
    }

    inst.Close();


    }
    }
    CleanupStack::PopAndDestroy(2); // buff, lBuf
    }
    }
    CleanupStack::PopAndDestroy(2); // dirList, fileSession
    }
    I added the required API,libraries,and run it in the device directly
    what is the problem ????

  2. #2
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: Uninstall s60 application

    And what errors or panics you are getting?

    I want to uninstall my application programmaticly
    ...
    Code:
    // Check for MIDlet name in the file
    err = buff.Find(_L("Application name.sis"));
    ???

    Are you sure that you are trying to delete MIDlet (J2ME) application?

  3. #3
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    73

    Re: Uninstall s60 application

    I need to uninstall .sis application not jar
    nothing occur neither error nor panic
    I modified this code to uninstall sis
    is it only for java midlet??????????????
    Last edited by Sara Ali; 2009-07-28 at 11:49.

  4. #4
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: Uninstall s60 application

    Please verify if you have added sufficient capabilities to make use of this API.

  5. #5
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    73

    Re: Uninstall s60 application

    yes I added CAPABILITY TrustedUI

  6. #6
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: Uninstall s60 application

    Can you put logs and check if it is able to parse and find the application name properly.

Similar Threads

  1. Application Termination in S60 5th Edition device (Nokia 5800)
    By neeraja.nokia in forum Mobile Java General
    Replies: 0
    Last Post: 2009-03-23, 08:55
  2. How to Set Orientation of S60 App?
    By vivekg79 in forum Symbian
    Replies: 4
    Last Post: 2009-03-10, 08:03
  3. Development of a dictionary application in Symbian S60
    By som_mukhopadhyay in forum Symbian
    Replies: 0
    Last Post: 2008-04-24, 05:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×