pasine
pasine

Reputation: 11543

PhoneGap + WP7: how to use a plugin

How do I integrate a plugin with PhoneGap on Windows Phone 7?
I've found tutorials for iOS, Android and BlackBerry, but nothing about WP7.
I've put the .cs file in the Plugins folder, but I'm not sure it is enough.

Upvotes: 1

Views: 950

Answers (2)

pasine
pasine

Reputation: 11543

The problem was in the .js file.
PhoneGap is now called Cordova, so the js files of old plugins have to be updated with the new class name.

Upvotes: 0

metalfight - user868766
metalfight - user868766

Reputation: 2750

To integrate a wp7 plugin with phonegap these are the general steps :

  1. Include the plugin definition and js implementation javascrtip file in your html page head section [script type="text/javascript" charset="utf-8" src="myPlugin.js"][/script]

  2. in your code you need to call it like:

    navigator.plugins.myPluginName.myPluginFunction(parameters);

  3. you may need to make few additions in your html as per plugin required.

  4. Also check for entry for myplugin in WMAppManifest.xml

I have used myPlugin as an reference so please replace the name with your actual plugin name.

Hope this help you

~K

Upvotes: 1

Related Questions