Contents |
There are many different widget technologies and runtimes out there. One common denominator between many of them is the fact that they are, in effect, renamed zip packages containing common web technologies like HTML, CSS and Javascript etc.
Bondiis an open source industry collaboration for widget and web technologies. The following contains guidelines for porting a Bondi widget to the S60 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.
Nokia WRT supports the following technologies:
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.
If only standard Javascript has been used in the widget, then no additional javascript libraries need to be added to the widget.
However, the Bondi Widget environment provides Javascript APIs that allows widgets to access special functionality. Those functionalities work differently in the Nokia WRT environment. If the built-in Bondi Widget APIs have been used, then additional Javascript libraries need to be added to the widget. Step 4 explains how to do this.
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.
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.
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.
<widget xmlns="http://www.w3.org/ns/widgets"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.
xmlns:bondi="http://bondi.omtp.org/ns/widgets"
id="http://bondi.omtp.org/widgets/location"
version="1.0">
You can find the icon file by following the path in config.xml:
<icon src="thumbnail.png"/>
Copy that image to the root of the widget folder. The icon must be in PNG format and named icon.png.
Copy files bondi.js and platformservices.js (to be uploaded later) to the root of the widget folder. Add the following lines inside <head> element in main HTML file:
<script type="text/javascript" src="bondi.js"></script>
<script type="text/javascript" src="platformservices.js"></script>
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.
No related wiki articles found