Dilan Dane
Dilan Dane

Reputation: 41

PhoneGap Android plugins won't load

I've been trying to install and use the ChildBrowser plugin https://github.com/phonegap/phonegap-plugins/tree/master/Android/ChildBrowser for PhoneGap and the FaceBook plugin https://github.com/phonegap/phonegap-plugins/tree/master/Android/ChildBrowser. With both these I've run in to the same issue, the Javascript call to invoke plugin methods won't work. The debug output shows:

TypeError: Result of expression 'window.plugins' [undefined] is not an object.

Is there something I might be missing to enable plugins in PhoneGap?

Upvotes: 4

Views: 2948

Answers (2)

Vidzpra
Vidzpra

Reputation: 1

https://github.com/phonegap/phonegap-plugins/issues/697 says :

"The addPlugin/addConstructor methods were dropped in 2.0.0. Take a look at the ChildBrowser, TTS or VideoPlayer plugin to see how to modify the js code."

Upvotes: 0

codemonkey
codemonkey

Reputation: 5267

Have you included the Javascript file in your index.html? Check that the Javascript file has this -

PhoneGap.addConstructor(function() {
    PhoneGap.addPlugin("childBrowser", new ChildBrowser());
});

Upvotes: 1

Related Questions