×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    20

    How to open mutiple instances of an application in S60 version 3?

    Hi guys:

    I have two applications (app1, app2). app1 will open app2. My problem is app1 can only open app2 once. If I use app1 to open app2 again, nothing happened. I use the following code to open app2 in app1:

    LaunchApplicationViaUidL(const TInt32 aUid, TFileName* aFile)
    {
    TUid uid( TUid::Uid(aUid) );

    RApaLsSession apaLs;
    User::LeaveIfError(apaLs.Connect());
    CleanupClosePushL(apaLs);

    if ( uid != KNullUid )
    {
    CApaCommandLine* cmd = CApaCommandLine::NewLC();
    TBuf<20> appname;
    appname.Copy(_L("app2"));
    cmd->SetExecutableNameL(appname);
    cmd->SetDocumentNameL(*aFile);
    cmd->SetCommandL(EApaCommandOpen);
    apaLs.StartApp(*cmd);
    CleanupStack::PopAndDestroy(cmd);
    }

    CleanupStack::PopAndDestroy(); // apaLs
    }

    Thanks,
    Last edited by zhengy; 2006-05-17 at 11:52.

  2. #2
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: How to open mutiple instances of an application in S60 version 3?

    Avkon's CAknApplication::PreDocConstructL() checks an instance is not already present. If it is, it switches to it. You should override this function in your App class..(never tried it myself)

  3. #3
    Registered User
    Join Date
    Apr 2006
    Posts
    20

    Re: How to open mutiple instances of an application in S60 version 3?

    Quote Originally Posted by PushL
    Avkon's CAknApplication::PreDocConstructL() checks an instance is not already present. If it is, it switches to it. You should override this function in your App class..(never tried it myself)
    Thanks, I will give it a try.

Similar Threads

  1. Replies: 5
    Last Post: 2006-04-21, 04:40
  2. How to open Messaging application from my application
    By Dipakbaviskar in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2005-05-12, 12:57
  3. Uninstall application when files are open
    By dathom in forum Symbian
    Replies: 4
    Last Post: 2004-04-29, 23:34
  4. Replies: 1
    Last Post: 2003-03-24, 15:35
  5. Questions about version code in MMS protocol
    By wangzhong in forum General Messaging
    Replies: 1
    Last Post: 2002-11-21, 10:32

Posting Permissions

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