×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    73

    Starting browser from application in N72

    Hi all,
    I am using N72 phone. I am trying to start the browser from my application and display a particular https link. I am using the following code

    Code:
    const TUid KPhoneUidBrowser = { 0x10008D39 };
    
    CLaunchAppUi::LaunchBrowswerL(const TDesC& aAddr )
    {
    TUid id( KPhoneUidBrowser );
    TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
    TApaTask task = taskList.FindApp( id );
    
    if ( task.Exists() )
    {
    	HBufC8* param8 = HBufC8::NewLC( aAddr.Length() );
    	param8->Des().Append( aAddr );
    	task.SendMessage( TUid::Uid( 0 ), *param8 ); 
    	CleanupStack::PopAndDestroy( param8 );
    }
    else
    {
    	if ( !iApaLsSession.Handle() )
    	{
    	User::LeaveIfError( iApaLsSession.Connect() );
    	}
    
    	TThreadId thread;
    	User::LeaveIfError( iApaLsSession.StartDocument( aAddr, KPhoneUidBrowser, thread ) );
    }
    
    }
    
    ----
    
    HBufC* param = HBufC::NewLC( 20 );
    param->Des().Copy( _L( "https://www.XXXXXXX.com/" ) );
    
    LaunchBrowswerL( *param );
    I want to know 2 things

    1. Is my UID correct to start the browser in N72 phone.
    2. Is the way i am specifying the url in descriptor correct or not. If not, how should i specify the https url in the descriptor.

    thanks and regards,
    krishna.

  2. #2
    Regular Contributor
    Join Date
    Mar 2007
    Location
    "On a b'ful lil palnet called EARTH belongs wid Galaxy named MilkyWay in Universe"
    Posts
    402

    Post Re: Starting browser from application in N72

    Try this once...

    Code:
    _LIT(aUrl,"www.google.com");
    HBufC* param = HBufC::NewLC( 256 );
    param->Des().Format( _L( "4 %S" ),&aUrl );
    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();
    ===With Symbian===
    "Something Has Survived..!!!"

  3. #3
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: Starting browser from application in N72

    Hi krishna,

    I think for 3rd editon this uid works but not sure for 2nd edition fp3 device

    (N72).

    why you are taking a buffer of hbufc and unnecessary allocating memory rather

    it would be better to take a tbuf . it should work here.

    For launching browser there is a good code snipet at below link
    http://wiki.forum.nokia.com/index.ph...in_3rd_edition



    Thanks

Similar Threads

  1. Replies: 18
    Last Post: 2007-11-14, 12:10
  2. starting application without clicking on icon
    By nabaparna in forum Symbian
    Replies: 6
    Last Post: 2007-06-05, 12:59
  3. Replies: 3
    Last Post: 2006-11-02, 10:20
  4. Replies: 2
    Last Post: 2006-02-23, 08:21
  5. Replies: 0
    Last Post: 2002-11-28, 09:27

Posting Permissions

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