×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    17

    Unhappy Launching Opera with a given url

    Hello everybody,

    i need your help again ;-)

    i try to start the opera browser from a console with a given url.
    Launching works fine but the url doesn't open. It starts only with the default page!

    I already searched after the problem and found 3 differend ways to make it:

    1. with TApaTaskList

    Code:
    RApaLsSession apaLsSession;
    const TUid KOSSBrowserUidValue = {0x101F4DED}; 
    HBufC* param = HBufC::NewLC(64);
    param->Des().Copy(_L("http://www.yahoo.com/"));
    TUid id(KOSSBrowserUidValue);
    
    RWsSession ws;
    TInt err = KErrNone;
    err = ws.Connect();
    if (err != KErrNone)
      {
        User::LeaveIfError(err);
      }
    
    TApaTaskList taskList(ws);
    TApaTask task = taskList.FindApp(id);
    
    if(task.Exists())
        {
        task.BringToForeground();
        HBufC8* param8 = HBufC8::NewLC(param->Length());
        param8->Des().Append(*param);
        task.SendMessage(TUid::Uid(0), *param8); // UID not used
        CleanupStack::PopAndDestroy(param8);
        }
    else
        {
        if(!apaLsSession.Handle())
          {
          User::LeaveIfError(apaLsSession.Connect());
          }
        TThreadId thread;
        User::LeaveIfError(apaLsSession.StartDocument(*param, KOSSBrowserUidValue, thread));
        apaLsSession.Close();   
        }
    CleanupStack::PopAndDestroy(param);
    2. with CApaCommandLine (example is for S80)

    Code:
    const TUid KOSSBrowserUidValue ={0x101F4DED};
    
    TUid id(KOSSBrowserUidValue);
    
    RApaLsSession apaSession; // apgcli.h , apgrfx.lib
    User::LeaveIfError(apaSession.Connect());
    
    TApaAppInfo appInfo;
    TInt retVal = apaSession.GetAppInfo(appInfo, id);
    
    CApaCommandLine* cmd = CApaCommandLine::NewLC();
    cmd->SetExecutableNameL(appInfo.iFullName);
    cmd->SetCommandL(EApaCommandOpen);
    cmd->SetDocumentNameL(_L("http://www.yahoo.com/"));
    
    apaSession.StartApp(*cmd);
    CleanupStack::PopAndDestroy(cmd);
    3. over a Socket Connection


    All 3 ways started the Opera browser but only with the default page not with the url i want ("http://www.yahoo.com/") :-(
    When eg the message with the url is send (task.SendMessage(...) or socket.send(...)) opera comes in to the foreground but does nothing.

    I know some of you had the same problem. Did you find an answer?

    It gives me the willies!
    Thanks for your help!
    Ceratos

    PS: i used S60 3rd Ed SDK FP2
    Last edited by Ceratos; 2009-05-06 at 13:10.

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Launching Opera with a given url

    Did not tried but add _L("4 ") so url might be ("4 http://www.yahoo.com/")

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    17

    Re: Launching Opera with a given url

    Quote Originally Posted by skumar_rao View Post
    Did not tried but add _L("4 ") so url might be ("4 http://www.yahoo.com/")
    thanks for your reply!
    but this is only interpreted by the OSS Browser not by Opera.

    BUT i found a SOLUTION!
    Opera want an UTF-8 coded URL.. now it works fine

    Thanks
    Ceratos

Similar Threads

  1. Launching Google Map with the provided url?
    By newbie2201 in forum Symbian
    Replies: 4
    Last Post: 2009-03-22, 21:20
  2. launching wap browser with URL
    By mtg101 in forum Symbian
    Replies: 28
    Last Post: 2008-07-01, 16:01
  3. launching the browser with a predefined URL
    By mfarooqkhan78 in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2007-02-14, 08:00
  4. Opera launching with specific APN
    By _fran in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-04-06, 11:34
  5. Launching url in 7650 WAP Browser
    By mpoole in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2002-08-14, 15:10

Posting Permissions

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