Contents |
There are many different widget technologies and runtimes out there. One common denominator between many of the is the fact that they are, in effect, renamed zip packages containing common web technologies like JavaScript, HTML, xml, Flash etc.
Here I describe how to port a simple Adobe AIR application to the s60 Web Runtime.
This method assumes, that the content of the AIR application is as such suitable for the mobile and it does not contain any incompatible JavaScript etc. Normally assuming would make an ass out of you and me, but perhaps in this case it's permitted?
A widget packaged in a renamed zip file usually consists of these parts:
A small specially formatted text or xml file describing the contents of the package. Usually at least the following
An html, xml or Flash file that gets launched when the application is called.
A small image used as an icon on the desktop or on a widget area, like Apple dashboard or Widows Sidebar.
Each different widget runtime uses it's own special formatting, although the W3C is trying to formulate a standard. What we wish to do here is to simply reformat the contents of the AIR -package into a close resemblance of a wgz package
First we need an AIR package to start with. I have used this one (Thanks, Doug ;o).
Download the .air package onto a folder of your choice in your PC and use an unzipping software (of your choice) to ...unzip it. Remember to retain the folder structure, if such an option is available.
'This is for Windows XP with Winzip: If you have Adobe AIR installed, right-click on the .air file and choose "Open with" and open with Winzip. If you do not have AIR installed, you can just double-click the .air file. Then just select "Extract", create a new folder and unzip the contents by clicking on "extract"'
Ígnore the following slander perpetrated by Winzip at least:
When installing a .wgz file the system looks for a manifest file called info.plist, the AIR equivalent is callen application.xml. Here's how to use AIR data to create the WRT manifest file:
Find this line in application.xml:
<name>funkyCalc</name>
and copy it to info.plist (replace the "XXXXX")
<key>DisplayName</key>
<string>XXXXX</string>
Find this line in application.xml:
<id>com.adobe.example.funkyCalc</id>
and copy it to info.plist (replace the "com.xxx.xxx.xxx")
<key>Identifier</key>
<string>com.xxx.xxx.xxx</string>
Find this line in application.xml:
<content>libraryeffects/libraryeffects.htm</content>
and copy it to info.plist (replace the "xxx.xxx")
<key>MainHTML</key>
<string>xxx.xxx</string>
Now you must save the info.plist file to the root of the folder containing the rest of the stuff you unzipped from the AIR package.
You can find the icon file by reading the following datain the application.xml:
<icon>
<image48x48>libraryeffects/thumbpng.png</image48x48>
</icon>
Copy that image to the root of the folder containing the rest of the stuff you unzipped from the AIR package and rename it to icon.png. If there are more than one icon files defined, use the 48pixel version.
Now you can use advance technologies like copy-pasting, bluetooth and infrared to upload the widget installation package to your phone. I use bluetooth and when I opened the message the widget installed fine on my E90 with updated firmware.
Please use the comment section of this article to contribute or feel free to edit if you must ;)
No related wiki articles found