How to launch a browser with a given URL within the same tab

Posted by Bojan Milankovic on Stack Overflow See other posts from Stack Overflow or by Bojan Milankovic
Published on 2010-03-30T21:50:20Z Indexed on 2010/03/30 21:53 UTC
Read the original article Hit count: 484

Filed under:
|
|
|
|

Here is some code to launch S60 browser with a given url.

  // use the StartDocument api
  param->Des().Format( _L( "4 %S" ),&aUrl );
  TUid id( TUid::Uid( browserUid ) );
  TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
  TApaTask task = taskList.FindApp( id );
  if ( task.Exists() ) {
    HBufC8* param8 = HBufC8::NewL( param->Length() );
    param8->Des().Append( *param );
    task.SendMessage( TUid::Uid( 0 ), *param8 ); 
    // Uid is not used // CleanupStack::PopAndDestroy(); // param8
  }
  else {
    RApaLsSession appArcSession;
    User::LeaveIfError( appArcSession.Connect() ); // connect to AppArc server
    TThreadId id;
    appArcSession.StartDocument( *param, TUid::Uid(browserUid), id );
    appArcSession.Close();
  }

However, this seems to open a new tab for each URL, and if number of tabs reaches internal WebKit limit (5), it will raise an error, saying that maximum number of pop-up windows have been reached. Is there any workaround for this? Is it possible to open the native S60 browser within the same one tab?

© Stack Overflow or respective owner

Related posts about c++

Related posts about symbian