×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    53

    Application to application

    Hi,
    i've a question for you.Can anyone tell me how from an application i can open another application in the file system?
    Thank in advance.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere
    Posts
    475

    RE: Application to application

    If you know the application's location, you can launch it with the following code:

    #include "eikdll.h"

    // For example Wap browser application located at:
    _LIT(KAppFileName, "z:\\System\\Apps\\WmlBrowser\\WmlBrowser.app");
    // on Nokia 7650. No Wap browser inside the emulator therefore trying to open this application on emulator resulting System error
    // Start the application

    CApaCommandLine* cmdLine=CApaCommandLine::NewLC();
    cmdLine->SetCommandL(EApaCommandRun);
    cmdLine->SetLibraryNameL(KAppFileName);
    EikDll::StartAppL(*cmdLine);
    CleanupStack::PopAndDestroy(); // cmdLine

    Best Regards,
    (V) - Forum Nokia Developer Support

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere
    Posts
    475

    RE: Application to application

    The MApaAppStarter::StartAppL() is a Mixin class's method, and as such the StartAppL() is pure virtual there. The CEikonEnv::StartAppL() is like EikDll::StartAppL(), but StartAppL() is a private method of CEikonEnv therefore you can not use it.

    If you want start an application before you exit, then you have to add the code to the app's CAknAppUi::HandleCommandL(TInt aCommand) The EEikCmdExit Command means exit:
    case EEikCmdExit:
    {
    _LIT(KAppFileName, "c:\\System\\apps\\secondapp\\secondapp.app");
    CApaCommandLine* cmdLine=CApaCommandLine::NewLC();
    cmdLine->SetCommandL(EApaCommandRun);
    cmdLine->SetLibraryNameL(KAppFileName);
    EikDll::StartAppL(*cmdLine);
    CleanupStack::PopAndDestroy(); // cmdLine
    Exit();
    }

    Best Regards,
    (V) - Forum Nokia Developer Support

Posting Permissions

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