WebSocket HTML5 in the phonegap for android
Solution 1
You can give https://github.com/mkuklis/phonegap-websocket a try. The demo app is here: https://bitbucket.org/mkuklis/phonegap-websocket-demo
Solution 2
Websockets are not natively supported in all android browsers. My best guess is to use an Phonegap plugin for websockets.
I suggest you take a look at https://github.com/FreakDev/PhoneGap-Android-HTML5-WebSocket or (an older) https://github.com/anismiles/websocket-android-phonegap
Eldon Lesley
Updated on July 19, 2022Comments
-
Eldon Lesley almost 2 years
I'm developing an HTML5 webapp which requires to use websocket, because the webapp needs to connect to a server(websocket server), all of this time, the webapp is working fine in a desktop browser-Chrome,
But now the web-app needs to be run in smartphones, and android will be the first priority (I don't have any experience developing android app), then I find a solution to build the web-app as an android-app using PhoneGap,
unfortunately, It doesn't support the websocket yet, I found many plugins but they all have their own server(java), what I need is a javascript library that will allow me to have the websocket run normally like it used to be in chrome, to any available ws server (I already made one in .NET using visual studio)
any idea or reference?