Symbian Special Interest Group

Sig Is symbian special interest Group

« Inside CBase class - six essential questions

How to launch the built-in brower application

   The code example below presents how to launch the built-in brower application to access the link you give.

   TBuf<128> buf;
   buf.Append( _L("http://internal.ericsson.com") );
   HBufC* param = HBufC::NewLC( 256 );
   param->Des().Format( _L( "4 %S" ),&buf );

   // 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

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

最新留言

最近发表

Powered By Z-Blog 1.6 Final Build 60816

Copyright 2006-2007 SymbianSIG.com . All Rights Reserved.