Take the 2-minute tour ×

I've been looking at integrating the Android websocket plugin https://github.com/FreakDev/PhoneGap-Android-HTML5-WebSocket for the old Android 2 handsets, but I came to a roadblock when I was trying to write a plugin.xml file for PhoneGap Build.

It came down to: How do I include this line of code?

java WebSocketFactory wsFactory = new WebSocketFactory(appView); appView.addJavascriptInterface(wsFactory, "WebSocketFactory");

It's a requirement for the plugin to run (according to GitHub). Your help is appreciated!

Background: Here's the doc on Build plugins https://build.phonegap.com/docs/plugins and a sample plugin file https://github.com/alunny/pluginstall/blob/master/test/plugin/plugin.xml

share|improve this question

1 Answer 1

up vote 0 down vote accepted

The great team at Adobe Vancouver was able to help me understand this one. So at its current spec, the PhoneGap Build cloud does not yet allow you to access the "activity layer" on specific devices. So for this plugin to work it'll have to be built on the desktop.

But I will keep an eye on this one, since a branch of Cordova has lower-level websocket integration but it will take some fiddling to work around the old Hixie security hole.

share|improve this answer

Your Answer


