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.

Porting between Symbian Web Runtime and Nokia Asha Web Apps

From Wiki
Jump to: navigation, search
Article Metadata
Created: r60600 (15 Jun 2011)
Updated: isalento (20 Oct 2011)
Last edited: hamishwillee (13 May 2013)

This article explains the differences between Symbian Web Runtime and Nokia Asha Web Apps, and the changes you need to make to port between the two formats.



The Symbian Web Runtime (WRT) is the official Web Runtime offering by Nokia for Symbian devices. Nokia Asha Web Apps are W3C compliant widgets than run on Nokia Nokia Asha devices.

The two types of web apps are actually quite similar; they are both constructed from traditional web resources written in html, javascript and CSS, have a registration file, and are packaged in zip files. While the execution model is quite different, from a developer point of view the packaging and programming is much the same. As a result developers can port between the two types with little effort.

File name

Both types of web apps are packaged in a zip file containing much the same files. The main change in this area when porting is to use the correct file extension:

  • Series 40 Web App has extension .wgt
  • Symbian Web Runtime has extension .wgz

It is also necessary to change the registration file, as discussed below.

Widget / Web App manifest file

Both Symbian WRT widgets and Nokia Asha Web Apps need to have a manifest file, which defines the widget properties such as name, identifier and icon. W3C widget manifest file name is config.xml.

  • Symbian Web Runtime widget: info.plist
  • Nokia Asha Web Apps: config.xml

W3C widget manifest file is more versatile than the info.plist that is used in the Symbian WRT. Comparison of the common info.plist values and config.xml elements.

info.plist config.xml
<name short="WebAppName">WebAppName</name>
<content src="index.html"/>
As attribute for the root widget element.
As attribute for the root widget element.
Mini view / Home Screen is not supported in Nokia Asha Web Apps
Not used in Nokia Asha Web Apps
Not used in symbian WRT Used when storing preferences
<preference name="key" value=""/>
Not used in symbian WRT Must be included in Nokia Asha Web Apps!
<feature name="nokia:// " required="true"/>
Not used in symbian WRT
<author email="" href="">Foo Bar Corp</author>
Not used in symbian WRT
<license>Copyright Foo Bar Corp, 2011.</license>

Example: Info.plist (WRT)

<DOCTYPEplistPUBLIC "//Nokia//DTDPLIST1.0//EN" ""><plist version="1.0">
<string>A Widget</string>

config.xml (Series 40 Web App)

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="" height="200" id="" version="0.1.0" viewmodes="windowed fullscreen" width="200">
<name short="AW">A Widget</name>
<icon src="icon.png"/>
<content src="AWidget.html"/>
<author email="" href="">

Size of UI elements

The typical screen size of Series 40 device (240 x 320 px) is different from typical Symbian touch devices (640 x 360 px), so the application must change the width and height of some items in html or css in order to optimise the UI. This includes text, images and videos.

Comparison of recommended dimensions of a button on common devices running Symbian WRT and Series 40 Web App.

Device Physical size Pixel size
Nokia N8-00 (Symbian^3) 7 x 7 mm 60 x 60 px
Nokia X3-02 (Series 40) 6.1 x 6.1 mm 40 x 40 px

For more information see Series 40 Web App UX Guidelines.

Media file size

Nokia Asha devices are typically are less powerful than Symbian devices. In order to run applications at acceptable speeds, it may be necessary to use smaller media files, including images, audio and video.

Application structure

The most difficult part on porting a Symbian Web Runtime widget to Series 40 Web App is taking mobile web library (MWL) into use in a Web App. Symbian Web Runtime allows JavaScript to be executed on a device and thus you can e.g. switch element contents on the fly without user noticing. The situation is different in the Series 40 Web App, as all of the JavaScript is executed on a proxy server. Using JavaScript to switch elements contents in a Web App will result in a round trip to server and back. This is where MWL comes to help. What you should do is to generate most of the HTML ready in the server side using JavaScript and then use MWL methods to switch CSS properties to hide and show element contents. Methods provided by the MWL are only scripts that are executed on a device in a Nokia Asha Web Apps.

Application icons

Nokia Asha Web Apps have one more icon compared to Symbian WRT widget. They both share the main icon defined in the info.plist or config.xml. This icon is used in the application menus. In addition a favicon is needed in Nokia Asha Web Apps. The favicon is used in Nokia Browser history and favorites listing. The favicon is a 16x16 px pixel image. To include favicon add following line to index.html head-section:

<link rel="icon" type="image/png" href="favicon.png"/>

Storing Data

Nokia Asha Web Apps supports preferences attribute to store key-value pairs as defined in the W3C Widget interface specification. Preference should be defined in config.xml before using.

Config.xml: <preference name="key" value=""/>


var val = widget.preferences.getItem("key");  
//or alternative way to access preferences
var val = widget.preferences["key"];
widget.preferences["key"] = "value”

Symbian WRT equivalent would be:

var val = widget.preferenceForKey("key");  
widget.setPreferenceForKey("value", "key");


Symbian WRT uses special “xx.lproj” folders for localization purposes. For example \MyWidget\fi.lproj\. Series 40 Web apps uses supports localization in compliance with the W3C widget specification. Basically it is folder based localization as well, but the folder structure is bit different. In a W3C widget localization folder is placed in the root of the widget folder and must be named “locales” (case sensitive). Localized files are placed inside subfolders of the locales folder. The names of subfolders must comply with values derived from the IANA Language Subtag Registry such as “fr”, ”fi” and “en-US”. E.g. \locales\fi-Fi\

This page was last modified on 13 May 2013, at 01:56.
76 page views in the last 30 days.