0
votes

I have an android application developed with IBM Worklight, in which a html file is making http request every 5 seconds and fetching the data from the server. Now I wish to replace this with HTML5 web sockets. But I wish to use the Worklight capabilities.

  1. Is there anything like HTTP Adapter in Worklight for web socket?
  2. If not could anyone please give any pointer about how to achieve it in worklight?
1

1 Answers

1
votes

Is there anything like HTTP Adapter in Worklight for web socket?

No. At least to the best of my knowledge.

If not could anyone please give any pointer about how to achieve it in worklight?

Web Sockets are not supported on Android (2.1-4.2): http://caniuse.com/#search=web%20sockets

However, you can try a Cordova Plugin like WebSocket-for-Android. There's a blog post that may help here. I just got those links for a quick Google Search.