View
 

Getting Started with Phonegap Nokia WRT

Page history last edited by wildabeast 2 wks ago

This tutorial provides instruction on setting up PhoneGap for your web application on Symbian S60 devices.

Phonegap for Symbian is dependent upon Nokia's Web Runtime (WRT), which is included on Symbian S60 5th Edition and S60 3rd Ed. FP2.

 

Download the phonegap source from http://github.com/phonegap/phonegap-symbian.wrt.

 

1. Place your web application in the framework/www folder

2. Ensure phonegap.js is included in your main html page

3. Place your application icon in the www folder. It should be named Icon.png

4. Modify info.plist (use the sample as a guide, or refer to Nokia's Web Runtime (WRT))

5. Develop your application around this html file ... only this page will have access to the device api

6. Run make from the root phonegap-symbian.wrt folder (where the Makefile resides). This will produce phonegap-symbian.wrt/app.wgz.

7. Transfer this file to your S60 5th Edition device and open it, or load it into the S60 Emulator.

 

As you can see, you don't need to have any particular tools installed in your development environment to build WRT applications (except Make and a text editor I suppose), as there is no building or compiling involved. However there are tools you can use to make development easier. The combination of Aptana Studio and Nokia's WRT Plug-in for Aptana worked nicely for developing and testing WRT applications. It includes a browser-based javascript emulator, and can deploy applications directly to your device if bluetooth is enabled.

 

Optionally you can use the Symbian S60 Emulator, which is part of the S60 SDK, found here: http://www.forum.nokia.com/info/sw.nokia.com/id/ec866fab-4b76-49f6-b5a5-af0631419e9c/S60_All_in_One_SDKs.html. Windows only.

 

A sample application resides at http://github.com/wildabeast/phonegap-demo which demonstrates the use of various device features through the phonegap API. 

 

Get an overview of the anatomy of a WRT application here. It is essentially just a local website with a couple of rules: you must have an info.plist file and a main html page.

 

Note: a limitation of WRT is that you must define one main html page (defined in info.plist), and this page is the only one which will have access to the device functionality (geolocation, vibration, etc.). You can still use multiple pages, and pages not accessing device functionality will be accessible, but we recommend instead swapping views in and out of the main html page using a local xmlhttprequest, or building a javascript application (swapping views by showing and hiding divs).

Comments (8)

profile picture

Michael Bierman said

at 12:50 pm on Nov 24, 2009

If you use the Nokia WRT plug-in for Aptana Studio the plug-in will take care of packaging the widget (compressing the project) and changing the file extension. the plug-in also provides options to deploy to the S60 Emulator, to an actual device, and provides preview and platform simulation without having to install the Emulator.

profile picture

Martijn Pannevis said

at 2:29 am on Feb 4, 2010

Hi Brian. I just downloaded the latest Edge, but there is no Nokia folder. Is it the one called "symbian.wrt"?
Thanks,
Martijn.

profile picture

suryapavan said

at 11:32 pm on Jul 8, 2010

Hi, I have installed the Nokia WRT plugin for Aptana Studio.
I have created my test app. But, I am unable to send ajax requests using jquery. It gives Cross domain error..
Can anybody tell me how I can interact with server from javascript ? Is there a way I can create an HTTP class in java library and have it available in phonegap js library?

profile picture

wildabeast said

at 3:25 pm on Jul 15, 2010

I believe that is a limitation of the WRT Plugin ... the browser is blocking its requests because it thinks they are cross domain.

If you run your app in the S60 Emulator (part of the Nokia S60 SDK, Windows only), then it should work fine.

profile picture

JITENDRA said

at 11:19 pm on Jul 12, 2010

Hi , I am new to phonegap, please can anybody help me to know how to Use xui.js library for Nokia WRT Symbian.

Also how to use the commands of XUI given in this link ";http://docs.phonegap.com/docs/xui/dom " .
Please can anyone help me get started or any link available with you guys for a beginner.

Waiting for a favorable reply !

profile picture

wildabeast said

at 3:30 pm on Jul 15, 2010

Like BlackBerry, Symbian WRT does not support the document.querySelectorAll method, and so the main xui.js will not work. But Fil has implemented a shim for this, so use the blackberry version of xui (xui-bb-1.0.0.js) located at http://code.google.com/p/xui-js/downloads/list.

For some examples of the use of xui, check out the xui test specs: http://github.com/brianleroux/xui/tree/master/spec/. Each of those html files contains a multitude of xui calls.

profile picture

JITENDRA said

at 3:29 am on Jul 20, 2010

Thanks a lot wildabeast :)

profile picture

JITENDRA said

at 4:12 am on Jul 26, 2010

How to access Calendar and Contacts APIs in PHONEGAP ?

Urgent help needed !

Waiting for a favorable reply.

You don't have permission to comment on this page.