1

I am currently sending following luna-send command to detect sms database change:

luna-send -n 2 -a my_app luna://com.palm.db/find '{"query":{"from":"com.palm.smsmessage:1",
"where":[{"prop":"folder","op":"=","val":"inbox}]},"watch":true

The first response returns the existing database data and the second one is delivered when the database is changed.

This works fine, but when I convert this to code for my enyo app, my callback method is not called for the second response. I am using enyo.bind(this, my_callbackmethod). It seems like my callback method is only called once.

Is there any way to get the second response using callback method?

oser
  • 37
  • 4

1 Answers1

0

Hmm, not sure I've ever used watch. What if you use subscribe: true?

Webby Vanderhack
  • 889
  • 7
  • 13
  • I am using watch:true and subscribe:true at the same time, but it doesn't work. – oser Oct 30 '13 at 23:06
  • I am currently using enyo2.0 so that I cannot call PalmService. Thus, I am using PalmServiceBridge directly and passing parameters. Can this cause subscribe function not working? Enyo 1.0 uses makeRequestProps to handle subscribe param saying including subscribe in params directly is not supported. I don't know how to apply this to my custom ServiceRequest which is using PalmServiceBridge directly. – oser Oct 31 '13 at 02:45
  • Hmmm, that is a pickle. The best I can come up with right now is to check to see how Cordova does it. I know their library sets up a subscribe to connection manager. https://github.com/apache/cordova-webos – Webby Vanderhack Oct 31 '13 at 15:46