I'm trying to build a webOS 3.0.2 app using PhoneGap 1.0. I'm doing my best to avoid webOS-specific things, but my app does need to run a javascript service when on a webOS device.
I can't find any documentation on how to create and package a simple JavaScript service in this situation. HP's documentation doesn't mention services when dealing with PhoneGap, and PhoneGap's documentation doesn't mention web开发者_如何学运维OS services at all. The 'Hello World' service described in HP's documentation seems to have been written for webOS 2.0, and pulls in large swaths of webOS-specific code -- exactly what I'mn trying to avoid by using PhoneGap in the first place.
What should I be doing?
node.js-powered services on HP webOS are accessed through the service bus. The PhoneGap 1.0 code on webOS declares a constructor called Service for accessing this bus -- you can see how it's used by looking in the phonegap-1.0.0.js file at definitions of calls like Sms.prototype.send.
精彩评论