Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Palm WebOS implementation of the PhoneGap API
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
framework/www
js
Makefile
README.md

README.md

PhoneGap Palm

PhoneGap Palm is a skeleton Palm webOS application, along with javascript wrapper libraries, which allow a developer to build an application for a Palm webOS device using web technologies. This same code can be built for iPhone, BlackBerry, Symbian, and more to come ...

Pre-requisites

You should have VirtualBox (virtual machine software which runs the Palm emulator) and the webOS SDK installed. Both of these can be found at http://developer.palm.com/index.php?option=com_content&view=article&id=1545.

Set up your environment and install the skeleton app

Open a terminal, and navigate to the root PhoneGap Palm folder (where this readme.md file is located). A Makefile resides here; running make here will package your application, and install it to either the emulator, or the device. Or you can run make on individual target tasks:

  • make js - builds phonegap.js from source javascript files to libs/phonegap.js
  • make copy_js - copies libs/phonegap.js to framework/www/phonegap.js - modify this path if you want phonegap.js in another location
  • make package - builds the webOS app (located in framework/www/) into an webOS .ipk installer package in the phonegap_root/palm/ folder
  • make deploy - installs the .ipk package to a device if detected, otherwise the emulator if its running

If a connected Palm device is detected, the application will be installed to the device. If not, and the emulator is running, the application will be installed to the emulator. To run the emulator, search for Palm Emulator.app in the finder, and run it.

Build your PhoneGap app

Navigate to phonegap_root/palm/framework/www/; this is where your application will reside. If you have already built a phonegap application on another platform, drop your html,js, css and assets into this folder (starting with the required index.html). Don't forget phonegap.js!

Just open framework/www/ in your favourite editor, build your web app, and run the appropriate make command indicated above. Edit appinfo.json to set your app id (see Notes below), version, etc.

Also, your index.html must include palm's mojo library, upon which phonegap.js depends. So, above your inclusion of phonegap.js, you should also have:

<script language="javascript" type="text/javascript" src="/usr/palm/frameworks/mojo/mojo.js" x-mojo-version="1"></script>

The path is where mojo.js is located on the device.

To enable a javascript debug console, open a new terminal window and type: phonegap-log app_id Where the app id is your app id as set in appinfo.json. This will tail your log file; it will default to the device if detected, otherwise it will read logs from the emulator. In your javascript, use debug.log in your javascript.

Notes

  • In order to use the vibration API on palm, your application needs to have a "com.palm.*" namespace, as vibration on webOS is a private API. The caveat of doing this is that you are essentially indicating that your app should pretend to be a "Palm app" (rather than a Nitobi app, for example) ... and as a result your app will be denied from the Palm app catalog.
  • Currently the map.show function can only accept one position, as Palm uses google maps as its native maps application, and it only can take one marker as a parameter.

Helpful Links

  • PhoneGap API Docs: docs.phonegap.com
  • PhoneGap Wiki: phonegap.pbworks.com
  • Palm webOS developer site: developer.palm.com
Something went wrong with that request. Please try again.