So, apparently the webapp we did, that uses websockets, does not work on the Samsung Galaxy S3 stock Android browser. The thing is, Android Browser is not supposed to have web sockets support, but it looks like this one has, although the websockets don't work, the connection takes forever and never succeeds. Our webapp has a fallback for Android Browser, that uses a flash websockets implementation, in case the user has flash installed, but since it detects websockets are supported on the S3, it does not use the fallback.
Did anybody experienced the same kind of problems ? Does anyone know what version of websockets the S3 browser implements ? (even the WebSocket.org echo test fails)
I had the same issue with SGS 3 like you and also we had flash fallback. The problem is that other androids return for us undefined
when you call window.WebSocket
BUT SGS3 doesn't. So we solved this issue with window.WebSocket = undefined;
. So our flash fallback began to work.
It seems like Android's default browser implements the WebSocket
API, but it's doing nothing. However (at least on my S2+), there's no CLOSING
property in WebSocket
, so you could use the following function to detect if WebSockets are actually supported:
websocketSupported = function() {
if(typeof WebSocket === 'undefined') {
return false;
}
return 'CLOSING' in WebSocket.prototype;
} ();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With