Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Android 3.0 support WebSockets?

The question is about the default browser.

like image 356
Juriy Avatar asked Mar 16 '11 00:03

Juriy


People also ask

How WebSockets work in Android?

The server receives the message, processes it and responds back to the client with a success or error code. Finally, the connection is closed. For each request or say for 100 requests a new connection or 100 new connections are established and then closed. WebSocket is a bidirectional protocol.

Does mobile support Websockets?

WebSocket, as an IETF standard, and with a W3C browser API, is fully supported by all modern browsers: Chrome 16 + (incl. Chrome for Android)

Are Websockets only for browsers?

Websockets can be used by any client (read: "app"), as long as the client implements the Websocket protocol - no browser (or hybrid) required.

What is WebSocket used for?

The WebSocket API is an advanced technology that makes it possible to open a two-way interactive communication session between the user's browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply.


3 Answers

Android 3.0 highlights doesn't mention anything about websockets.

Running the browser in a 3.0 AVD and going to websocket.org - echo test shows:

enter image description here

If I go to caniuse.com - websockets in mobile and desktop browsers, the page shows "Not supported" for Android 2.1 - 2.3.

websocket browser support

like image 145
typo.pl Avatar answered Sep 27 '22 21:09

typo.pl


Firefox Mobile 8 (https://wiki.mozilla.org/Mobile/Platforms/Android#Download_Aurora) supports WebSockets protocol version 8, draft version 10. It generally behaves exactly as the desktop version. WS works like a charm.

like image 39
oberstet Avatar answered Sep 27 '22 21:09

oberstet


Only android 4.4 kitkat factory default browsers officially support websockets so you can NOT assume that a random device less than android 4.4 has a factory default browser that can support web-sockets As a result when you develop applications using web-view you have to take this in to account. That's why for example in Cordova you may need this plugin to ensure that your web-socket enabled application works in android versions less that 4.4

like image 27
Andreas Avatar answered Sep 27 '22 22:09

Andreas