How to show web browser to show internet page
Hi there
I found code and change it a little:
[CODE]
const TInt KWebBrowserUid = 0x1020724D;
const TInt KWebBrowserUid6110Nav = 0x10008d39;
TUid id( TUid::Uid( KWebBrowserUid ) );
TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
TApaTask task = taskList.FindApp( id );
if ( task.Exists() )
{
LOGTXT("Browser was opened. Send message");
HBufC8* param8 = HBufC8::NewLC( myUrl.Length() );
param8->Des().Append( myUrl );
task.SendMessage( TUid::Uid( 0 ), *param8 ); // Uid is not used
CleanupStack::PopAndDestroy(); // param8
}
else
{
LOGTXT("Open browser was opened");
RApaLsSession appArcSession;
if(!appArcSession.Handle())
{
User::LeaveIfError(appArcSession.Connect()); // connect to AppArc server
}
TThreadId id;
TInt err = appArcSession.StartDocument( myUrl, TUid::Uid( KWebBrowserUid ), id );
if (err!=KErrNone)
{
err = appArcSession.StartDocument( myUrl, TUid::Uid( KWebBrowserUid6110Nav ), id );
if (err!=KErrNone)
{
LOGARG("Error in showPosition. Error[%d]", err);
}
}
else
{
LOGARG("Error in showPosition. Error[%d]", err);
}
appArcSession.Close();
}
[/CODE]
For symbian 9.x it works fine. I have tested it on E50 and 6110Navifator
but this two phones have different web browser UIds
and I need to have a solution for every Symbian phone
[B]Please,
advice me how to recognize web browser uid or in general
how to show a page if I have its link
[/B]
I would be glad for any suggestions.
thank you in advance
Re: How to show web browser to show internet page
My suggestion would be to check the wiki before posting.
See [url]http://wiki.forum.nokia.com/index.php/TSS000340_-_Launching_the_Web_browser_on_S60_3rd_Edition_to_open_a_specified_URL[/url]
or
[url]http://www3.symbian.com/faq.nsf/AllByDate/06E7EAA95F09B4E7002571F800282EFB?OpenDocument[/url]