Question

I am playing with palm emulator, trying to create a simple JavaScript service. Instead of using palm-install method I am creating required directories and files for my service. When I test my service with luna-send it is not recognized (since it is not registered with luna-bus I guess). If I restart the emulator it works.

I would like to know if there is any way to register my service with luna without restarting emulator?

Était-ce utile?

La solution

why dont you send a start service request to create your dirs before using them? And Palm is doing the same way like MediaCapture api(when you start recording, the service will create dirs automatic)

request service is simple:

new Mojo.Service.Request("palm://momo.im.app.service.node/", {
            method: "chatSend",
            parameters: {
                auth: Global.authInfo,
                //chat: JSON.stringify(chat)
                chat: chat
            },
            onSuccess: function() {},
            onFailure: function(fail) {
                Mojo.Log.error('send chat fail' + JSON.stringify(chat));
                Global.keepAuth();
            }
        });

if you still have no idea about how service work, then check out my app source code on github:momo for webOS - node.js service part

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top