Namespaces
Variants
Actions
Revision as of 08:38, 4 October 2012 by hamishwillee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Creating a launcher for a web application in Symbian Web Runtime

Jump to: navigation, search

This code snippet shows how to make a web app into a "mobile app", using Symbian Web Runtime the launch the web app in the browser.

Article Metadata

Code Example
Tested with
Devices(s): Nokia N97

Compatibility
Platform(s): S60 5th Edition

Article
Keywords: window.location
Created: tapla (06 Oct 2009)
Last edited: hamishwillee (04 Oct 2012)

Source: HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>WRT Stub</title>
</head>
<body>
</body>
 
<script type="text/javascript" charset="utf-8">
// Ensure that the softkeys are shown even though by default they
// should be
window.menu.showSoftkeys();
 
// Launch the web application
location.href = "http://url.to.your.webapp";
</script>
</html>

Postconditions

The web application is launched from WRT.

Supplementary material

This code snippet is part of the stub concept, which means that it has been patched on top of a template application in order to be more useful for developers. The version of the WRT stub application used as a template in this snippet is v1.2.

174 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved