You
can create a widget that launches your website from the applications menu
by editing one line of HTML code in the OpenURL.wgz
example
widget. OpenURL.wgz
launches the Forum Nokia Web Runtime
widgets website in the S60 Browser. You can modify this widget to launch your
website by editing the URL it launches (via widget.openURL)
and
replacing the icon.
Figure: OpenURL.wgz
Follow these instructions
to edit OpenURL.wgz
so that it launches your website
in the Web Browser for S60 and displays an icon of your choice in the applications
menu.
Download the OpenURL widget example (OpenURL).
The example contains a packaged widget (OpenURL.wgz)
.
Change the
extension of the widget from OpenURL.wgz
to OpenURL.zip
and
unzip the files using a ZIP utility. You should see the following files:
Replace Icon.png
with
the icon that you want displayed in the application menu.
Open the widget.html
file
in an editor and replace the URL, www.forum.nokia.com/Resources_and_Information/Explore/Web_Technologies/Web_Runtime
with
the URL to your website.
<html> <head> <script type="text/javascript"> <!-- function doRedirect() { widget.openURL("http://www.forum.nokia.com/Resources_and_Information/Explore/Web_Technologies/Web_Runtime"); window.close(); } //--> </script> </head> <body onload="doRedirect()"> </body> </html>
Create the widget installation package:
Select
the OpenURL
directory using a ZIP utility.
Create a ZIP archive of the directory.
Note: The directory must be included in the ZIP archive. That is, the root of the ZIP archive must contain the directory, which in turn contains the widget component files.
Change
the extension of the ZIP file from .zip
to .wgz
.
Test your widget by deploying it to a mobile device (that supports WRT widgets) as described in Deploying widgets.