sunnuntai 5. elokuuta 2012

How to run Tizen widgets?

Before you even start asking, here are some instructions on how to get and run Tizen widgets on N9 with the widget runtime. At this time, you can get some example widgets from Tizen's developer resources but unfortunately those are meant for developers and are not properly packaged. Luckily we can make them work with a few small modifications. Follow these steps for each of the example widgets you want to try out:

  1. Download the widget to your computer, it comes in a .zip package
  2. Extract the package into an empty directory
  3. Go into the directory and follow the directory structure deeper until you get to a directory with the actual content (it should always have config.xml file in it)
  4. Open this config.xml in any text editor (don't use Windows' Notepad if it looks like all the content are on a single line... Notepad does not understand Linux-style line breaks, use some other editor instead, such as Notepad++)
  5. To avoid wrong scaling on N9 resolution, you need to define the correct resolution for the widget. Usually Tizen widgets seem to be using 1024x600 resolution which means you need to insert  width="1024" height="600" attributes to the widget element.
  6. Since all the example widgets seems to require landscape orientation, you can force this orientation by adding <feature name="http://wacapps.net/api/viewport"><param name="orientation" value="landscape"/></feature> inside the widget element's content.
  7. After editing the config.xml, you need to rezip the content. You need to make sure the directory where the config.xml file resides in is the top level directory in the zipped package. I recommend using 7-Zip to easily do this from the context menu after selecting all the files and folders in the directory.
  8. The last and very important step is to rename the .zip file to use .wgt extention instead. After this, the widget package (.wgt file) is ready to be sent to your device. Bluetooth is likely the easiest way to send it to your device. After receiving the file, just open it from the transfers UI and the widget should open up, ready to be used!

Example Tizen configuration file with the recommended modifications

The same example widget running fullscreen on my N9


4 kommenttia:

  1. Are you planning on making this open source? As perhaps we would benefit from collaborating somewhat, I've been working on a similar widget platform the N9 called TizMee:

    http://www.youtube.com/watch?v=qwPu6lbG_Xk
    https://gitorious.org/tizmee

    Which also implements the Tizen API in addition to just supporting pure HTML widgets.

    VastaaPoista
  2. Currently I have no plans to open source, but it may be an option in the future. A collaboration also sounds very promising, even though it seems our two projects use quite different technical approaches.

    VastaaPoista
  3. i followed your instructions Sviox, but when i try to install the widget i get the error "invalid config.xml file." i edited the config.xml file as you described, moved it to the top directory, saved as .wgt but no luck. any ideas?

    VastaaPoista
  4. Hi Larry. Hydra has been regularly updated since this article was written and should offer better support at this moment. Also, some of the Tizen sample apps have also been updated. Could you try to just rezip the package from the directory with original config.xml, rename package extension to wgt and try to install again?

    VastaaPoista