Websocket support on Android (Using Fennec)
25 Nov 2010Currently no browser I’ve come across on android has support for websockets. As an android user I found it a bit annoying that iOS now has support built in, so after a bit of hunting I found that this is an active area of development for fennec (firefox) - the code however hasn’t made it into the main repository and is still held as patch files in the bug report. I also have a project lined up that I need mobile websockets support for so I’ve very grateful to the developers working on this.
Now after much blood sweat and tears I managed to patch the current source pulled from the mozilla repository and compile a version of fennec for android. I’m not a fan of mixing patches and version control but I can see why they do it…However while I found this a great hassle, due to my relative unfamiliarity with patching and resolving merge conflicts, I did think to myself how much better it is to be able to quickly compile and deploy an app without having to pay or go through any arcane systems required for the iphone.
I’ve made the compiled binary available for download below and it’s completely without warranty or guarantees it will work. It works for me on my HTC Desire Z (G2 for Americans!) and should work on other ARM7 devices. I may try and compile a version for ARM5/6 tonight. This is a cutting edge development build and will crash, especially if you try to rotate the screen…but after my brief testing websockets appear to work.
Download (ARM7 for HTC Desires et al) fennec-4_0b3pre_en-US_eabi-arm-websockets.apk
Download (ARM5/6 for less cutting edge devices) fennec-4.0b3pre.en-US.eabi-arm5or6-websockets.apk
If you wish to compile this yourself I used patches found in mozilla bugs 537787 and 574897 and compilation instructions in the mozilla wiki although I found the wiki to be a bit pessimistic about how difficult it is to compile the vanilla version.