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
2. with CApaCommandLine (example is for S80)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);
3. over a Socket ConnectionCode: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);
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

Reply With Quote




