How to port Bondi Widgets to Symbian Web Runtime
These instructions are targeted for developers who wish to port their own Bondi widgets to Nokia WRT. It is assumed that they know whether a Bondi widget uses built in Bondi objects and if it requires network access.
Web standard technologies
Nokia WRT supports the following technologies:
- HTML 4.01 Specification, W3C Recommendation 24 December 1999,
- XHTML Mobile Profiles Specification, XHTML Mobile Profile Version 29-Oct-2001, WAP-277-XHTMLMP-20011029-a
- CSS Level 2 revision 1 (CSS 2.1), WAP CSS Specification Version 26-Oct-2001, WAP-239-WCSS-20011026-a
- The combination of XML, XHTML/HTML, CSS, DOM, and the XMLHttpRequest object to add Ajax capability to a widget
If the widget you wish to port uses technologies that are not in this list, then it will not function as intended without modifications to the source code.
Be aware that the library is only partially supported and as such will have reduced functionality. The following is a list of the supported functionality.
Supported attributes and methods
1. Unzip the Bondi package
Take a Bondi widget and unzip it using the unzipping program of your choice. Remember to retain the folder structure, if possible. Note: file extension may need to be changed to *.zip before being extracted.
2. Create an info.plist manifest file
When installing a *.wgz file the system looks for a manifest file called info.plist. The Bondi Widget equivalent is called config.xml.
Here's how to use the Bondi Widget config.xml data to create the WRT manifest file.
- Download and unzip this info.plist template file and save it in the widget's root directory.
- Add the DisplayName (mandatory)
This can be found from the <name> element of the config.xml file.
- Add the Identifier (mandatory)
The id attribute in config.xml can be found in the <widget> element.These can be formatted into the same form as the conventional WRT Identifier, which is the URL in reverse with the widget name appended to the end.
eg. http://bondi.omtp.org/widgets/location → org.omtp.bondi.widgets.location
- Add the MainHTML (mandatory)
Bondi widget config.xml files contain a <content> element, whose attribute src contains the HTML file to be opened by the HTML renderer. If this element exists, its value should be assigned to the MainHTML key in the info.plist file.
If it does not exist, then the default value, index.html should be assigned to the MainHTML key.
- AllowNetworkAccess (optional)
If the widget requires network access, add a self closing tag <true /> under AllowNetworkAccess element. To deny network access, add a self closing tag <false /> under AllowNetworkAccess element. Leaving the element out of info.plist completely is the same as having set the element to false.
- Version (optional)
This tag facilitates updating of the widget, allowing it to check if there is a newer version available. The version attribute in config.xml can be found in the <widget> element.
- Save the file.
3. Find, Move and Rename the icon
You can find the icon file by following the path in config.xml:
Copy that image to the root of the widget folder. The icon must be in PNG format and named icon.png.
Add the following lines inside <head> element in main HTML file:
If the widget does not use geolocation API, copy only Bondi.txt to the root of the widget folder and change the extension from *.txt to *.js.
Add the following line inside <head> element in main HTML file:
5. Rezip and rename
Use a packaging tool to create a *.zip file of the widget folder. The S60 Web Runtime requires that the widget contents are in a folder inside the zip file, not as files in the root of the zip.
Rename the newly created *.zip into *.wgz
Upload the widget installation package (wgz) to your phone.
- Bondi Widget porting example - geolocation API
- Bondi Widget porting example - devicestatus API
- Create your first WRT widget
- How to port Adobe AIR to WRT
- How to port Opera Widgets to Nokia WRT
- Web Developer's Library 1.7
Note that Bondi references may require login credentials.