today my problem is that I am developing an app that is using a WebSocket. On iOS everything is working out fine but on android the WebView doesn’t support the WebSocket. Whats the fastest/most elegant way to solve this problem?
[edit]
As this post is viewed quite often I want to share some possible solutions.
Solutions:
- Java Websocket Client Implementation & JavaScript Interface
- PHP Websocket Client Implementation & making a background (i.e. jQuery GET) request to the PHP-script (worked for me as I wanted to send only one line of message.)
Android Websocket Libraries
Someone had the same issue and descriped how he worked around
Android webview doesn’t accommodate WebSocket. So you need to implement with some WebSocket library.
jWebSocket
http://jwebsocket.org/
weberknecht
http://code.google.com/p/weberknecht/