View
 

Getting Started with Phonegap Nokia WRT

Page history last edited by Steve Gill 3 months, 1 week 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/callback/calback-symbian.

 

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).