Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Launch default web browser using Symbian C++
Starting with Symbian^1, a plug-in in the global settings allows the user to select the default handler application for certain MIME types and for certain use case categories. This setting can be found on a device in Settings > Application Settings > Default applications. Unfortunately some applications (including 3rd Party Apps) do not obey this setting (for example they will open the standard Nokia browser even if Opera is set as the default).
This technical solution demonstrates how a third party application can start the mobile device user's preferred/default browser rather than the default supplied with the device. On earlier versions of the platform, this solution could still work, but 3rd party applications would have to be used for setting the MIME type handler.
On Symbian^3 devices, there are 2 different settings views for Default Applications. One is the Simplified View (the default view). The other is the Advanced View, which can be opened using Options > Advanced options in the Simplified View.
When the setting for Browsing Internet is changed in the Simplified View, the setting in Advanced View for Text/HTML changes automatically. However, this does not happen the other way around, so a situation is possible where Simplified View shows Opera as Default for Browsing Internet, and Advanced View shows Open Text/HTML as Web.
When an application is launched using the document handler, it takes the setting from Advanced Settings. So, even though Browsing Internet shows Opera, Browser NG is launched using the document handler.
Header Files: apgcli.h
// create a session with apparc server.
// get the default application uid for application/x-web-browse
// there may not be a mime-type handler defined, especially on S60 3.x
// in such case we default to the built-in browser
if (handlerUID.iUid == 0)
handlerUID = KWmlBrowserUid;
// Finally launch default browser
The LaunchBrowserL() method and KWmlBrowserUid are defined in How to Launch Browser in 3rd edition but the signature of the method needs to be modified to pass the UID of the Handler Application as follows:
void LaunchBrowserL(const TDesC& aUrl, TUid& aUid);
See also Creating a handler application for a MIME type using Symbian C++ for information on how to declare your application as capable to handle specific MIME types.