Open WAP/web page with browser

Source: Internet
Author: User
Open WAP/web page with browserfrom 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;#elseconst 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 usedtask.SendMessage( TUid::Uid( 0 ), *param8 );CleanupStack::PopAndDestroy();}else{RApaLsSession appArcSession;// connect to AppArc serverUser::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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.