Symbian
Symbian OS Library

FAQ-0837 How do I launch the Series 60 WAP browser seeded with a given URL?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: Web & WAP
Created: 12/06/2002 Modified: 12/09/2002
Number: FAQ-0837
Platform: Symbian OS v6.1

Question:
The approach suggested in FAQ-0524 for launching Symbian's Web browser seeded with a given URL doesn't seem to work for launching the WAP browser on a Nokia 7650. Is it possible to do this? If so, what do I have to do different?

Answer:
The WAP browser distributed on the Nokia 7650 is not that provided as standard with Symbian OS v6.1 (which browser uses the same approach as Symbian's Web browser). The 7650 WAP browser is Nokia's own and is launched using a slightly different parameter syntax.

The following code published by Forum Nokia (http://www.forum.nokia.com/ndsCookieBuilder?fileParamID=2634) shows how you can display a WAP page specified by a URL in the WAP browser, launching the application if it is not already running:

HBufC* param = HBufC::NewLC( 20 );
param->Des().Copy( _L( "4 wap.yahoo.com/" ) );
// Wap Browser's constants UId
const TInt KWmlBrowserUid = 0x10008D39;
TUid id( TUid::Uid( KWmlBrowserUid ) );
TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
TApaTask task = taskList.FindApp( id );
if ( task.Exists() )
    {
    HBufC8* param8 = HBufC8::NewLC( 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( KWmlBrowserUid ), id );
      appArcSession.Close();
      }CleanupStack::PopAndDestroy(); // param