开发者

How do I create a JavaScript service for a PhoneGap based webOS app?

开发者 https://www.devze.com 2023-03-27 03:40 出处:网络
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'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.

0

精彩评论

暂无评论...
验证码 换一张
取 消