Register with Forum Nokia now and you'll enjoy the full benefits of the Forum Nokia membership.
Register LoginInnovation Series Videos highlighting Forum Nokia developers
Nokia releases new Qt developer offerings
Forum Nokia Developer Conference, India
Optimise your website for mobile devices with mobile web templates and layouts
Creating Debian packages for Maemo Qt applications and showing in the application menu
Jackson Feijó
Read more about Jackson on the Champions website.
MobileMonday Italy: The User Applications
November 23, 2009
Rome
Nokia Developer Days in South Africa
December 01, 2009
Johannesburg, South Africa
Forum Nokia Developer Conference ’09, India
December 07, 2009
Bangalore, India
LeWeb
December 09, 2009
Paris
Web Runtime Coding With Aptana WRT Plug-in
December 09, 2009
9am New York | 2pm London | 4pm Helsinki
WRT widgets enable web developers to deliver their sites or services as highly optimised experiences for S60 devices. This optimisation provides the opportunity to build stronger relationships with customers.
Aptana Studio is a popular tool designed to help web developers deliver content faster and more accurately. The Nokia WRT Plug-in for Aptana Studio provides the tools necessary for developers to efficiently create WRT widgets within Aptana Studio and deliver optimised web experiences to S60 device users faster than ever before.
You should be familiar with Aptana Studio and the development of web pages using technologies such as HTML and JavaScript™. If you’re unfamiliar with Aptana Studio, but would like to explore using the plug-in, visit Aptana.tv, where you’ll find a collection of videos that provide tutorials on using Aptana Studio.
You’ll have Aptana Studio or Aptana Studio Pro 1.2 or later installed on your Microsoft Windows PC or Apple Macintosh computer. The current version can be obtained from the download page on the Aptana website.
The installation procedure is described on the Update Site for Nokia Web Runtime Plug-in for Aptana Studio. Follow these instructions to install the plug-in.
You’re now ready to create a widget. Select File > New > Project from the Aptana Studio menu. The Select a wizard dialogue, shown below, is now displayed. Expand the Nokia Web Runtime (WRT) item (see Figure 1), select New Nokia Web Runtime Widget, and click Next. (You’ll also see an option to import existing WRT widget projects or widget packages into Aptana Studio.)
In the Select a type of project dialogue, select RSS Reader Widget Project and click Next. Give your project a name in the New Nokia Widget Project dialogue. You can click Next to display a dialogue that enables you to set the feed URL and indicate that the widget includes a home-screen view; but for this quick start, click Finish and your WRT widget project will be created.
The content of your project can now be seen in the Project tab, as shown in Figure 2.
You can now modify the code in the example to access your favourite RSS feed. You do this by editing the feedURL variable in the RSSReader.js JavaScript™ code, as shown in Figure 3.
Figure 3: Edit the widget’s JavaScript code to customise the RSS feed displayed.
There are three ways to preview a widget: within Aptana Studio, in an external browser, and, if you’re using a Microsoft Windows PC, in an S60 emulator. Full details of all these options are provided in the Nokia WRT Plug-in for Aptana Studio QuickStart Guide.
To preview the widget within Aptana Studio, open the index.html file and select the Nokia Web Runtime (WRT) tab. It’s possible to preview the widget in the screen resolution and orientation available on various S60 devices. This is done by selecting the Settings cog in the preview window, as shown in Figure 4, to display a list of preview settings options.
Figure 4: The widget preview can be set to match the size and orientation of S60 device screens.
Once the features of the widget have been confirmed and any debugging completed, the widget can be packaged into a *.wgz installation package. To do this, right-click within the project’s tree to open the shortcut menu and select Package Widget. The widget is now packaged and the file placed in the project’s root folder.
The plug-in supports the deployment of *.wgz files to S60 devices over a Bluetooth connection or to an S60 emulator (on Windows PCs only). Before this feature can be used, it’s necessary to select a deployment target. To do this, select Window > Preferences from the Aptana Studio menu, then select Web Runtime > Deployment.
In the Deployment pane (see Figure 5), click Search to scan for available Bluetooth connections. When scanning is complete, click OK and select a device from the Select Device drop-down list.
Figure 5: Widgets can be deployed to an SDK or a device from within Aptana Studio.
Now, to deploy the widget, open the project’s shortcut menu and select Deploy Widget.
The widget installation package is now in your device’s Messaging Inbox, from where it can be opened. This starts the installation process, which follows the same sequence as installing an application. Once installed, the widget will be in your device’s Installations or similar folder, as shown in Figure 6.
Figure 6: The deployed widget is installed and can then be opened from the device’s ‘installation’ folder.
A complete getting started guide to the features of the plug-in is provided in the Nokia WRT Plug-in for Aptana Studio QuickStart Guide. The Web Developer’s Library provides a detailed explanation of the content of WRT widgets and a guide to the available JavaScript™ APIs. You may also wish to view the Designing Web Content and Services for Nokia S60 Devices E-learning, which includes a section on WRT widgets.
You can check out all the web-related resources from the Web Runtime Widgets documentation page.