Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 12:52, 8 December 2007.

Open WAP/Web page with browser

From Forum Nokia Wiki

Following code shows how you can open the phones WAP/Web browser in your own application, by just supplying Web address to browser.

In S60 3rd edition devices sending a new URL to an existing browser instance requires the SwEvent capability.

#ifdef __SERIES60_3X__
	const TInt KBrowserUid = 0x1020724D;
#else
	const TInt KBrowserUid = 0x10008D39;
#endif
 
void BrowseWAPWEB+PageL(const TDesC& aAddr)
{		
	TUid id( TUid::Uid( KBrowserUid ) );
	TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
	TApaTask task = taskList.FindApp( id );
	if ( task.Exists() )
	{
		HBufC8* param8 = HBufC8::NewLC(aAddr.Length() );
		param8->Des().Append(aAddr);
		// Uid is not used
		task.SendMessage( TUid::Uid( 0 ), *param8 );
		CleanupStack::PopAndDestroy();
	}
	else
	{
		RApaLsSession appArcSession;
		// connect to AppArc server
		User::LeaveIfError(appArcSession.Connect());
		TThreadId id;
		appArcSession.StartDocument(aAddr, TUid::Uid( KBrowserUid ),id);
		appArcSession.Close();
	}
}

This code opens the Web browser in 3rd edition phones, and the WAP browser with older platform devices. To open the page with WAP browser also in 3rd edition phones, just change the code to use 0x10008D39 also with 3rd edition devices.

Related Discussions
Thread Thread Starter Forum Replies Last Post
N73: Web browser vs Services web browser mfarooqkhan78 Symbian Networking & Messaging 1 2006-11-15 17:26
downloading using wap ahsamah General Browsing 4 2004-01-16 07:01
Nokia Web Broser - emulator - buttons problem _germaniec_ General Browsing 0 2006-08-07 09:24
I want to call web application from my app. b4605318 Symbian Networking & Messaging 1 2006-08-16 21:03
wap vs http jackchang1@gmail.com Mobile Java General 2 2005-08-18 21:27
 
Powered by MediaWiki