WebSocket的Android中的WebView [英] WebSocket in Android WebView
问题描述
今天我的问题是,我正在开发一个使用一个WebSocket的一个应用程序。在iOS上一切工作了罚款,但在Android上的WebView不支持WebSocket的。最新最快/最优雅的方式来解决这个问题?
由于这个职位是经常我想分享一些可能的解决方案看。
解决方案:
- 在Java的WebSocket的客户端实现与功放; JavaScript的接口
- 在PHP的WebSocket客户端实现与功放;做一个背景(即jQuery的GET)请求到PHP脚本的(为我工作,我想只发送一条线的消息。)的
机器人的WebSocket库
<醇开始=3>有人有同样的问题,并descriped他是如何工作围绕
的Android的WebView不能容纳的WebSocket。所以,你需要实现一些WebSocket的库。
jWebSocket http://jwebsocket.org/
weberknecht HTTP://$c$c.google.com/p/weberknecht/
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/
这篇关于WebSocket的Android中的WebView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!