Windows Phone 8 Plugins
Windows Phone 8 Plugins
This section provides details for how to implement native plugin code on the Windows Phone platform. Before reading this, see Plugin Development Guide for an overview of the plugin's structure and its common JavaScript interface. This section continues to demonstrate the sample echo plugin that communicates from the Cordova webview to the native platform and back.
Writing a plugin for Cordova on Windows Phone requires a basic understanding of Cordova's architecture. Cordova-WP8 consists of a WebBrowser
that hosts the application's JavaScript code and manages native API calls. You can extend a C# BaseCommand
class (WPCordovaClassLib.Cordova.Commands.BaseCommand
), which comes with most of the functionality you need:
Select your project, and right-click to choose Add → New Item...登录查看完整内容