<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jappit.com &#187; wrt</title>
	<atom:link href="http://www.jappit.com/blog/tag/wrt/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jappit.com/blog</link>
	<description>Mobile blog by Alessandro La Rosa</description>
	<lastBuildDate>Wed, 23 Nov 2011 10:38:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Three open source projects for WRT developers: Bing, Buzz and RSS</title>
		<link>http://www.jappit.com/blog/2010/06/30/three-open-source-projects-for-wrt-developers-bing-buzz-and-rss/</link>
		<comments>http://www.jappit.com/blog/2010/06/30/three-open-source-projects-for-wrt-developers-bing-buzz-and-rss/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 22:42:56 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[cool stuff]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[social]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[web runtime]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[bing]]></category>
		<category><![CDATA[forum nokia]]></category>
		<category><![CDATA[forumnokia]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[rss buzz]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=1432</guid>
		<description><![CDATA[Today I&#8217;ve released three widgets as open source projects on the brand new project management tool by Nokia, to allow all WRT developers to freely use and contribute to them. The first project is for a widget that allows the user to perform searches through the Bing search engine. Its code shows how many widgets&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve released <strong>three widgets as open source projects</strong> on the brand new <a href="http://projects.forum.nokia.com">project management tool</a> by <a href="http://www.nokia.com">Nokia</a>, to allow all <strong>WRT developers</strong> to freely use and contribute to them.</p>
<p>The <a href="https://projects.forum.nokia.com/wrtbing">first project</a> is for a widget that allows the user to perform searches through the <a href="http://www.bing.com">Bing</a> search engine.</p>
<p><a href="https://projects.forum.nokia.com/wrtbing"><img class="aligncenter size-full wp-image-1434" title="Open source WRT Bing widget" src="http://www.jappit.com/blog/wp-content/opensource_wrt_bing.png" alt="" width="381" height="327" /></a></p>
<p>Its code shows how many widgets&#8217; common features can be implemented, including:</p>
<ul>
<li>integrate a <strong>public REST API</strong></li>
<li>retrieve and show <strong>dynamic data</strong> from  network</li>
<li>detect and adapt to <strong>different screen resolutions</strong></li>
<li>handle <strong>touch  and key-based user interaction</strong></li>
<li>show <strong>tabbed views</strong></li>
<li>download dynamic <strong>code  updates</strong> and new versions of the widget</li>
</ul>
<p>The <a href="https://projects.forum.nokia.com/wrtrssreader">second widget</a> is a <strong>configurable RSS reader</strong> supporting multiple RSS feeds at once. The widget is easily adaptable to different needs, where retrieval and displaying of remote XML feeds is needed.</p>
<p><a href="https://projects.forum.nokia.com/wrtrssreader"><img class="aligncenter size-full wp-image-1435" title="Open source RSS reader WRT widget" src="http://www.jappit.com/blog/wp-content/opensource_wrt_multirss.png" alt="" width="580" height="345" /></a></p>
<p>The <a href="https://projects.forum.nokia.com/buzzer">last project</a> is a client for Google&#8217;s <a href="http://buzz.google.com">Buzz</a> social network: the current functionalities include <strong>searching</strong> by keyword, and retrieving of <strong>Buzzes of a single user</strong>. Many more features are under development: feel free to take a look and integrate yours <img src='http://www.jappit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="https://projects.forum.nokia.com/buzzer"><img class="aligncenter size-full wp-image-1436" title="Open source WRT Buzz widget" src="http://www.jappit.com/blog/wp-content/opensource_wrt_buzz.png" alt="" width="580" height="345" /></a></p>
<p>As these are <strong>open source projects</strong>, everyone is invited to <strong>dig into the code</strong> and to <strong>contribute</strong> to the them: just join the project, and start experimenting! To start, visit <a title="Forum Nokia Projects" href="http://projects.forum.nokia.com">Forum Nokia Projects</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2010/06/30/three-open-source-projects-for-wrt-developers-bing-buzz-and-rss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New UI components for Web Runtime widgets by Dr. Jukka</title>
		<link>http://www.jappit.com/blog/2010/05/28/new-ui-components-for-web-runtime-widgets-by-dr-jukka/</link>
		<comments>http://www.jappit.com/blog/2010/05/28/new-ui-components-for-web-runtime-widgets-by-dr-jukka/#comments</comments>
		<pubDate>Fri, 28 May 2010 08:52:46 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[cool stuff]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[web runtime]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[drjukka]]></category>
		<category><![CDATA[forumnokia]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=1412</guid>
		<description><![CDATA[Web Runtime widgets definitely need frameworks and UI components to be easily plugged and used, without the need to re-adapt and rewrite JavaScript code originally intended for the Web, more than for mobile devices. For this reason, It&#8217;s a pleasure to see Dr. Jukka releasing a new set of UI components, specifically intended for S60 [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Web Runtime" href="http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/">Web Runtime</a> widgets definitely need <strong>frameworks and UI components</strong> to be easily plugged and used, without the need to re-adapt and rewrite JavaScript code originally intended for the Web, more than for mobile devices.</p>
<p>For this reason, It&#8217;s a pleasure to see <a title="Dr. Jukka" href="http://dev.drjukka.com/">Dr. Jukka</a> releasing a <a title="DrY UI components" href="http://dev.drjukka.com/DrY/">new set of UI components</a>, specifically intended for <a title="S60 5th edition devices" href="http://www.forum.nokia.com/devices/matrix_s60_5ed_1.html">S60 touch devices</a>.</p>
<p style="text-align: center;"><a href="../wp-content/drjukka_wrtcomponents.jpg"></a><a href="http://dev.drjukka.com/DrY/"><img class="aligncenter size-full wp-image-1413" title="Dr.Jukka Web Runtime UI components" src="http://www.jappit.com/blog/wp-content/drjukka_wrtcomponents.jpg" alt="" width="620" height="374" /></a></p>
<p>Here is the full <strong>list of components</strong>:</p>
<ul>
<li>Accordion</li>
<li>Busy</li>
<li>Button</li>
<li>Carousel</li>
<li>Checkbox</li>
<li>LightBox</li>
<li>Optionsbox</li>
<li>ProgressBar</li>
<li>Radiobox</li>
<li>Rating</li>
<li>TextLabel</li>
<li>ToggleSwitch</li>
<li>ToggleSwitch list</li>
</ul>
<p>Components&#8217; documentation is available on <a title="DrY UI components documentation" href="http://wiki.forum.nokia.com/index.php/DrY_Article_Index">Forum Nokia Wiki</a>, and you can also <strong>preview the components online</strong>, by using <a title="DrY UI components online browser" href="http://dev.drjukka.com/DrY/">this page</a>.</p>
<p><strong>Good job</strong> Jukka! <img src='http://www.jappit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2010/05/28/new-ui-components-for-web-runtime-widgets-by-dr-jukka/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Forum Nokia Web Developer&#8217;s Library 1.9 available</title>
		<link>http://www.jappit.com/blog/2010/03/17/forum-nokia-web-developers-library-1-9-available/</link>
		<comments>http://www.jappit.com/blog/2010/03/17/forum-nokia-web-developers-library-1-9-available/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 09:20:57 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web runtime]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[forum nokia]]></category>
		<category><![CDATA[forumnokia]]></category>
		<category><![CDATA[mobile web]]></category>
		<category><![CDATA[wdl]]></category>
		<category><![CDATA[web developer's library]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=1339</guid>
		<description><![CDATA[Forum Nokia has just updated its excellent resource for mobile Web development, the Web Developer&#8217;s Library, adding a lot of resources to support the design and development of Web Runtime widgets. Changes in this last release include: Samples and packaging information for Platform Services 2.0 Guidelines and how-to&#8217;s for home-screen widgets Optimization of performances and [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Forum Nokia" href="http://www.forum.nokia.com">Forum Nokia</a> has just updated its excellent resource for <strong>mobile Web development</strong>, the <a title="Forum Nokia Web Developer's Library" href="http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-4D13AF3F-4733-44E7-996F-F27A11C9D6BF_cover.html">Web Developer&#8217;s Library</a>, adding a lot of resources to support the design and development of <a title="Web Runtime" href="http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/">Web Runtime widgets</a>.</p>
<p><a title="Forum Nokia Web Developer's Library" href="http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-4D13AF3F-4733-44E7-996F-F27A11C9D6BF_cover.html"><img class="alignnone size-full wp-image-1341" title="Forum Nokia Library" src="http://www.jappit.com/blog/wp-content/forum_nokia_library.png" alt="" width="620" height="107" /></a></p>
<p>Changes in this last release include:</p>
<ul>
<li><a href="http://library.forum.nokia.com/topic/Web_Developers_Library/GUID-9B5ACA61-9BBB-4F67-A994-22016FB36A1E.html#GUID-9B5ACA61-9BBB-4F67-A994-22016FB36A1E">Samples</a> and <a href="http://library.forum.nokia.com/topic/Web_Developers_Library/GUID-0084E4E8-4A60-41C8-8CEB-93A08A0292FF.html#GUID-0084E4E8-4A60-41C8-8CEB-93A08A0292FF">packaging information</a> for Platform Services 2.0</li>
<li><a href="http://library.forum.nokia.com/topic/Web_Developers_Library/GUID-FB279BC9-9751-4F03-B00E-A0406324BC47.html#GUID-FB279BC9-9751-4F03-B00E-A0406324BC47">Guidelines</a> and <a href="http://library.forum.nokia.com/topic/Web_Developers_Library/GUID-249C566A-7F14-4D42-8117-1EADAB137838.html#GUID-249C566A-7F14-4D42-8117-1EADAB137838">how-to&#8217;s</a> for home-screen widgets</li>
<li><a href="http://library.forum.nokia.com/topic/Web_Developers_Library/GUID-40782DAD-F6E2-44A5-8036-1D1FD8860ABA.html#GUID-40782DAD-F6E2-44A5-8036-1D1FD8860ABA">Optimization</a> of performances and battery life</li>
</ul>
<p>If you&#8217;re a mobile Web developer, <a title="Forum Nokia Web Developer's Library" href="http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-4D13AF3F-4733-44E7-996F-F27A11C9D6BF_cover.html">check it out</a>!</p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2010/03/17/forum-nokia-web-developers-library-1-9-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploying API Bridge apps the easy way: the delayed deploy model</title>
		<link>http://www.jappit.com/blog/2010/02/18/deploying-api-bridge-apps-the-easy-way-the-delayed-deploy-model/</link>
		<comments>http://www.jappit.com/blog/2010/02/18/deploying-api-bridge-apps-the-easy-way-the-delayed-deploy-model/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 09:35:06 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[flash lite]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web runtime]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[apibridge]]></category>
		<category><![CDATA[forumnokia]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=1246</guid>
		<description><![CDATA[When developing a Flash Lite, Web Runtime or Java ME application based on API Bridge, one of the things you know you&#8217;ll have to deal with is the Symbian packaging and signing process. For single-person and small developer teams, the whole Symbian process could be a not suitable option. For this reason, I&#8217;ve looked for [...]]]></description>
			<content:encoded><![CDATA[<p>When developing a <a title="Adobe Flash Lite" href="http://www.adobe.com/products/flash/">Flash Lite</a>, <a title="Web Runtime" href="http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/">Web Runtime</a> or <a title="Java ME" href="http://java.sun.com/javame/index.jsp">Java ME</a> application based on <a title="APIBridge" href="http://www.forum.nokia.com/info/sw.nokia.com/id/d697a64f-ddae-4937-8151-be157b542d26/ApiBridge.html">API Bridge</a>, one of the things you know you&#8217;ll have to deal with is the <strong><a title="Symbian" href="http://www.symbian.org">Symbian</a> packaging and <a title="Symbian Signed" href="http://www.symbiansigned.com">signing process</a></strong>.</p>
<p>For <strong>single-person and small developer teams</strong>, the whole Symbian process could be a <strong>not suitable</strong> option. For this reason, I&#8217;ve looked for an <strong>alternative deployment approach</strong> that could bypass this process. The approach presented here is based on a <em><strong>delayed deploy model</strong></em>, meaning that the API Bridge engine is not deployed with your application, but in a successive moment: actually, it is <em>deployed only when the application needs it</em>.</p>
<p><a href="http://www.jappit.com/blog/wp-content/apibridge_delayed_deploy_model2.png"><img class="alignnone size-full wp-image-1263" title="API Bridge delayed deploy model" src="http://www.jappit.com/blog/wp-content/apibridge_delayed_deploy_model2.png" alt="" width="620" height="400" /></a></p>
<p>How this can be achieved? Basically, there are <em>2 possible options</em> to implement this model, and they&#8217;re based on:</p>
<ul>
<li><strong>AppManager API from Platform Services</strong></li>
<li><strong>Local HTTP calls</strong></li>
</ul>
<h3>Using the AppManager API to check API Bridge</h3>
<p>If the target devices support <a title="Platform Services" href="http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C.html">Platform Services</a>, the <a title="AppManager API" href="http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-2D651505-F68C-4053-B565-9FF826C5B897.html">AppManager API</a> can be used to retrieve the <strong>list of installed applications</strong>, and so to <strong>check if API Bridge is installed</strong> on the device itself.</p>
<p>The code below shows how this can be achieved by <strong>using JavaScript in a WRT widget</strong>. The same approach can be easily ported to ActionScript, and so used in a Flash Lite application.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> apiBridgeFound <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> apiBridgeCheckError <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> so <span style="color: #339933;">=</span> device.<span style="color: #660066;">getServiceObject</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Service.AppManager&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;IAppManager&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> criteria <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Object<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
criteria.<span style="color: #660066;">Type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'Application'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> result <span style="color: #339933;">=</span> so.<span style="color: #660066;">IAppManager</span>.<span style="color: #660066;">GetList</span><span style="color: #009900;">&#40;</span>criteria<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>result.<span style="color: #660066;">ErrorCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> iterator <span style="color: #339933;">=</span> result.<span style="color: #660066;">ReturnValue</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> application<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>application <span style="color: #339933;">=</span> iterator.<span style="color: #660066;">getNext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> undefined<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>application.<span style="color: #660066;">Uid</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'0x20023710'</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			apiBridgeFound <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span>
<span style="color: #009900;">&#123;</span>
	apiBridgeCheckError <span style="color: #339933;">=</span> result.<span style="color: #660066;">ErrorMessage</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The code works by checking the <strong>UID</strong> of all the installed applications, comparing them with the API Bridge UID (<em>0&#215;20023710</em>). This code snipped defined 2 variables, that can be used to check for API Bridge availability:</p>
<ul>
<li><em>apiBridgeFound</em>: if <strong>true</strong>, it means that the <strong>API Bridge engine is installed</strong> on the device. If <strong>false</strong>, the API Bridge engine is <strong>not installed</strong>.</li>
<li><em>apiBridgeCheckError</em>: if <strong>not null</strong>, it means that <strong>there was an error while checking for API Bridge</strong>, due to the <em>AppManager API</em>. In this case, the application <strong>cannot actually know</strong> if the API Bridge engine is installed or not.</li>
</ul>
<p>So, once these 2 variable have been set, the application can perform the most appropriate operation, based on the AppManager call result. The code snippet below shows a possible implementation:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>apiBridgeCheckError <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;There was an error! &quot;</span> <span style="color: #339933;">+</span> apiBridgeCheckError<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>apiBridgeFound<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">confirm</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;You have to install API Bridge to continue, press OK to download it&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		widget.<span style="color: #660066;">openURL</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'http://www.yourserver.com/APIBridge_v1_1.sis'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;API Bridge is already installed on the device!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And below you can see this code running on a <a href="http://www.forum.nokia.com/devices/5800_XpressMusic/">Nokia 5800 XpressMusic</a>:</p>
<p><a href="http://www.jappit.com/blog/wp-content/apibridge_delayed_installation.png"><img class="alignnone size-full wp-image-1266" title="API Bridge delayed installation" src="http://www.jappit.com/blog/wp-content/apibridge_delayed_installation.png" alt="" width="620" height="292" /></a></p>
<h3>Using local HTTP calls to check API Bridge</h3>
<p>Since the <strong>API Bridge engine works as a local HTTP server</strong> running on the mobile phone, the other possible approach is to make an HTTP request, and to check if any response from API Bridge comes.</p>
<p><strong>Note:</strong> this approach works by using the <strong>API Bridge default port</strong> (<em>9080</em>). There are no guarantees that this port number is fixed, and that it will not be changed in future API Bridge releases. For this reason, my advice would be to <strong>use this second approach only when Platform Services are not available</strong>.</p>
<p>The code below shows how to make a <strong>request to the local API Bridge HTTP server</strong>, and how to check if it&#8217;s running or not: if it is running, the <strong>response status</strong> of the XMLHttpRequest object has to be <strong>different than zero</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> pollApiBridgeServer<span style="color: #009900;">&#40;</span>_callback<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> request <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> XMLHttpRequest<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	request.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;http://127.0.0.1:9080&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	request.<span style="color: #660066;">send</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	request.<span style="color: #660066;">onreadystatechange</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> request.<span style="color: #660066;">readyState</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">4</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>request.<span style="color: #000066;">status</span> <span style="color: #339933;">!=</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				_callback<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #000066; font-weight: bold;">else</span>
			<span style="color: #009900;">&#123;</span>
				_callback<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The approach described here can be used also when using <em>API Bridge</em> from other languages, as <strong>Flash Lite</strong> or <strong>Java ME</strong>. Anyway, when working with <strong>Flash Lite</strong>, in the scenario where API Bridge is not yet installed, you will incur in the <a href="http://discussion.forum.nokia.com/forum/showthread.php?t=136572"><strong>typical (and horrible) error popups</strong></a>, that will inform you (and so the user) that the network call failed.</p>
<p>How to use the code above? First, define a callback:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> pollApiBridgeCallback<span style="color: #009900;">&#40;</span>apiBridgeInstalled<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>apiBridgeInstalled<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;API Bridge is already installed on the device&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">else</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">confirm</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;You have to install API Bridge to continue, press OK to download it&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			widget.<span style="color: #660066;">openURL</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'http://www.yourserver.com/APIBridge_v1_1.sis'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Then, just <strong>call the pollApiBridgeServer() method</strong> by passing a reference to this callback:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">pollApiBridgeServer<span style="color: #009900;">&#40;</span>pollApiBridgeCallback<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Pros and cons</h3>
<p>Using one of the two approaches discussed above as some important <strong>advantages</strong> over the <em>standard API Bridge deployment mechanism</em>:</p>
<ul>
<li>You don&#8217;t have to <strong>build</strong> a SIS package</li>
<li>You don&#8217;t have to <strong>sign</strong> your application to distribute it</li>
<li>You will <strong>save money</strong> <img src='http://www.jappit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<p>On the other side, these approaches have the main drawback on the <strong>user-experience</strong> side, since your users could be asked to <strong>download and install an additional component</strong> when they start to use your application. Anyway, this event will happen only once at most, so it could be considered <strong>reasonable</strong> in most scenarios.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2010/02/18/deploying-api-bridge-apps-the-easy-way-the-delayed-deploy-model/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>API Bridge version 1.1: plug-in creation package released!</title>
		<link>http://www.jappit.com/blog/2010/02/11/api-bridge-version-1-1-plug-in-creation-package-released/</link>
		<comments>http://www.jappit.com/blog/2010/02/11/api-bridge-version-1-1-plug-in-creation-package-released/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 18:32:58 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[cool stuff]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[web runtime]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[apibridge]]></category>
		<category><![CDATA[flash lite]]></category>
		<category><![CDATA[forumnokia]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=1186</guid>
		<description><![CDATA[The announced new version of API Bridge is out! With the new 1.1 release it is finally possible to create custom plugins that access all the Symbian functionalities, so practically opening up the doors to a new generation of Flash Lite, Web Runtime and Java ME applications. Start downloading the new release from Forum Nokia: [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.jappit.com/blog/2010/02/11/platform-services-and-api-bridge-features-differences-and-advantages/">announced new version</a> of <a href="http://wiki.forum.nokia.com/index.php/APIBridge_Web_Runtime_API">API Bridge</a> is out! With the new <a href="http://www.forum.nokia.com/info/sw.nokia.com/id/d697a64f-ddae-4937-8151-be157b542d26/ApiBridge.html">1.1 release</a> it is finally possible to <strong>create custom plugins that access all the Symbian functionalities</strong>, so practically opening up the doors to a <strong>new generation of Flash Lite, Web Runtime and Java ME applications</strong>.</p>
<p><a href="http://www.jappit.com/blog/wp-content/apibridge_custom_plugins2.png"><img class="alignnone size-full wp-image-1192" title="apibridge custom plugins" src="http://www.jappit.com/blog/wp-content/apibridge_custom_plugins2.png" alt="" width="620" height="400" /></a></p>
<p>Start downloading the new release from <strong>Forum Nokia</strong>: <a href="http://www.forum.nokia.com/info/sw.nokia.com/id/d697a64f-ddae-4937-8151-be157b542d26/ApiBridge.html">API Bridge release 1.1</a>.</p>
<p>Then, check out this informative <a href="http://wiki.forum.nokia.com/">Wiki</a> articles, that explain <strong>how to build a new, custom plugin and how to use it</strong> from JavaScript:</p>
<ul>
<li><a title="APIBridge Plug-in API" href="http://wiki.forum.nokia.com/index.php/APIBridge_Plug-in_API">APIBridge Plug-in API</a></li>
<li><a title="Creating APIBridge JavaScript Binding Code" href="http://wiki.forum.nokia.com/index.php/Creating_APIBridge_JavaScript_Binding_Code">Creating APIBridge JavaScript Binding Code</a></li>
</ul>
<p>For more information about <strong>API Bridge</strong>, check out its <a href="http://www.forum.nokia.com/Tools_Docs_and_Code/Tools/Extensions/APIBridge/">Forum Nokia page</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2010/02/11/api-bridge-version-1-1-plug-in-creation-package-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Platform Services and API Bridge: features, differences and advantages</title>
		<link>http://www.jappit.com/blog/2010/02/11/platform-services-and-api-bridge-features-differences-and-advantages/</link>
		<comments>http://www.jappit.com/blog/2010/02/11/platform-services-and-api-bridge-features-differences-and-advantages/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 10:28:51 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[flash lite]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[apibridge]]></category>
		<category><![CDATA[forum nokia]]></category>
		<category><![CDATA[forumnokia]]></category>
		<category><![CDATA[platform services]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=1159</guid>
		<description><![CDATA[If you&#8217;re developing applications for Nokia devices, and more specifically Web Runtime, Flash Lite or Java ME applications, you probably already had to deal with the platform limitations, and with the tools and libraries that allow to go beyond these limitations by adding more capabilities. Basically, when you want to extend the functionalities of a [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re developing applications for <a title="Nokia" href="http://www.nokia.com">Nokia devices</a>, and more specifically <a title="Web Runtime" href="http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/">Web Runtime</a>, <a title="Flash IDE" href="http://www.adobe.com/products/flash/">Flash Lite</a> or <a title="Java ME" href="http://java.sun.com/javame/index.jsp">Java ME applications</a>, you probably already had to <strong>deal with the platform limitations</strong>, and with the tools and libraries that allow to go beyond these limitations by adding more capabilities.</p>
<p>Basically, when you want to <strong>extend the functionalities of a WRT widget or a Flash Lite application</strong>, you have two options:</p>
<ul>
<li><a title="Nokia Platform Services" href="http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C.html">Platform Services</a></li>
<li><a title="APIBridge" href="http://www.forum.nokia.com/info/sw.nokia.com/id/d697a64f-ddae-4937-8151-be157b542d26/ApiBridge.html">API Bridge</a></li>
</ul>
<p>Both of them provide a set of <strong>tools and libraries</strong> that, added to your applications, allow them to access <strong>more functionalities than the ones that each technology naively supports</strong>.</p>
<p><a href="http://www.jappit.com/blog/wp-content/apibridge_platformservices_scheme.png"><img class="alignnone size-full wp-image-1179" title="api bridge platform services scheme" src="http://www.jappit.com/blog/wp-content/apibridge_platformservices_scheme.png" alt="" width="620" height="450" /></a></p>
<p>So, <strong>which approach is the best one</strong>? It&#8217;s not easy to give a unique answer to this question, so let&#8217;s go into details.</p>
<h3>Ease of use</h3>
<p>The <strong>Platform Services</strong> library is available from <strong>more time</strong>, and there&#8217;s a <strong>well established set of resources and code examples</strong> that will help you to quickly get your functionalities ready and running.The primary source of information is <a title="Platform Services" href="http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C.html">Forum Nokia Library</a>, that has a detailed references of APIs and useful sample code. Then, also <a title="Forum Nokia Wiki" href="http://wiki.forum.nokia.com/">Forum Nokia Wiki</a> provides an extensive set of examples that cover all the possible usage scenarios. Even if there is some little parts where this information could be improved, you shouldn&#8217;t get much in trouble when using Platform Services in your application.</p>
<p><strong>API Bridge</strong> is a fresher technology, released on <strong>November 2009</strong>, and so it&#8217;s <strong>harder to find complete documentation</strong> and usage examples. Anyway, <a href="http://www.forum.nokia.com">Forum Nokia</a> released a set of libraries for various platforms (<a title="Flash Lite API Bridge Interface" href="http://wiki.forum.nokia.com/index.php/Flash_Lite_API_Bridge_Interface">Flash Lite</a>, <a href="http://wiki.forum.nokia.com/index.php/APIBridge_Web_Runtime_API">Web Runtime</a> and <a title="J2ME Api Bridge Interface" href="http://wiki.forum.nokia.com/index.php/J2ME_Api_Bridge_Interface">Java ME</a>) that will definitely help in starting to use API Bridge.</p>
<h3>Device support</h3>
<p><strong>Platform Services</strong> are fully supported starting from <a href="http://www.forum.nokia.com/devices/matrix_s60_5ed_1.html">S60 5th edition devices</a>, but are also compatible with a subset of <a href="http://www.forum.nokia.com/devices/matrix_s60_3ed_fp2_1.html">S60 3rd edition Feature Pack 2</a> devices: the full list of supported devices is available here: <a href="http://www.forum.nokia.com/devices/matrix_webruntime1_1_1.html">Web Runtime 1.1 compatible devices</a>. This means that you can use them only on the touch screen Nokia devices.</p>
<p>On the other side, <strong>API Bridge</strong> can work on all devices starting from <a href="http://www.forum.nokia.com/devices/matrix_s60_3ed_fp1_1.html">S60 3rd edition Feature Pack 1</a> onwards, so meaning:</p>
<ul>
<li><a href="http://www.forum.nokia.com/devices/matrix_s60_3ed_fp1_1.html">S60 3rd edition Feature Pack 1</a></li>
<li><a href="http://www.forum.nokia.com/devices/matrix_s60_3ed_fp2_1.html">S60 3rd edition Feature Pack 2</a></li>
<li><a href="http://www.forum.nokia.com/devices/matrix_s60_5ed_1.html">S60 5th edition</a></li>
</ul>
<h3>Available features</h3>
<p>Current Platform Services (version 1.0) allow to access a wide set of features:</p>
<ul>
<li><strong>Application Management</strong></li>
<li><strong>Calendar</strong></li>
<li><strong>Contacts</strong></li>
<li><strong>Landmarks</strong></li>
<li><strong>Location</strong></li>
<li><strong>Logging</strong></li>
<li><strong>Media Management</strong></li>
<li><strong>Messaging</strong></li>
<li><strong>Sensors</strong></li>
<li><strong>System Information</strong></li>
</ul>
<p>It is currently available also a <a href="http://www.forum.nokia.com/info/sw.nokia.com/id/cccea743-f4e5-418f-ad9f-0a7a7f50868f/Nokia_Platform_Services_2_0.html">beta release of Platform Services 2.0</a>, that adds to this features&#8217; set also the access to the device <strong>camera</strong>.</p>
<p><strong>API Bridge</strong>, instead, has a more limited set of functionalities, currently including:</p>
<ul>
<li>Capture of <strong>photos, videos and audio</strong> streams</li>
<li><strong>Files uploading</strong></li>
<li><strong>Files reading</strong></li>
<li><strong>Image resizing</strong></li>
<li><strong>Location</strong></li>
<li><strong>Logging</strong></li>
<li><strong>Media Management</strong></li>
</ul>
<h3>Supported technologies</h3>
<p><strong>Platform Services</strong> are currently available for <strong>Flash Lite and Web Runtime</strong> applications.</p>
<p><strong>API Bridge</strong> libraries have been released for <strong>Flash Lite, Web Runtime and Java ME</strong>. Generally speaking, the API Bridge engine, working as a <strong>local HTTP server</strong> running on the device, is <strong>accessible from all technologies</strong>.</p>
<h3>Overall considerations</h3>
<p>The current implementation of <a href="http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C.html">Platform Services</a> and <a href="http://www.forum.nokia.com/info/sw.nokia.com/id/d697a64f-ddae-4937-8151-be157b542d26/ApiBridge.html">API Bridge</a> don&#8217;t allow to decide which approach is the best one, and there is no need to do it anyway. Right now, if you&#8217;re working in <strong>Flash Lite or Web Runtime</strong>, and as long as your set of target devices support them, you can <strong>benefit of both technologies</strong>, including the two libraries in your application.</p>
<p>Talking about <strong>future perspectives</strong> of both approaches, we can see both of them evolving in <strong>more mature products</strong>.</p>
<p><a href="http://www.forum.nokia.com/info/sw.nokia.com/id/cccea743-f4e5-418f-ad9f-0a7a7f50868f/Nokia_Platform_Services_2_0.html">Platform Services 2.0</a> is already available as a beta release, so you can already start experimenting with the new APIs and features, including the access to the device camera. On the other side, <strong>API Bridge</strong> promises to allow everyone to <strong>create custom plugins</strong>, through the <strong>ECOM interface</strong>, as reported on <a href="http://blogs.forum.nokia.com/blog/forum-nokia-web-talks/2009/11/05/web-runtime-apibridge">Forum Nokia Blogs</a>.</p>
<p>Concluding, <strong>Platform Services</strong>, with the already mature and features-rich library, surely represents a simpler approach for <strong>developers who don&#8217;t want to deal with Symbian building and packaging</strong>, while <strong>API Bridge</strong>, with its plugin architecture becoming mature and open to developers, could definitely end up to be the best ally to <strong>allow widgets and Flash Lite apps access more and more features</strong>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2010/02/11/platform-services-and-api-bridge-features-differences-and-advantages/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to use Nokia API Bridge in Flash Lite with FDT</title>
		<link>http://www.jappit.com/blog/2010/02/09/how-to-use-nokia-api-bridge-in-flash-lite-with-fdt/</link>
		<comments>http://www.jappit.com/blog/2010/02/09/how-to-use-nokia-api-bridge-in-flash-lite-with-fdt/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 22:58:20 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[flash lite]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[web runtime]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[apibridge]]></category>
		<category><![CDATA[aptana]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[fdt]]></category>
		<category><![CDATA[forumnokia]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=1141</guid>
		<description><![CDATA[API Bridge is a Symbian engine that exposes a set of native functionalities to Web Runtime, Flash Lite and Java ME applications. Nokia has recently released an ActionScript library that allows to easily integrate APIBridge functionalities in a Flash Lite application. In this article I&#8217;ll try to explain how to setup and develop a Flash [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Nokia API Bridge" href="http://www.forum.nokia.com/info/sw.nokia.com/id/d697a64f-ddae-4937-8151-be157b542d26/ApiBridge.html">API Bridge</a> is a Symbian engine that exposes a set of native functionalities to <a title="Web Runtime" href="http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/">Web Runtime</a>, <a title="Adobe Flash Lite" href="http://www.adobe.com/products/flash/">Flash Lite</a> and <a title="Java ME" href="http://java.sun.com/javame/index.jsp">Java ME</a> applications. <a href="http://www.nokia.com">Nokia</a> has recently released an <a title="Flash Lite API Bridge Interface" href="http://wiki.forum.nokia.com/index.php/Flash_Lite_API_Bridge_Interface">ActionScript library</a> that allows to easily <strong>integrate APIBridge functionalities in a Flash Lite application</strong>.</p>
<p>In this article I&#8217;ll try to explain <strong>how to setup and develop a Flash Lite application that uses APIBridge, by using <a title="FDT" href="http://www.fdt.powerflasher.com">FDT</a></strong>.</p>
<p>If you want to know <strong>how to configure FDT</strong> (and Eclipse) to properly develop Flash Lite application, you should read this article: <a title="Web Runtime and Flash Lite integrated development on Eclipse " href="http://www.jappit.com/blog/2010/02/08/web-runtime-and-flash-lite-integrated-development-on-eclipse/">Web Runtime and Flash Lite integrated development on Eclipse</a>.</p>
<h3>Setup the project in FDT</h3>
<p>First of all, you need to <strong>download the API Bridge FlashLite library</strong> from Forum Nokia: <a class="external text" title="http://www.forum.nokia.com/piazza/wiki/images/2/23/APIBridge_FlashLiteCode.zip" rel="nofollow" href="http://www.forum.nokia.com/piazza/wiki/images/2/23/APIBridge_FlashLiteCode.zip">API Bridge Flash Lite Library and Sample Code</a>. The package also contains useful sample code that will definitely help.</p>
<p>Now, <strong>create a new Flash Lite project within Eclipse</strong>.</p>
<p>Then, <strong>open up the API Bridge package</strong> downloaded from Forum Nokia, and <strong>copy the &#8220;si/&#8221; folder to the &#8220;src/&#8221; folder of your Flash Lite project</strong>.</p>
<p>Once copied, you should notice some errors in your FDT project, as shown in the picture below.</p>
<p><a href="http://www.jappit.com/blog/wp-content/fdt_apibridge_mx_errors.png"><img class="alignnone size-full wp-image-1142" title="fdt apibridge mx errors" src="http://www.jappit.com/blog/wp-content/fdt_apibridge_mx_errors.png" alt="" width="306" height="342" /></a></p>
<p>These <strong>errors are due to the &#8220;mx.*&#8221; package</strong>, that is not included in the ActionScript classes shipped with FDT. To solve this error, you have to tell FDT where to find these classes.</p>
<p>First, let&#8217;s <strong>copy these classes</strong> from the Flash IDE to a dedicated folder:</p>
<ol>
<li>Create a folder called &#8220;mx_package/&#8221; somewhere on your machine</li>
<li>Go into &#8220;&lt;FLASH_IDE_PATH&gt;\en\First Run\Classes\&#8221; folder</li>
<li>Copy the &#8220;mx/&#8221; folder inside the &#8220;mx_package/&#8221; folder created above</li>
</ol>
<p>Now, <strong>configure FDT</strong>:</p>
<ol>
<li>Go into <em>&#8220;Window&#8221; -&gt; &#8220;Preferences&#8221; -&gt; &#8220;FDT&#8221; -&gt; &#8220;Core Libraries&#8221;</em>, open the <em>&#8220;Path variables&#8221;</em> panel and select <em>&#8220;New&#8230;&#8221;</em></li>
<li>Enter <em>&#8220;MX_PACKAGE&#8221;</em> as name, and select the &#8220;mx_package/&#8221; created above as folder</li>
<li>Once done, your <strong>Core Libraries</strong> should look similar to the picture below</li>
</ol>
<p><a href="http://www.jappit.com/blog/wp-content/fdt_apibridge_corelibraries1.png"><img class="size-full wp-image-1144 alignnone" title="fdt core libraries configuration" src="http://www.jappit.com/blog/wp-content/fdt_apibridge_corelibraries1.png" alt="" width="606" height="289" /></a></p>
<p>Now, what remains to do is to <strong>add the MX library to the Flash Lite project</strong>. Go into the project&#8217;s properties and, in the <em>&#8220;FDT Build Path&#8221;</em> section, select <em>&#8220;Add Linked Library&#8230;&#8221; -&gt; &#8220;Add&#8230;&#8221;</em> and pick <em>&#8220;MX_PACKAGE&#8221;</em>.</p>
<p><a href="http://www.jappit.com/blog/wp-content/fdt_apibridge_buildpath.png"><img class="size-full wp-image-1145 alignnone" title="fdt apibridge project build path" src="http://www.jappit.com/blog/wp-content/fdt_apibridge_buildpath.png" alt="" width="608" height="216" /></a></p>
<p>Done this, all the errors should have gone away from the project. <strong>Hurrah</strong>! <img src='http://www.jappit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Patching the mx.utils.Delegate class</h3>
<p>The <strong>MTASC compiler</strong> is stricter than the compiler you can find within the Flash IDE. For this reason, the <strong>mx.utils.Delegate class</strong> needs to be slightly modified in order to make it <strong>properly compile</strong> with MTASC.</p>
<p>Specifically, the <em>&#8216;create()&#8217; function</em> needs to be adjusted as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> create<span style="color: #66cc66;">&#40;</span>obj:<span style="color: #0066CC;">Object</span>, func:<span style="color: #000000; font-weight: bold;">Function</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #000000; font-weight: bold;">Function</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> f = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">target</span> = <span style="color: #0066CC;">arguments</span>.<span style="color: #0066CC;">callee</span>.<span style="color: #0066CC;">target</span>;
		<span style="color: #000000; font-weight: bold;">var</span> func2 = <span style="color: #0066CC;">arguments</span>.<span style="color: #0066CC;">callee</span>.<span style="color: #006600;">func</span>;
		<span style="color: #b1b100;">return</span> func2.<span style="color: #0066CC;">apply</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">target</span>, <span style="color: #0066CC;">arguments</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>;
	f.<span style="color: #0066CC;">target</span> = obj;
	f.<span style="color: #006600;">func</span> = func;
	<span style="color: #b1b100;">return</span> f;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h3>Patching the si.apibridge.APIBridge class</h3>
<p>For the same reasons explained above, also the <strong>si.apibridge.APIBridge class needs to be patched</strong> to work with MTASC.  To do this, open APIBridge.as and <strong>replace the setPort() function</strong> with this one:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">	<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setPort<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>: <span style="color: #0066CC;">Void</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> portVars:<span style="color: #0066CC;">LoadVars</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">LoadVars</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		portVars.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span> portPath <span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #000000; font-weight: bold;">var</span> pushErrorDelegate : <span style="color: #000000; font-weight: bold;">Function</span> = Delegate.<span style="color: #006600;">create</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, pushError<span style="color: #66cc66;">&#41;</span>;
&nbsp;
		portVars.<span style="color: #0066CC;">onLoad</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span> success <span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>success<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">var</span> portData:<span style="color: #0066CC;">String</span> = portVars.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				portData = portData.<span style="color: #0066CC;">substr</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,portData.<span style="color: #0066CC;">indexOf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;=&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>portData<span style="color: #66cc66;">&#41;</span>;
				APIBridge.<span style="color: #006600;">BridgeURL</span> += portData; 
&nbsp;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">else</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Error loading Port&quot;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">// The data didn't load</span>
				pushErrorDelegate<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;1&quot;</span>,<span style="color: #ff0000;">&quot;Error loading port, using default 9080&quot;</span><span style="color: #66cc66;">&#41;</span>;
				APIBridge.<span style="color: #006600;">BridgeURL</span> += <span style="color: #ff0000;">&quot;9080&quot;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Once done, just create a <a title="Web Runtime and Flash Lite integrated development on Eclipse " href="http://www.jappit.com/blog/2010/02/08/web-runtime-and-flash-lite-integrated-development-on-eclipse/">new MTASC launch configuration</a> and check that the project properly compiles. If it doesn&#8217;t, re-check the steps above.</p>
<h3>Using API Bridge Call Log service in Flash Lite</h3>
<p>Now, we&#8217;ll see <strong>how to use an API Bridge service</strong>, the Call Log one, in Flash Lite.</p>
<p>First, let&#8217;s create the <strong>main project&#8217;s class</strong>. In this example I&#8217;ll call it <em>&#8216;MainMovie&#8217;</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jappit</span>.<span style="color: #006600;">flashlite</span>.<span style="color: #006600;">apibridgetest</span>.<span style="color: #006600;">Logger</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jappit</span>.<span style="color: #006600;">flashlite</span>.<span style="color: #006600;">apibridgetest</span>.<span style="color: #006600;">CallLogRetriever</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> com.<span style="color: #006600;">jappit</span>.<span style="color: #006600;">flashlite</span>.<span style="color: #006600;">apibridgetest</span>.<span style="color: #006600;">MainMovie</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> main<span style="color: #66cc66;">&#40;</span>container : <span style="color: #0066CC;">MovieClip</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Void</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">Stage</span>.<span style="color: #0066CC;">align</span> = <span style="color: #ff0000;">&quot;TL&quot;</span>;
		<span style="color: #0066CC;">Stage</span>.<span style="color: #0066CC;">scaleMode</span> = <span style="color: #ff0000;">&quot;noScale&quot;</span>;
		container.<span style="color: #0066CC;">createTextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;tf&quot;</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">360</span>, <span style="color: #cc66cc;">500</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">textField</span> : <span style="color: #0066CC;">TextField</span> = container<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;tf&quot;</span><span style="color: #66cc66;">&#93;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>The <strong>TextField</strong> instance will be <strong>used to show the events retrieved from the device logs</strong>. Now, let&#8217;s create a <strong>separate class, <em>EventsLogRetriever</em>, that will take care of calling APIBridge</strong>, and of managing its responses. Its constructor is defined to accept a TextField as argument, and it will use it to print out the API Bridge response.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Delegate</span>;
<span style="color: #0066CC;">import</span> si.<span style="color: #006600;">apibridge</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> com.<span style="color: #006600;">jappit</span>.<span style="color: #006600;">flashlite</span>.<span style="color: #006600;">apibridgetest</span>.<span style="color: #006600;">EventsLogRetriever</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">textField</span> : <span style="color: #0066CC;">TextField</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> EventsLogRetriever<span style="color: #66cc66;">&#40;</span>_textField : <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">textField</span> = _textField;
	<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Now, it&#8217;s time to define the method that will call the API Bridge engine. Each <strong>call to an API Bridge</strong> interface must typically define <strong>two handlers</strong>: <strong>a success and a failure handler</strong>. The <strong>error handler receives a single argument</strong>, containing the data of the occurred error. About the <strong>success handler</strong>, it receives three arguments:</p>
<ol>
<li><strong>the transaction ID</strong>, that must be used to uniquely identify the transaction that is calling the handler (useful in scenarios where multiple transactions are active concurrently)</li>
<li><strong>the event ID</strong>, that identify the state of the event</li>
<li>an object containing <strong>data returned by the API Bridge call</strong></li>
</ol>
<p>Said that, the <em>EventsLogRetriever</em> class will end up containing these 3 methods:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> retrieveEvents<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Void</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onApiError<span style="color: #66cc66;">&#40;</span>outParam : <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Void</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onApiSuccess<span style="color: #66cc66;">&#40;</span>transactionID:<span style="color: #0066CC;">Number</span>, eventID:<span style="color: #0066CC;">String</span>, outParam:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Starting with the <strong>retrieveEvents() method</strong>, it has to:</p>
<ul>
<li><strong>instantiate APIBridge</strong>, passing a reference to the error handler as argument</li>
<li>grab a <strong>reference to the Logging service</strong></li>
<li>define which <strong>kind of log events</strong> it wants to retrieve</li>
<li>call the <strong>GetList() service method</strong></li>
</ul>
<p>So, the <em>retrieveEvents()</em> can be implemented as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> retrieveEvents<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> _onApiError : <span style="color: #000000; font-weight: bold;">Function</span> = Delegate.<span style="color: #006600;">create</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, onApiError<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> _onApiSuccess : <span style="color: #000000; font-weight: bold;">Function</span> = Delegate.<span style="color: #006600;">create</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, onApiSuccess<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> bridge:APIBridge = <span style="color: #000000; font-weight: bold;">new</span> APIBridge<span style="color: #66cc66;">&#40;</span>_onApiError<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> logging = bridge.<span style="color: #006600;">Service</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Service.Logging&quot;</span>, <span style="color: #ff0000;">&quot;IDataSource&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #0066CC;">textField</span>.<span style="color: #0066CC;">text</span>  = <span style="color: #ff0000;">&quot;Retrieving phone numbers ...&quot;</span> + APIBridge.<span style="color: #006600;">BridgeURL</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> filter = <span style="color: #66cc66;">&#123;</span>EventType:<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> inParams = <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">Type</span>:<span style="color: #ff0000;">&quot;Log&quot;</span>, Filter:filter<span style="color: #66cc66;">&#125;</span>;
&nbsp;
	logging.<span style="color: #006600;">GetList</span><span style="color: #66cc66;">&#40;</span>inParams, _onApiSuccess<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Coming to the <strong>error handler</strong>, let&#8217;s just implement it to make it <strong>show the returned error data</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onApiError<span style="color: #66cc66;">&#40;</span>outParam : <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">textField</span>.<span style="color: #0066CC;">text</span>  = <span style="color: #ff0000;">&quot;APIBridge error &quot;</span> + outParam.<span style="color: #006600;">ErrorCode</span> + <span style="color: #ff0000;">&quot; &quot;</span> + outParam.<span style="color: #006600;">ErrorMessage</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Now, the <strong>success handler</strong>. First, it has to <strong>check if the returned API Bridge data contains an error</strong>, and this can be done with the same logic used in the error handler above. If no errors are detected, the handler can <strong>retrieve the actual returned data</strong>, contained in <strong>outParam.ReturnValue</strong>, and loop all the returned log events.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onApiSuccess<span style="color: #66cc66;">&#40;</span>transactionID : <span style="color: #0066CC;">Number</span>, eventID : <span style="color: #0066CC;">String</span>, outParam : <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">textField</span>.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Results: &quot;</span> + outParam.<span style="color: #006600;">ReturnValue</span>.<span style="color: #0066CC;">length</span> + <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> ;
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>outParam.<span style="color: #006600;">ErrorCode</span> <span style="color: #66cc66;">!</span>= <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">textField</span>.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Error: &quot;</span> + outParam.<span style="color: #006600;">ErrorCode</span> + <span style="color: #ff0000;">&quot;, &quot;</span> + outParam.<span style="color: #006600;">ErrorMessage</span>;
		<span style="color: #b1b100;">return</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> outList = outParam.<span style="color: #006600;">ReturnValue</span>;
		<span style="color: #000000; font-weight: bold;">var</span> outputEntry = <span style="color: #000000; font-weight: bold;">null</span>;
		<span style="color: #b1b100;">do</span>
		<span style="color: #66cc66;">&#123;</span>
			outputEntry = outList.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">!</span>= outputEntry<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #0066CC;">textField</span>.<span style="color: #0066CC;">text</span> += outputEntry.<span style="color: #006600;">Direction</span> + <span style="color: #ff0000;">&quot;: &quot;</span> +
					outputEntry.<span style="color: #006600;">Description</span> + <span style="color: #ff0000;">&quot;, &quot;</span> +
					outputEntry.<span style="color: #006600;">PhoneNumber</span>;
&nbsp;
				<span style="color: #0066CC;">textField</span>.<span style="color: #0066CC;">text</span> += <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">else</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">break</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Done this, the <em>EventsLogRetriever</em> is ready to be used, and to do this it&#8217;ll be enough to add this two lines to the static() method of the MainMovie class:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> retriever : EventsLogRetriever = <span style="color: #000000; font-weight: bold;">new</span> EventsLogRetriever<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">textField</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
retriever.<span style="color: #006600;">retrieveEvents</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>That&#8217;s all!</p>
<h3>Build and deploy</h3>
<p>Once the Flash Lite app is ready, just <strong>build it using the MTASC launch configuration</strong> created before.</p>
<p>Now the tough part: to make the whole thing work, it is necessary to package the Flash Lite application with the API Bridge engine. To do this, there are various options:</p>
<ol>
<li><strong>Build a Flash Lite launcher in Symbian C++</strong>. These <a title="Forum Nokia Wiki" href="http://wiki.forum.nokia.com/">Forum Nokia Wiki</a> articles explain how this can be done:
<ul>
<li><a href="http://wiki.forum.nokia.com/index.php/How_to_make_Flash_launcher_with_Symbian_C%2B%2B">How to make Flash launcher with Symbian C++</a></li>
<li><a href="http://wiki.forum.nokia.com/index.php/Create_Flash_Applications_with_Carbide.c%2B%2B">Create Flash Applications with Carbide.c++</a></li>
</ul>
</li>
<li><strong>Package the Flash Lite application in a WRT widget</strong>, and then package it with the API Bridge engine. This approach is described in these articles:
<ul>
<li><a title="How to use FDT and Aptana to create a Flash Lite enabled WRT widget " href="http://www.jappit.com/blog/2010/02/08/how-to-use-fdt-and-aptana-to-create-a-flash-lite-enabled-wrt-widget/">How to use FDT and Aptana to create a Flash Lite enabled WRT widget</a>: explains how to package Flash Lite in a WRT widget</li>
<li><a title="Build your first Web Runtime widget with APIBridge " href="http://www.jappit.com/blog/2010/02/03/build-your-first-web-runtime-widget-with-apibridge/">Build your first Web Runtime widget with APIBridge</a>: explains how to package a WRT widget with the API Bridge engine</li>
</ul>
</li>
</ol>
<p>Both the approaches can equally work, so feel free to choose the one you prefer <img src='http://www.jappit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Once deployed on a device, just run it, and you should see this:</p>
<p>1) The Flash Lite app starts, and the <strong>API Engine is initialized</strong></p>
<p><a href="http://www.jappit.com/blog/wp-content/fdt_apibridge_deploy1.png"><img class="size-full wp-image-1150 alignnone" title="fdt apibridge sample deploy step 1" src="http://www.jappit.com/blog/wp-content/fdt_apibridge_deploy1.png" alt="" width="360" height="287" /></a></p>
<p>2) The API Bridge engine <strong>asks the user for permission to access sensitive data</strong></p>
<p><a href="http://www.jappit.com/blog/wp-content/fdt_apibridge_deploy2.png"><img class="size-full wp-image-1151 alignnone" title="fdt apibridge sample deploy step 2" src="http://www.jappit.com/blog/wp-content/fdt_apibridge_deploy2.png" alt="" width="360" height="308" /></a></p>
<p>3) And here are the <strong>retrieved log events</strong>!</p>
<p><a href="http://www.jappit.com/blog/wp-content/fdt_apibridge_deploy3.png"><img class="size-full wp-image-1152 alignnone" title="fdt apibridge sample deploy step 3" src="http://www.jappit.com/blog/wp-content/fdt_apibridge_deploy3.png" alt="" width="360" height="261" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2010/02/09/how-to-use-nokia-api-bridge-in-flash-lite-with-fdt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use FDT and Aptana to create a Flash Lite enabled WRT widget</title>
		<link>http://www.jappit.com/blog/2010/02/08/how-to-use-fdt-and-aptana-to-create-a-flash-lite-enabled-wrt-widget/</link>
		<comments>http://www.jappit.com/blog/2010/02/08/how-to-use-fdt-and-aptana-to-create-a-flash-lite-enabled-wrt-widget/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 22:04:33 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[flash lite]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web runtime]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[aptana]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[fdt]]></category>
		<category><![CDATA[flashlite]]></category>
		<category><![CDATA[forumnokia]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=1095</guid>
		<description><![CDATA[We&#8217;ve seen, in this previous post, how to setup Eclipse in order to develop both Web Runtime widgets and Flash Lite applications, thanks to Aptana, the Nokia Web Runtime plugin and FDT. This article will focus on how to create a Web Runtime widget that includes some Flash Lite content. First of all, be sure [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve seen, <a title="Web Runtime and Flash Lite integrated development on Eclipse " href="http://www.jappit.com/blog/2010/02/08/web-runtime-and-flash-lite-integrated-development-on-eclipse/">in this previous post</a>, how to setup <a title="Eclipse" href="http://www.eclipse.org/">Eclipse</a> in order to develop both <a title="Web Runtime" href="http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/">Web Runtime widgets</a> and <a title="Adobe Flash Lite" href="http://www.adobe.com/products/flash/">Flash Lite applications</a>, thanks to <strong>Aptana, the Nokia Web Runtime plugin and FDT</strong>. This article will focus on <strong>how to create a Web Runtime widget that includes some Flash Lite content</strong>.</p>
<p>First of all, be sure to have installed all the required Eclipse plugins, as described <a title="Web Runtime and Flash Lite integrated development on Eclipse Web Runtime and Flash Lite integrated development on Eclipse " href="http://www.jappit.com/blog/2010/02/08/web-runtime-and-flash-lite-integrated-development-on-eclipse/">here</a>.</p>
<h3>Create a new Web Runtime widget</h3>
<p>To create a Web Runtime widget, just open up the &#8220;New Project&#8221; wizard and select the <strong>&#8220;New Nokia Web Runtime Widget&#8221;</strong>.</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_new_wrt_project.png"><img title="eclipse new wrt project" src="http://www.jappit.com/blog/wp-content/eclipse_new_wrt_project.png" alt="" width="513" height="75" /></a></p>
<p>The wizard will now let you choose from some predefined widget templates. In this article, it is enough to <strong>start with an empty widget</strong>.</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_new_wrt_project_type.png"><img title="eclipse new wrt project type" src="http://www.jappit.com/blog/wp-content/eclipse_new_wrt_project_type.png" alt="" width="512" height="112" /></a></p>
<p>And finally <strong>enter the name and identifier of your new widget</strong>. The identifier has to be a string in the reverse domain format, and will uniquely identify your own widget.</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_new_wrt_project_settings.png"><img title="eclipse new wrt project settings" src="http://www.jappit.com/blog/wp-content/eclipse_new_wrt_project_settings.png" alt="" width="506" height="274" /></a></p>
<p>Once created, the <strong>widget&#8217;s structure</strong> should be the one shown below.</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_wrt_empty_widget.png"><img class="alignnone size-full wp-image-1119" title="eclipse wrt empty widget structure" src="http://www.jappit.com/blog/wp-content/eclipse_wrt_empty_widget.png" alt="" width="316" height="175" /></a></p>
<h3>Create the Flash Lite content</h3>
<p>First, create a new Flash Lite project by using the <strong>&#8220;New Flash Project&#8221;</strong> template. Then, create the project&#8217;s main class. One example is the <em>MainMovie</em> class shown below:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> com.<span style="color: #006600;">jappit</span>.<span style="color: #006600;">flashlitetest1</span>.<span style="color: #006600;">MainMovie</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> MainMovie<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> main<span style="color: #66cc66;">&#40;</span>container : <span style="color: #0066CC;">MovieClip</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Void</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">Stage</span>.<span style="color: #0066CC;">align</span> = <span style="color: #ff0000;">&quot;TL&quot;</span>;
		<span style="color: #0066CC;">Stage</span>.<span style="color: #0066CC;">scaleMode</span> = <span style="color: #ff0000;">&quot;noScale&quot;</span>;
		container.<span style="color: #0066CC;">createTextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;tf&quot;</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">100</span>, <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #000000; font-weight: bold;">var</span> tf : <span style="color: #0066CC;">TextField</span> = container<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;tf&quot;</span><span style="color: #66cc66;">&#93;</span>;
		tf.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;I'm the Flash Lite content!&quot;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h4>Changing the MTASC launch configuration</h4>
<p>Now, the <a title="MTASC" href="http://www.mtasc.org/">MTASC </a> command has to be changed a bit, so that the generated SWF will automatically end up in the Web Runtime widget project&#8217;s folder.</p>
<p>To do this, <strong>open up the MTASC launch configuration</strong>, and change the generated SWF path to be a <strong>subpath of your widget&#8217;s main folder</strong>. You can see an example of the command in the picture below.</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_fdt_mtasc_arguments.png"><img class="alignnone size-full wp-image-1102" title="eclipse fdt mtasc arguments" src="http://www.jappit.com/blog/wp-content/eclipse_fdt_mtasc_arguments.png" alt="" width="584" height="152" /></a></p>
<p>Now, <strong>run the project launch configuration</strong>, and check the widget&#8217;s folder: the SWF generated by MTASC should be there, together with the other widget&#8217;s files.</p>
<h3>Including the SWF content in your widget</h3>
<p><a title="Forum Nokia Wiki" href="http://wiki.forum.nokia.com/">Forum Nokia Wiki</a> has a comprehensive article explaining the possible ways of <a title="How to package Flash content in a Widget" href="http://wiki.forum.nokia.com/index.php/How_to_package_Flash_content_in_a_Widget">integrating Flash content into a Web Runtime widget</a>. In this article the first described approach, the same used on the Web, is implemented.</p>
<p>So, take the widget&#8217;s <strong>index.html file</strong>, and add this HTML code:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">object</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;MyFlash&quot;</span> <span style="color: #000066;">classid</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;200&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;200&quot;</span> <span style="color: #000066;">codebase</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;align&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;allowScriptAccess&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sameDomain&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;loop&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;quality&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;high&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;wmode&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;opaque&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;bgcolor&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#ffffff&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;src&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;default_mtasc.swf&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;name&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Finish&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;embed <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;MyFlash&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;application/x-shockwave-flash&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;200&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;200&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;default_mtasc.swf&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Finish&quot;</span> <span style="color: #000066;">bgcolor</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#ffffff&quot;</span> wmode<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;opaque&quot;</span> quality<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;high&quot;</span> menu<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;false&quot;</span> loop<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;false&quot;</span> allowscriptaccess<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sameDomain&quot;</span> <span style="color: #000066;">align</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;middle&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span>embed&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">object</span>&gt;</span></pre></div></div>

<h4>Packaging and deploying</h4>
<p>If all went well, all is ready to be packaged and deployed.</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_wrt_project_buildoptions.png"><img class="alignnone size-full wp-image-1129" title="eclipse wrt project build options" src="http://www.jappit.com/blog/wp-content/eclipse_wrt_project_buildoptions.png" alt="" width="307" height="101" /></a></p>
<p>Right click the project, choose &#8220;Package widget&#8221;, deploy and <strong>enjoy</strong>! <img src='http://www.jappit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.jappit.com/blog/wp-content/flashlite_enabled_widget_deployed1.png"><img class="alignnone size-full wp-image-1134" title="flashlite enabled widget deployed" src="http://www.jappit.com/blog/wp-content/flashlite_enabled_widget_deployed1.png" alt="" width="480" height="478" /></a></p>
<p>You can download the widget built in this article here: <a href="http://www.jappit.com/uploads/wrt/FlashLiteEnabledWidget.wgz">Flash Lite enabled WRT sample widget</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2010/02/08/how-to-use-fdt-and-aptana-to-create-a-flash-lite-enabled-wrt-widget/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Web Runtime and Flash Lite integrated development on Eclipse</title>
		<link>http://www.jappit.com/blog/2010/02/08/web-runtime-and-flash-lite-integrated-development-on-eclipse/</link>
		<comments>http://www.jappit.com/blog/2010/02/08/web-runtime-and-flash-lite-integrated-development-on-eclipse/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 15:51:31 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[cool stuff]]></category>
		<category><![CDATA[flash lite]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web runtime]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[aptana]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[fdt]]></category>
		<category><![CDATA[flashlite]]></category>
		<category><![CDATA[forumnokia]]></category>
		<category><![CDATA[mtasc]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=1074</guid>
		<description><![CDATA[Nokia devices offer a wide range of technologies and languages that can be used to create mobile applications. Two of these are strictly related each other, and can be used together to create applications that benefit of both sides: Flash Lite and Web Runtime. For this reason, in this article I&#8217;ll try to explain how [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Nokia" href="http://www.nokia.com">Nokia</a> devices offer a <strong>wide range of technologies and languages</strong> that can be used to create mobile applications. Two of these are strictly related each other, and can be used together to create applications that benefit of both sides: <a title="Adobe Flash Lite" href="www.adobe.com/products/flashlite">Flash Lite</a> and <a title="Web Runtime" href="http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/">Web Runtime</a>.</p>
<p>For this reason, in this article I&#8217;ll try to explain how to setup <strong>a single environment that may allow development on both technologies</strong>, so leveraging the development phase from continuous swaps between different IDEs, and by boosting it all thanks to the powerful <a title="Eclipse" href="http://www.eclipse.org/">Eclipse</a> platform.</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_fdt_aptana_overall1.png"><img class="alignnone size-full wp-image-1139" title="eclipse fdt aptana overall" src="http://www.jappit.com/blog/wp-content/eclipse_fdt_aptana_overall1.png" alt="" width="600" height="139" /></a></p>
<h3>Installing Eclipse and plugins</h3>
<p>First of all, <a title="Eclipse downloads" href="http://www.eclipse.org/downloads/">download Eclipse</a>. I currently use <strong>version 3.5</strong> on my own machine, but other versions should work as well.</p>
<p>Once downloaded, proceed installing the following plugins:</p>
<ol>
<li><a href="http://www.aptana.org">Aptana</a> plugin for Eclipse: <a href="http://www.aptana.org/studio/plugin">http://www.aptana.org/studio/plugin</a></li>
<li><a title="Web Runtime" href="http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/">Web Runtime</a> plugin for Aptana: <a href="http://tools.ext.nokia.com/wrt/prod/aptana/plugin/">http://tools.ext.nokia.com/wrt/prod/aptana/plugin/</a></li>
<li><a href="http://www.fdt.powerflasher.com">FDT</a> plugin for Eclipse: <a href="http://www.fdt.powerflasher.com/developer-tools/fdt-3/download/">http://www.fdt.powerflasher.com/developer-tools/fdt-3/download/</a></li>
</ol>
<p>After you&#8217;ve installed the above plugins, you&#8217;ll notice <strong>two new project types</strong> in your Eclipse project wizard: <strong>Flash and Nokia Web Runtime</strong> projects.</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_wizard_new_project.png"><img class="alignnone size-full wp-image-1076" title="Eclipse new project wizard " src="http://www.jappit.com/blog/wp-content/eclipse_wizard_new_project.png" alt="" width="508" height="504" /></a></p>
<p>Basically, these 3 plugins are all you need to start developing both Web Runtime and Flash Lite applications. Anyway, <strong>FDT needs some further configuration steps</strong> to properly work with Flash Lite apps.</p>
<h3>Configure the FDT plugin</h3>
<p>FDT needs to know <strong>how to compile your Flash Lite projects</strong>. You basically have two choices: use the <a href="http://www.adobe.com/products/flash/">Adobe Flash IDE</a>, or use <a title="MTASC" href="http://www.mtasc.org/">MTASC</a>.</p>
<ul>
<li>The first choice is available <strong>if you have already installed a copy of a <a title="Flash IDE" href="http://www.adobe.com/products/flash/">Flash IDE</a></strong>, and can be configured by going into the <em>&#8220;Window&#8221; -&gt; &#8220;Preferences&#8221; -&gt; &#8220;FDT&#8221; -&gt; &#8220;Tools&#8221; -&gt; &#8220;Flash&#8221;</em> settings panel. Once there, just <strong>enter the paths of your Flash IDE and Player</strong>.</li>
</ul>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_fdt_flash_settings.png"><img class="alignnone size-full wp-image-1082" title="eclipse fdt flash settings" src="http://www.jappit.com/blog/wp-content/eclipse_fdt_flash_settings.png" alt="" width="633" height="329" /></a></p>
<ul>
<li>The second one, <strong>quicker and free</strong>, needs <a title="MTASC" href="http://www.mtasc.org/">MTASC</a> to be installed on your machine (<a title="MTASC" href="http://www.mtasc.org/">you can get it here</a>), and configured in the <em>&#8220;Window&#8221; -&gt; &#8220;Preferences&#8221; -&gt; &#8220;FDT&#8221; -&gt; &#8220;Tools&#8221; -&gt; &#8220;MTASC&#8221;</em> panel. I actually prefer this option, as it allows you to develop Flash Lite applications also on machines where the Flash IDE is not available.</li>
</ul>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_fdt_mtasc_settings.png"><img class="alignnone size-full wp-image-1083" title="eclipse fdt mtasc settings" src="http://www.jappit.com/blog/wp-content/eclipse_fdt_mtasc_settings.png" alt="" width="632" height="334" /></a></p>
<h4>Add Flash Lite-specific classes and functions</h4>
<p>FDT uses the standard ActionScript 2 classes to allow you to compile your Flash Lite project. Anyway, these <strong>lack some Flash Lite-specific classes and functions</strong>, as <strong>ExtendedKey</strong> and <strong>SharedObject.addListener()</strong> method, that have to be manually added, as also explained <a href="http://www.blocketpc.com/2009/07/05/flash-lite-extendedkey-y-sharedobject-en-eclipse-con-fdt/">here</a>.</p>
<p>To do this, <strong>go into the <em>&#8220;&lt;ECLIPSE_ROOT_FOLDER&gt;\configuration\com.powerflasher.fdt.core\.config\core\as2\&#8221;</em> folder</strong> and:</p>
<ol>
<li>Create a file called <strong>&#8220;ExtendedKey.as&#8221;</strong> with this content:

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">intrinsic <span style="color: #000000; font-weight: bold;">class</span> ExtendedKey
<span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> SOFT1:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;soft1&quot;</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> SOFT2:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;soft2&quot;</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> SOFT3:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;soft3&quot;</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> SOFT4:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;soft4&quot;</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> SOFT5:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;soft5&quot;</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> SOFT6:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;soft6&quot;</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> SOFT7:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;soft7&quot;</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> SOFT8:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;soft8&quot;</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> SOFT9:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;soft9&quot;</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> SOFT10:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;soft10&quot;</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> SOFT11:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;soft11&quot;</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> SOFT12:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;soft12&quot;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

</li>
<li>Open <strong>&#8220;SharedObject.as&#8221;</strong> and add these lines to the class definition:

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> scope : <span style="color: #0066CC;">Object</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> GetMaxSize<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Number</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">addListener</span><span style="color: #66cc66;">&#40;</span>objectName:<span style="color: #0066CC;">String</span>, notifyFunction:<span style="color: #000000; font-weight: bold;">Function</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Void</span>;
<span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">removeListener</span><span style="color: #66cc66;">&#40;</span>objectName:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Void</span>;</pre></div></div>

</li>
<li>Now, <strong>switch to the <em>&#8220;&lt;ECLIPSE_ROOT_FOLDER&gt;\configuration\com.powerflasher.fdt.core\.config\topLevel\&#8221;</em> folder</strong>, open <strong>TopLevel.as</strong>, and add this function definition:

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> fscommand2<span style="color: #66cc66;">&#40;</span>command:<span style="color: #0066CC;">String</span>, parameters:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span>;</pre></div></div>

</li>
</ol>
<ul></ul>
<p><strong>If you plan to use MTASC</strong> to compile your Flash Lite applications, the above changes have to be performed also to the <strong>ActionScript files used by </strong><strong>MTASC</strong> itself. These files are typically placed in the <em>&#8220;&lt;MTASC_ROOT_FOLDER&gt;\std&#8221;</em> folder: go there and repeat the 3 steps above for <em>ExtendedKey.as, SharedObject.as </em>and <em>TopLevel.as</em>.</p>
<p>That&#8217;s all! Now let&#8217;s give FDT a quick test to check if all is correctly configured.</p>
<h3>Testing the FDT configuration</h3>
<p>Creating a new Flash Lite project is straightforward: just <strong>select &#8220;New Flash project&#8221; from the Eclipse project wizard</strong>, and then choose a name for your project. In the Project Language section, be sure to <strong>select &#8220;ActionScript 2&#8243;</strong>.</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_fdt_new_project_settings.png"><img class="alignnone size-full wp-image-1088" title="eclipse fdt new project settings" src="http://www.jappit.com/blog/wp-content/eclipse_fdt_new_project_settings.png" alt="" width="505" height="285" /></a></p>
<p>Once the project has been created, <strong>switch to the &#8220;Flash FDT&#8221; perspective</strong> by selecting &#8220;Window&#8221; -&gt; &#8220;Open perspective&#8221; -&gt; &#8220;Flash FDT&#8221;.</p>
<p>Now, <strong>create the project&#8217;s main class</strong>. The only required method to be implemented is the static main(), that has to perform all the initialization operations:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> com.<span style="color: #006600;">jappit</span>.<span style="color: #006600;">flashlitetest1</span>.<span style="color: #006600;">MainMovie</span>
<span style="color: #66cc66;">&#123;</span>
  <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> MainMovie<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#123;</span>
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> main<span style="color: #66cc66;">&#40;</span>container : <span style="color: #0066CC;">MovieClip</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Void</span>
  <span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">Stage</span>.<span style="color: #0066CC;">align</span> = <span style="color: #ff0000;">&quot;TL&quot;</span>;
    <span style="color: #0066CC;">Stage</span>.<span style="color: #0066CC;">scaleMode</span> = <span style="color: #ff0000;">&quot;noScale&quot;</span>;
    container.<span style="color: #0066CC;">createTextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;tf&quot;</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">100</span>, <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #000000; font-weight: bold;">var</span> tf : <span style="color: #0066CC;">TextField</span> = container<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;tf&quot;</span><span style="color: #66cc66;">&#93;</span>;
    tf.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Hello World&quot;</span>;
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Now, if the FDT configuration was properly done, you shouldn&#8217;t get any errors. So, if all is ok, <strong>open the &#8220;Run Configurations&#8230;&#8221; panel</strong> from the &#8220;Run&#8221; menu.</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_fdt_run_configurations.png"><img class="alignnone size-full wp-image-1090" title="eclipse fdt run configurations" src="http://www.jappit.com/blog/wp-content/eclipse_fdt_run_configurations.png" alt="" width="365" height="199" /></a></p>
<p>Under &#8220;FDT MTASC&#8221; <strong>create a new launch configuration</strong>. In the &#8220;Main&#8221; sub-panel select the main class created just above.</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_fdt_run_configurations1.png"></a><a href="http://www.jappit.com/blog/wp-content/eclipse_fdt_new_launch_configuration.png"><img class="alignnone size-full wp-image-1092" title="eclipse fdt new launch configuration" src="http://www.jappit.com/blog/wp-content/eclipse_fdt_new_launch_configuration.png" alt="" width="609" height="199" /></a></p>
<p>Then, go to the &#8220;Miscellaneous&#8221; sub-panel and <strong>check the &#8220;Start SWF after compilation&#8221; option</strong>. This way, the SWF will be immediately launched, after each build, in the <strong>Eclipse&#8217;s internal SWF viewer</strong>.</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_fdt_new_launch_configuration_miscellaneous.png"><img class="alignnone size-full wp-image-1096" title="eclipse fdt new launch configuration miscellaneous" src="http://www.jappit.com/blog/wp-content/eclipse_fdt_new_launch_configuration_miscellaneous.png" alt="" width="610" height="184" /></a></p>
<p>Now, <strong>all is ready</strong> to be tested: just <strong>run the created launch configuration</strong>, and enjoy your new Flash Lite app <img src='http://www.jappit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_fdt_internal_swf_viewer.png"><img class="alignnone size-full wp-image-1097" title="eclipse fdt internal swf viewer" src="http://www.jappit.com/blog/wp-content/eclipse_fdt_internal_swf_viewer.png" alt="" width="466" height="264" /></a></p>
<p>And here&#8217;s the generated SWF <strong>running on a real device</strong>:</p>
<p><a href="http://www.jappit.com/blog/wp-content/eclipse_fdt_device_deploy.png"><img class="alignnone size-full wp-image-1100" title="eclipse fdt device deploy" src="http://www.jappit.com/blog/wp-content/eclipse_fdt_device_deploy.png" alt="" width="250" height="517" /></a></p>
<h3>What&#8217;s next?</h3>
<p>Next tutorials will focus on using both Web Runtime and FDT plugins to develop <strong>Flash Lite-enabled widgets</strong>. So, stay tuned!</p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2010/02/08/web-runtime-and-flash-lite-integrated-development-on-eclipse/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Build your first Web Runtime widget with APIBridge</title>
		<link>http://www.jappit.com/blog/2010/02/03/build-your-first-web-runtime-widget-with-apibridge/</link>
		<comments>http://www.jappit.com/blog/2010/02/03/build-your-first-web-runtime-widget-with-apibridge/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 16:37:08 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[cool stuff]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web runtime]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[apibridge]]></category>
		<category><![CDATA[forum nokia]]></category>
		<category><![CDATA[forumnokia]]></category>
		<category><![CDATA[hello world]]></category>
		<category><![CDATA[wrt]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=918</guid>
		<description><![CDATA[This article shows you how to create, compile, build and deploy a Web Runtime widget, that includes the APIBridge plugin developed by Nokia, and available on Forum Nokia website. The APIBridge is a Symbian C++ engine that exposes native functionalities to Web Runtime widgets. These functionalities include: Uploading files. Capturing video, image, and audio. Reading files. [...]]]></description>
			<content:encoded><![CDATA[<p>This article shows you <strong>how to create, compile, build and deploy a <a title="Web Runtime" href="http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/">Web Runtime widget</a></strong>, that includes the <a title="APIBridge" href="http://www.forum.nokia.com/info/sw.nokia.com/id/d697a64f-ddae-4937-8151-be157b542d26/ApiBridge.html">APIBridge plugin</a> developed by <a title="Nokia" href="http://www.nokia.com">Nokia</a>, and available on <a title="Forum Nokia" href="http://www.forum.nokia.com">Forum Nokia website</a>.</p>
<p>The APIBridge is a <strong>Symbian C++ engine that exposes native functionalities to Web Runtime widgets</strong>. These functionalities include:</p>
<ul>
<li><strong>Uploading </strong>files.</li>
<li><strong>Capturing </strong>video, image, and audio.</li>
<li><strong>Reading </strong>files.</li>
<li><strong>Resizing </strong>images.</li>
</ul>
<p>Before starting with the following steps, you have to <a title="Download APIBridge" href="http://www.forum.nokia.com/info/sw.nokia.com/id/d697a64f-ddae-4937-8151-be157b542d26/ApiBridge.html">download APIBridge from Forum Nokia website</a>, and <strong>unpack it</strong> to a convenient location on your machine.</p>
<p>Also, to compile and build the whole example, you must <strong>get one UID</strong> from your <a title="Symbian Signed" href="http://www.symbiansigned.com">SymbianSigned</a> account.</p>
<h3>Step 1. Prepare your widget</h3>
<p>The first step is to <strong>develop your own widget</strong>, and to package it into the <strong>standard WGZ format</strong>. You can develop the widget with the tools of your choice.</p>
<p>In this tutorial, I&#8217;ll just build a <strong>simple &#8220;Hello World&#8221; widget</strong> with the <a title="WRT Plugin for Aptana" href="http://www.forum.nokia.com/Tools_Docs_and_Code/Tools/Runtimes/Web_Runtime/Aptana_Plugin/">WRT Plugin for Aptana Studio</a>. You can read a full guide about creating from scratch a simple widget on <a title="Creating HelloWRT" href="http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-7CFBB6AD-82E6-45B0-9722-F4CDE9C6A8F0.html">Forum Nokia Library</a>.</p>
<p>Using the Aptana Wizard interface, let&#8217;s create a <strong>new &#8220;Nokia Web Runtime Widget&#8221;</strong>.</p>
<p><a href="http://www.jappit.com/blog/wp-content/aptana_wizard_new_widget.png"><img class="alignnone size-full wp-image-923" title="Creating a new WRT widget in Aptana wizard" src="http://www.jappit.com/blog/wp-content/aptana_wizard_new_widget.png" alt="" width="506" height="320" /></a></p>
<p>Now, let&#8217;s <strong>customize the &#8220;index.html&#8221; file with your Hello World text</strong>.</p>
<p><a href="http://www.jappit.com/blog/wp-content/aptana_apibridge_indexhtml.png"><img class="alignnone size-full wp-image-924" title="Customizing the index.html" src="http://www.jappit.com/blog/wp-content/aptana_apibridge_indexhtml.png" alt="" width="567" height="252" /></a></p>
<p>So, the test <strong>widget is ready to be packaged</strong>!</p>
<p><a href="http://www.jappit.com/blog/wp-content/apibridge_build_widget1.png"><img class="alignnone size-full wp-image-938" title="Building a WRT widget in Aptana" src="http://www.jappit.com/blog/wp-content/apibridge_build_widget1.png" alt="" width="311" height="267" /></a></p>
<h3>Step 2. Compiling APIBridge source code</h3>
<p>Now, take the folder where you have unpacked APIBridge, and <strong>make a copy of its WgzInstaller folder</strong>. We&#8217;ll use this copy to create the new widget installer.</p>
<p><strong>Note: to perform this step, you must already have your own UID</strong>.</p>
<p>Now, perform these changes:</p>
<ol>
<li>Open the <em>group\WgzInstaller.mmp</em> file, and replace the fake UID <strong>0&#215;12345678</strong> with your own</li>
<li>In the <em>src\WgzInstaller.cpp file</em> file, replace the <strong>KWidgetInstallerFileName</strong> with the actual <strong>filename of your packaged widget</strong></li>
</ol>
<p>Now <strong>all is ready to compile your source code</strong>. Go into the <em>group\</em> folder and, from command line, run:</p>
<pre>bldmake bldfiles
abld build gcce</pre>
<p>If you don&#8217;t get any errors, the APIBridge code shoud have been correctly compiled.</p>
<h3>Step 3. Customize and package</h3>
<p>Now, copy your packaged widget to the <em>content/</em> folder. Done this, open the <em>/sis/WgzInstaller_template.pkg</em> file and <strong>set the appropriate values for these properties</strong>:</p>
<ul>
<li> Application name</li>
<li> Installation UID</li>
<li> Vendor name</li>
<li> .wgz file name</li>
</ul>
<p>Since we&#8217;re <strong>building from command line</strong>, we also have to tell where makesis can actually find the <em>WgzInstaller.exe </em>file created in the previous step. In this tutorial, I&#8217;ve used the <strong>S60 5th edition SDK v1.0</strong>, so I&#8217;ll change this value:</p>
<p><em>&#8220;$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\WgzInstaller.exe&#8221;</em></p>
<p>to</p>
<p><em>&#8220;\S60\devices\S60_5th_Edition_SDK_v1.0\Epoc32\release\gcce\urel\WgzInstaller.exe&#8221;</em></p>
<p>Now, let&#8217;s create the SIS file: <strong>from command prompt, go into the <em>sis/ </em>folder and run</strong>:</p>
<pre>makesis WgzInstaller_template.pkg</pre>
<p>Your <strong>output should be something like this</strong>:</p>
<pre>Processing WgzInstaller_template.pkg...
Created  WgzInstaller_template.sis.</pre>
<h3>Step 4. Sign and deploy</h3>
<p>Take the SIS file you&#8217;ve created in the previous step, and <strong>sign it with your own SymbianSigned certificate</strong>:</p>
<p>signsis WgzInstaller_template.sis WgzInstaller_template_signed.sis your_certificate.cer your_key.key your_password</p>
<p>Now, your widget is ready! Just <strong>send it to your Nokia device, and install</strong>. You&#8217;ll notice that, during the installation, you&#8217;ll be <strong>prompted to install both your widget and the APIBridge engine</strong>.</p>
<p><a href="http://www.jappit.com/blog/wp-content/apibridge_helloworld_installation.png"><img class="alignnone size-full wp-image-930" title="Installation of APIBridge Hello World widget" src="http://www.jappit.com/blog/wp-content/apibridge_helloworld_installation.png" alt="" width="571" height="272" /></a></p>
<p>Below you can see the <strong>Hello World widget running in all its glory</strong> <img src='http://www.jappit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.jappit.com/blog/wp-content/apibridge_helloworld.png"><img class="alignnone size-full wp-image-929" title="APIBridge HelloWorld widget" src="http://www.jappit.com/blog/wp-content/apibridge_helloworld.png" alt="" width="250" height="517" /></a></p>
<p>Thanks go to <a title="Leonardo Risuleo" href="http://www.leonardorisuleo.info/blog/">Leonardo</a> for his precious support! <img src='http://www.jappit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2010/02/03/build-your-first-web-runtime-widget-with-apibridge/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

