GauravBasu / jquery-stream

Automatically exported from code.google.com/p/jquery-stream
0 stars 0 forks source link

Performance on Android 2.x #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi again,

The plugin does not seem to work on Android mobile devices that run android 
version 2 or lower. We have a variety of devices and the connection is great on 
our Samsung Galaxy Tab 10.1, which runs Android 3, and our Google Galaxy Nexus 
phone, running Android 4. Our other devices that run Android 2 seem to not work 
at all.

I will do some testing and try and find out exactly what is going on. Am I 
missing a particular setting or something obvious?

Original issue reported on code.google.com by cookpete...@gmail.com on 22 Mar 2012 at 12:05

GoogleCodeExporter commented 9 years ago
Hello,

First of all, thanks for test! According to your test, it seems it's possible 
to do streaming on Android 3 or later. The reason of problem is that the 
XMLHttpRequest object of Andorid 2 or earlier is insensitive to change of its 
responseText property regardless of the amount of padding. I tested it with 
Samsung Galaxy Tab which runs Andorid 2.2.

You probably can't find a solution for Andorid 2 and earlier with jquery 
stream. 

1. Flash implemention of WebSocket
I don't know much about flash issues on Andorid. But if you use the WebSocket, 
it's possible theoretically to use flash implementation of WebSocket. You can 
get it at https://github.com/gimite/web-socket-js

2. jQuery Socket
If you can afford to spare some time, why don't you make use of the jQuery 
Socket? By implementing the long polling transport in the server side, Android 
2 and earlier maybe can communicate with the server via long polling 
connections. Anyway, it's recommended to replace the jQuery Stream with the 
jQuery Socket for future issues when you have time to do that. You can get it 
at https://github.com/flowersinthesand/jquery-socket

I'm sorry not to ensure both ways. I have problems with test mobile devices.

-- Donghwan

Original comment by flowersi...@gmail.com on 22 Mar 2012 at 2:27

GoogleCodeExporter commented 9 years ago
Hi,

I have found the issue with Android 2.x to be because of a 4KB buffer for 
persistent HTTP connections on the default Android browser. The browser is not 
returning data from the server until the size of information is at least 4KB in 
size. More info at: http://code.google.com/p/android/issues/detail?id=13044

I am now looking into using jQuery Socket, but I could not get it working? I 
tried to set it up using the same parameters as jQuery Stream. Is there 
something I could be missing in the migration?

Original comment by cookpete...@gmail.com on 11 Apr 2012 at 3:59

GoogleCodeExporter commented 9 years ago
Hi,

It's a good thing that a 4K can solve the problem.

Hmm, the required server side processing is slightly different between jquery 
stream and jquery socket. Okay, I'll write about migration on the wiki. By 
then, you can get some help at 
https://github.com/flowersinthesand/jquery-socket/wiki/Server-Side-Processing.

Original comment by flowersi...@gmail.com on 12 Apr 2012 at 3:14