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. Thanks for all your past and future contributions.

Archived:Launching the Web browser on S60 3rd Edition to open a specified URL

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

This article shows how to launch the Web browser on S60 3rd Edition to open a specified URL.

Article Metadata
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Platform Security
Signing Required: DevCert
Capabilities: SWEvent
Created: User:Technical writer 2 (04 May 2006)
Last edited: lpvalente (17 Nov 2012)


In order to launch the Web browser on S60 3rd Edition and have it automatically open a specified URL, the application must have the SWEvent capability. Note that the UID of the OSS browser in S60 3rd Edition is 0x1020724D and from S60 3rd Edition, FP1 onwards 0x10008D39.

Reference code:

RApaLsSession apaLsSession;
const TUid KOSSBrowserUidValue = {0x10008D39}; // 0x1020724D for S60 3rd Ed
HBufC* param = HBufC::NewLC(64);
TUid id(KOSSBrowserUidValue);
TApaTaskList taskList(CEikonEnv::Static()->WsSession());
TApaTask task = taskList.FindApp(id);
if(task.Exists()) {
HBufC8* param8 = HBufC8::NewLC(param->Length());
task.SendMessage(TUid::Uid(0), *param8); // UID not used
} else {
if(!apaLsSession.Handle()) {
TThreadId thread;
User::LeaveIfError(apaLsSession.StartDocument(*param, KOSSBrowserUidValue, thread));

Note: If the browser is currently in the process of loading an URL and an external application tries to open another one, the error "Unable to retrieve" is shown and the new URL is not loaded.
See also topic Archived:Different browser UIDs in S60 3rd Edition (inital release) and FP1.

Here is some additional information about the parameters that are passed as command line arguments when launching the OSS Browser:

  1. Start/Continue the browser and nothing is specified (the default case)
    => Parameter = <Any text>
  2. Start/Continue the browser specifying a Bookmark
    => Parameter = “1”+”<Space>“+”<Uid of the Bookmark>”
  3. Start/Continue the browser specifying a Saved deck
    => Parameter = “2”+” <Space>“+”<Uid of the Saved deck>”
  4. Start/Continue the browser specifying a URL
    => Parameter = “4”+” <Space>“+”<Url>”
  5. Start/Continue the browser specifying a URL and an Access Point
    => Parameter = “4”+”<Space>“+”<Url>”+”<Space>“+”<Uid of Ap>”
  6. Start/Continue the browser with the start page. (Used when starting the browser with a long press of “0” in the Idle state of the phone.
    => Parameter = “5”
  7. Start/Continue the browser specifying a Bookmark folder
    => Parameter = “6”+” <Space>“+”<Uid of the Folder>”

Browser Launcher API

The SDK API Plug-in package for S60 3rd Edition SDKs includes the Browser Launcher API. CBrowserLauncher class will automatically determine which browser to launch.

Parameters passed to this API are in the same format as above:

CBrowserLauncher* launcher = CBrowserLauncher::NewLC();
This page was last modified on 17 November 2012, at 21:44.
72 page views in the last 30 days.