Closed GoogleCodeExporter closed 9 years ago
I'm a little premature on this. Still run into an issue in the
WebSocketHandshake class when actually running on Android due to the use of
String.getBytes(Charset) which also wasn't added until API Level 9.
This can be easily replaced with one of the other getBytes options.
Original comment by mmjoh...@gmail.com
on 28 Oct 2011 at 1:13
I will take a look at this over the weekend. Good find!
Original comment by joshuadmorris@gmail.com
on 28 Oct 2011 at 5:28
Could ArrayDeque be replaced by LinkedList instead? For what you're doing it
appears to be a functional equivalent and means there's less dependencies! :)
Original comment by jazzake...@gmail.com
on 1 Nov 2011 at 5:20
That is a great idea. I should have some fixes out by next week.
Original comment by joshuadmorris@gmail.com
on 14 Nov 2011 at 3:14
When do u fix this error?
Original comment by benjamin...@gmail.com
on 27 Jan 2012 at 11:02
Hey, this two patches enables <2.3 support for me. The only task to do is
handling the exceptions. What do u think?
Original comment by benjamin...@gmail.com
on 27 Jan 2012 at 12:40
Attachments:
that looks alright. :)
My only suggestion would be (in WebsocketConection.java) to use:
private Queue<WebSocketFragment> pendingFragments = new LinkedList<WebSocketFragment>();
instead of:
private LinkedList<WebSocketFragment> pendingFragments = new LinkedList<WebSocketFragment>();
because we only need to see the Queue methods of the linked list object.
...Oh, also you will need to adjust usage of the 'utf8Charset' variable in
WebsocketConection.java. (See attached for my quick hack of those files).
Original comment by jazzake...@gmail.com
on 30 Jan 2012 at 3:49
Attachments:
Original comment by joshuadmorris@gmail.com
on 30 Jan 2012 at 9:43
Thank you so much for the patch! It is now checked in. If you are interested,
you can use the http://www.slf4j.org/android/ library for Android. It's great.
Uses the SLF4J facade and just logs to the Android console.
Original comment by joshuadmorris@gmail.com
on 30 Jan 2012 at 10:11
thanks for the link :)
Original comment by jazzake...@gmail.com
on 31 Jan 2012 at 12:13
Thanks, but what are are the advantages regarding the standard Log-class?
Original comment by benjamin...@gmail.com
on 31 Jan 2012 at 9:48
SLF4J gives you a single facade that allows you to plug in most standard log
implementations (Log4J, JDK4, etc) without any code changes. This makes the
code easy to use in a mobile situation or in any other Java platform or
project. There is no real, new whizbangy thing it does though. It's just about
raw portability. :)
Original comment by joshuadmorris@gmail.com
on 31 Jan 2012 at 6:32
Original comment by joshuadmorris@gmail.com
on 31 Jan 2012 at 6:32
Original issue reported on code.google.com by
mmjoh...@gmail.com
on 28 Oct 2011 at 12:43Attachments: