You Are Here:

Web Runtime Technology Overview

Register Today

Register with Forum Nokia now and you'll enjoy the full benefits of the Forum Nokia membership.

Register Login
Forum Nokia Events

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


View all
 


Web Developer’s Library
The Web Developer’s Library provides a comprehensive reference source for information on all aspects of WRT widgets — from their structure and content to details of the S60 JavaScript objects.

Information on support for onKeyPress key event handling
Early versions of S60 Browser 7.1, for selected S60 3rd Edition, Feature Pack 2 and all S60 5th Edition devices from Nokia, were released without support for onKeyPress to capture select and navigation key events. This Knowledge Base entry provides details on how to address this issue.

 

Standards-based, platform-integrated

Web Runtime (WRT) widgets are developed using standard web technologies that you are familiar with from having created sites for browsing with PC browsers.

However, new features have been designed to allow your widgets to work optimally on S60 devices. These features are:

  • Additional JavaScript™ objects to enable tight integration with the S60 platform UI and its services. Access to S60 services is now available on selected S60 3rd Edition, Feature Pack 2 and all S60 5th Edition devices from Nokia.
  • Support for delivering your widgets in multiple languages.

Components of a WRT widget

A WRT widget must contain the following files:

  • info.plist — which defines the widget’s properties and configuration.
  • <name>.html — which is a file of standard HTML defining the layout and content of the widget.

All but the most basic widgets will also include some or all of the following files:

  • icon.png — which is an S60 UI icon for the widget.
  • <name>.css — which is one or more CSS files defining the styles for the widget.
  • <name>.js — which is one or more files of JavaScript code providing the widget with dynamic capabilities.
  • <name>.jpg/bmp/gif/png — which is one or more image files for static images used within the widget.

Home-screen and full-screen widgets

With the launch of the Nokia N97 mobile computer, it became possible to provide a view-only version of a widget in the S60 home screen. A home-screen view can be added to a widget that has the MiniViewEnabled key set in its info.plist file. The widget then needs to determine the screen on which it is being displayed and provide summary or detailed content accordingly.

For more information, see the Developing home screen widgets section of the Web Developer’s Library.

To enable the testing of home screen widgets, the Nokia N97 SDK provides an emulation of the Nokia N97 home screen.

JavaScript objects specific to the S60 platform

WRT provides several JavaScript objects of two types: those designed to allow a widget to offer a user experience that is similar to that offered by S60 devices and those that provide access to device information and data.

JavaScript objects for UI design

There are three JavaScript objects that facilitate the creation of an S60 UI for a widget:

  • Widget object — which provides basic window options, such as setting the display orientation and setting and getting static ‘key’ data.
  • Menu object — which allows access to the S60 ‘Options’ menu.
  • MenuItem object — which allows items to be added to the menu and cascading submenus within ‘Options’.

JavaScript objects for accessing device information

The JavaScript device device object provides the mechanism by which widgets can access and, in some cases, manipulate information about and on devices. The device object, which is delivered in WRT API 1.1, is now available for selected S60 3rd Edition, Feature Pack 2 devices and all S60 5th Edition devices from Nokia. The device object provides access to a number of service APIs:

  • AppManager Service API — which enables obtaining a list of applications on a device as well as the launching of applications and documents.
  • Calendar Service API — which enables Calendar application records to be read, added, updated, deleted, exported and imported.
  • Contacts Service API — which enables Contacts application entries to be read, added, updated, deleted, exported and imported.
  • Landmarks Service API — which enables the landmarks and landmark categories stored on a device to be read, added, updated, deleted, exported, imported, and organised.
  • Location Service API — which enables a device’s location to be retrieved.
  • Logging Service API — which enables a widget to access, add, update, and deleted information to a device’s call-log record.
  • Media Management Service API — which enables the retrieval of information about media on a device.
  • Messaging Service API — which enables a widget to send SMS and MMS messages, delete and change the status of messages, and provide notification of incoming messages.
  • Sensor Service API — which enables a widget to receive information from a device sensor, such as an accelerometer.
  • SystemInfo Service API — which enables retrieval of device information such as language, time, and model.

Now these APIs are even easier to use, with many actions achievable through the addition of only one or two lines of JavaScript code using the Nokia Platform Services 2.0 beta JavaScript API. For example, a new contact can be added to the phone by use of the following code:

contact = { name:{ last:'smith', first: 'john'}};

addContact(contact)

The Platform Services 2.0 beta JavaScript API also offers an API that enables use of a device’s camera.

For more information, visit Nokia Platform Services 2.0 beta page »

Support for multiple languages

The S60 platform supports multiple languages, and the WRT environment provides localisation support as well. If you’re planning to provide widgets to audiences in several countries, you may want to get more information about supporting multiple languages from the Supporting multiple languages section of the Web Developer’s Library.



Rate This

Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
User Rating: qfnZuserE5FratingQNx4E2E0000X
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwwwE2eforumE2enokiaE2ecomE2fTechnologyE5fTopicsE2fWebE5fTechnologiesE2fWebE5fE52untimeE2fTechnologyE5fOverviewE2eE78htmlX qfnZupdatedQDx2009E2d07E2d22X qdcZtypeQUqfnZE45E78cludedFromGeneralE4CistingsQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqfnTypeZE52esourceQ qdcZtypeQUqfnTypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZdistributionQUxhttpE3AE2FE2FforumE2EnokiaE2EcomE2FX qfnZtypeQUqfnTypeZE52esourceQ qfnZtypeQUqfnTypeZWebpageQ qmarsZlanguageQUxhttpE3AE2FE2FswE2EnokiaE2EcomE2FlanguageE2D1E2FenX qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqfnTypeZE52esourceQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqfnTypeZWebpageQ qrdfZtypeQUqrdfsZE52esourceQ qrdfZtypeQUqfnZE45E78cludedFromGeneralE4CistingsQ