Added: cordova/site/public/docs/en/dev/guide/platforms/windows/plugin.html
URL: 
http://svn.apache.org/viewvc/cordova/site/public/docs/en/dev/guide/platforms/windows/plugin.html?rev=1825729&view=auto
==============================================================================
--- cordova/site/public/docs/en/dev/guide/platforms/windows/plugin.html (added)
+++ cordova/site/public/docs/en/dev/guide/platforms/windows/plugin.html Fri Mar 
 2 14:29:10 2018
@@ -0,0 +1,2719 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <meta name="format-detection" content="telephone=no">
+    <meta name="viewport" content="user-scalable=no, initial-scale=1, 
maximum-scale=1, minimum-scale=1, width=device-width" />
+    <meta name="description" content=" ">
+
+    <title>
+        
+            
+                Windows Plugins - Apache Cordova
+            
+        
+    </title>
+
+    <link rel="SHORTCUT ICON" href="/favicon.ico"/>
+
+    
+
+    
+    
+        
+
+        
+    
+
+    <link rel="canonical" 
href="https://cordova.apache.org/docs/en/dev/guide/platforms/windows/plugin.html";>
+
+    <!-- CSS -->
+    <link rel="stylesheet" type="text/css" href="/static/css/main.css">
+    <link rel="stylesheet" type="text/css" href="/static/css/lib/syntax.css">
+    <!-- Algolia Search CSS -->
+    <link rel="stylesheet" 
href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"; />
+
+    <!-- Fonts -->
+    <!-- For attribution information, see www/attributions.html -->
+    <link 
href='https://fonts.googleapis.com/css?family=Raleway:700,400,300,700italic,400italic,300italic'
 rel='stylesheet' type='text/css'>
+
+    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media 
queries -->
+    <!--[if lt IE 9]>
+        <script 
src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js";></script>
+        <script 
src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js";></script>
+    <![endif]-->
+    <script type="text/javascript">
+        var disqus_developer = 1; // this would set it to developer mode
+    </script>
+
+    <!-- JS -->
+    <script defer type="text/javascript" 
src="/static/js/lib/jquery-2.1.1.min.js"></script>
+    <script defer type="text/javascript" 
src="/static/js/lib/bootstrap.min.js"></script>
+    <script defer type="text/javascript" 
src="/static/js/lib/ZeroClipboard.js"></script>
+
+    <script>
+    
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+    
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+    
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+    ga('create', 'UA-64283057-3', 'auto');
+    ga('send', 'pageview');
+</script>
+
+</head>
+
+<body>
+    <header>
+    <a class="scroll-point pt-top" name="top"></a>
+    <nav class="navbar navbar-inverse navbar-fixed-top">
+        <div class="container-fluid">
+            <div class="navbar-header">
+                <button type="button" class="navbar-toggle collapsed" 
data-toggle="collapse" data-target="#navbar" aria-expanded="false" 
aria-controls="navbar">
+                    <span class="sr-only">Toggle navigation</span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                </button>
+                <a class="navbar-brand" href="/"><img id="logo_top" 
src="/static/img/cordova-logo-newbrand.svg"/></a>
+            </div>
+            <div id="navbar" class="navbar-collapse collapse">
+                <div class="nav_bar_center">
+                    <ul class="nav navbar-nav">
+                        <li class="active">
+                            <a href="/docs/en/latest/">Documentation</a>
+                        </li>
+                        <li >
+                            <a href="/plugins">Plugins</a>
+                        </li>
+                        <li >
+                            <a href="/blog" id="blog_button">Blog<span 
class="badge" id="new_blog_count"></span></a>
+                        </li>
+                        <li >
+                            <a href="/contribute">Contribute</a>
+                        </li>
+                        <li>
+                            <a href="/#getstarted">Get Started</a>
+                        </li>
+                        <li>
+                            <form class="navbar-form navbar-right" 
id="header-search-form" role="search">
+                                <div class="input-group">
+                                    
+                                        
+                                    
+                                    <input id="header-search-field" 
type="text" placeholder="Search 'dev' docs..." class="form-control hidden-xs" 
autocomplete="off">
+                                </div>
+                            </form>
+                        </li>
+                    </ul>
+                </div>
+            </div><!--/.navbar-collapse -->
+        </div>
+    </nav>
+    <div id="_fixed_navbar_spacer" style="padding-top:50px"></div>
+</header>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div class="docs container">
+
+    <!-- Table of Contents -->
+    <div class="hidden-xs hidden-sm col-md-4 col-lg-3 site-toc-container">
+        <ul class="site-toc">
+    
+
+    <li>
+        
+            <span class="toc-section-heading">
+                Introduction
+            </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/overview/index.html">
+                Overview
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+
+    <li>
+        
+            <span class="toc-section-heading">
+                Create apps
+            </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/cli/index.html">
+                Create your first app
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/cli/template.html">
+                Templates for apps
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/support/index.html">
+                Platform support
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <span class="toc-section-heading">
+                Develop for platforms
+            </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/platforms/android/index.html">
+                Android
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/platforms/ios/index.html">
+                iOS
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/platforms/windows/index.html">
+                Windows
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/platforms/osx/index.html">
+                OS X
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../platform_plugin_versioning_ref/index.html">
+                Manage versions and platforms
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../config_ref/images.html">
+                Customize icons
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../cordova/storage/storage.html">
+                Store data
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/appdev/privacy/index.html">
+                Manage privacy
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/appdev/security/index.html">
+                Manage security
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/appdev/whitelist/index.html">
+                Whitelisting
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+
+    <li>
+        
+            <span class="toc-section-heading">
+                Create plugins
+            </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/hybrid/plugins/index.html">
+                Create a plugin
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <span class="toc-section-heading">
+                Develop for platforms
+            </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/platforms/android/plugin.html">
+                Android
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/platforms/ios/plugin.html">
+                iOS
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="this-page" 
href="../../../guide/platforms/windows/plugin.html">
+                Windows
+            </a>
+            
+                <span class="entry-highlight"></span>
+            
+        
+
+        
+        <div id="page-toc" class="page-toc"></div>
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../plugin_ref/plugman.html">
+                Use Plugman
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+
+    <li>
+        
+            <span class="toc-section-heading">
+                Advanced Topics
+            </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/hybrid/webviews/index.html">
+                Embed Cordova in native apps
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/next/index.html">
+                Next Steps
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+
+    <li>
+        
+            <span class="toc-section-heading">
+                Reference
+            </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    <li>
+        
+            <a class="" href="../../../config_ref/index.html">
+                Config.xml
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../cordova/events/events.html">
+                Events
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../reference/cordova-cli/index.html">
+                CLI Reference
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../guide/appdev/hooks/index.html">
+                Hooks
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" href="../../../plugin_ref/spec.html">
+                Plugin.xml
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <span class="toc-section-heading">
+                Plugin APIs
+            </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-battery-status/index.html">
+                Battery Status
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-camera/index.html">
+                Camera
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-device/index.html">
+                Device
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-dialogs/index.html">
+                Dialogs
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-file/index.html">
+                File
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-geolocation/index.html">
+                Geolocation
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-inappbrowser/index.html">
+                Inappbrowser
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-media/index.html">
+                Media
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-media-capture/index.html">
+                Media Capture
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-network-information/index.html">
+                Network Information
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-screen-orientation/index.html">
+                Screen Orientation
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-splashscreen/index.html">
+                Splashscreen
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-statusbar/index.html">
+                Statusbar
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-vibration/index.html">
+                Vibration
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    <li>
+        
+            <a class="" 
href="../../../reference/cordova-plugin-whitelist/index.html">
+                Whitelist
+            </a>
+            
+        
+
+        
+        
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+</ul>
+
+    </div>
+
+    <!-- Page content -->
+    <div class="col-md-8 col-md-offset-4 col-lg-9 col-lg-offset-3 
page-content-container container">
+        <div class="page-content row">
+            <div class="col-md-offset-1 col-md-10">
+                <div class="content-header">
+
+                    <!-- ToC Dropdown (for XS and SM sizes only) -->
+                    <div class="toc-dropdown dropdown visible-xs-block 
visible-sm-block">
+                        <button class="btn btn-default dropdown-toggle" 
type="button" id="tocDropdown" data-toggle="dropdown" aria-haspopup="true" 
aria-expanded="true">
+                            Table of Contents
+                            <span class="caret"></span>
+                        </button>
+                        <ul class="dropdown-menu">
+                            
+
+
+
+
+<li>
+    <a class="" href="../../../guide/overview/index.html">
+        Overview
+    </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../../guide/cli/index.html">
+        Create your first app
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../guide/cli/template.html">
+        Templates for apps
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../guide/support/index.html">
+        Platform support
+    </a>
+</li>
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../../guide/platforms/android/index.html">
+        Android
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../guide/platforms/ios/index.html">
+        iOS
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../guide/platforms/windows/index.html">
+        Windows
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../guide/platforms/osx/index.html">
+        OS X
+    </a>
+</li>
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../../platform_plugin_versioning_ref/index.html">
+        Manage versions and platforms
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../config_ref/images.html">
+        Customize icons
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../cordova/storage/storage.html">
+        Store data
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../guide/appdev/privacy/index.html">
+        Manage privacy
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../guide/appdev/security/index.html">
+        Manage security
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../guide/appdev/whitelist/index.html">
+        Whitelisting
+    </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../../guide/hybrid/plugins/index.html">
+        Create a plugin
+    </a>
+</li>
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../../guide/platforms/android/plugin.html">
+        Android
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../guide/platforms/ios/plugin.html">
+        iOS
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="this-page" href="../../../guide/platforms/windows/plugin.html">
+        Windows
+    </a>
+</li>
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../../plugin_ref/plugman.html">
+        Use Plugman
+    </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../../guide/hybrid/webviews/index.html">
+        Embed Cordova in native apps
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../guide/next/index.html">
+        Next Steps
+    </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../../config_ref/index.html">
+        Config.xml
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../cordova/events/events.html">
+        Events
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../reference/cordova-cli/index.html">
+        CLI Reference
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../guide/appdev/hooks/index.html">
+        Hooks
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../plugin_ref/spec.html">
+        Plugin.xml
+    </a>
+</li>
+
+
+
+
+
+
+
+<li>
+    <a class="" 
href="../../../reference/cordova-plugin-battery-status/index.html">
+        Battery Status
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../reference/cordova-plugin-camera/index.html">
+        Camera
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../reference/cordova-plugin-device/index.html">
+        Device
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../reference/cordova-plugin-dialogs/index.html">
+        Dialogs
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../reference/cordova-plugin-file/index.html">
+        File
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" 
href="../../../reference/cordova-plugin-geolocation/index.html">
+        Geolocation
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" 
href="../../../reference/cordova-plugin-inappbrowser/index.html">
+        Inappbrowser
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../reference/cordova-plugin-media/index.html">
+        Media
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" 
href="../../../reference/cordova-plugin-media-capture/index.html">
+        Media Capture
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" 
href="../../../reference/cordova-plugin-network-information/index.html">
+        Network Information
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" 
href="../../../reference/cordova-plugin-screen-orientation/index.html">
+        Screen Orientation
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" 
href="../../../reference/cordova-plugin-splashscreen/index.html">
+        Splashscreen
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../reference/cordova-plugin-statusbar/index.html">
+        Statusbar
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../reference/cordova-plugin-vibration/index.html">
+        Vibration
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../../reference/cordova-plugin-whitelist/index.html">
+        Whitelist
+    </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+                        </ul>
+                    </div>
+
+                    
+                    
+
+                        
+                        
+                        
+                        
+                        
+
+                        
+                        
+
+                            
+                            
+                                
+                            
+
+                            <a class="edit" 
href="https://github.com/apache/cordova-docs/tree/master/www/docs/en/dev/guide/platforms/windows/plugin.md";><span
 class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit Source on 
GitHub</a>
+                        
+                    
+
+                    <!-- Language dropdown -->
+                    <div class="dropdown">
+                        <button class="btn btn-default dropdown-toggle" 
type="button" id="languageDropdown" data-toggle="dropdown" aria-haspopup="true" 
aria-expanded="true">
+                            English
+                            <span class="caret"></span>
+                        </button>
+
+                        <!-- List all languages -->
+                        <ul class="dropdown-menu" 
aria-labelledby="languageDropdown">
+                            
+
+                            
+                            
+                            
+                            
+
+                            
+
+                            
+                            
+
+                            <li>
+                                <a 
href="/docs/de/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        Deutsch
+                                    
+                                </a>
+                            </li>
+                            
+
+                            
+                            
+                            
+                            
+
+                            
+
+                            
+                            
+
+                            <li>
+                                <a 
href="/docs/en/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        <span class="selected">
+                                            English
+                                        </span>
+                                    
+                                </a>
+                            </li>
+                            
+
+                            
+                            
+                            
+                            
+
+                            
+
+                            
+                            
+
+                            <li>
+                                <a 
href="/docs/es/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        Español
+                                    
+                                </a>
+                            </li>
+                            
+
+                            
+                            
+                            
+                            
+
+                            
+
+                            
+                            
+
+                            <li>
+                                <a 
href="/docs/fr/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        Français
+                                    
+                                </a>
+                            </li>
+                            
+
+                            
+                            
+                            
+                            
+
+                            
+
+                            
+                            
+
+                            <li>
+                                <a 
href="/docs/it/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        Italiano
+                                    
+                                </a>
+                            </li>
+                            
+
+                            
+                            
+                            
+                            
+
+                            
+
+                            
+                            
+
+                            <li>
+                                <a 
href="/docs/ja/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        日本語
+                                    
+                                </a>
+                            </li>
+                            
+
+                            
+                            
+                            
+                            
+
+                            
+
+                            
+                            
+
+                            <li>
+                                <a 
href="/docs/ko/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        한국어
+                                    
+                                </a>
+                            </li>
+                            
+
+                            
+                            
+                            
+                            
+
+                            
+
+                            
+                            
+
+                            <li>
+                                <a 
href="/docs/pl/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        Polski
+                                    
+                                </a>
+                            </li>
+                            
+
+                            
+                            
+                            
+                            
+
+                            
+
+                            
+                            
+
+                            <li>
+                                <a 
href="/docs/ru/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        Русский
+                                    
+                                </a>
+                            </li>
+                            
+
+                            
+                            
+                            
+                            
+
+                            
+
+                            
+                            
+
+                            <li>
+                                <a 
href="/docs/sl/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        Slovene
+                                    
+                                </a>
+                            </li>
+                            
+
+                            
+                            
+                            
+                            
+
+                            
+
+                            
+                            
+
+                            <li>
+                                <a 
href="/docs/zh-cn/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        简体中文
+                                    
+                                </a>
+                            </li>
+                            
+
+                            
+                            
+                            
+                            
+
+                            
+
+                            
+                            
+
+                            <li>
+                                <a 
href="/docs/zh-tw/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        繁體中文
+                                    
+                                </a>
+                            </li>
+                            
+                        </ul>
+                    </div>
+
+                    <!-- Version dropdown -->
+                    <div class="dropdown">
+                        <button class="btn btn-default dropdown-toggle" 
type="button" id="versionDropdown" data-toggle="dropdown" aria-haspopup="true" 
aria-expanded="true">
+                            dev
+                            
+                            <span class="caret"></span>
+                        </button>
+                        <ul class="dropdown-menu" 
aria-labelledby="versionDropdown">
+
+                            <!-- List versions available in this language -->
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+
+                                <a 
href="/docs/en/dev/guide/platforms/windows/plugin.html" class="">
+                                    
+                                        <span class="selected">
+                                            
+                                    dev
+                                    
+                                
+                                        </span>
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/latest/" 
class="missing-page">
+                                    
+                                        
+                                    7.x
+                                    
+                                        (Latest)
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/6.x/" class="missing-page">
+                                    
+                                        
+                                    6.x
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/5.4.0/" class="missing-page">
+                                    
+                                        
+                                    5.4.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/5.1.1/" class="missing-page">
+                                    
+                                        
+                                    5.1.1
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/5.0.0/" class="missing-page">
+                                    
+                                        
+                                    5.0.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/4.0.0/" class="missing-page">
+                                    
+                                        
+                                    4.0.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/3.6.0/" class="missing-page">
+                                    
+                                        
+                                    3.6.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/3.5.0/" class="missing-page">
+                                    
+                                        
+                                    3.5.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/3.4.0/" class="missing-page">
+                                    
+                                        
+                                    3.4.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/3.3.0/" class="missing-page">
+                                    
+                                        
+                                    3.3.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/3.2.0/" class="missing-page">
+                                    
+                                        
+                                    3.2.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/3.1.0/" class="missing-page">
+                                    
+                                        
+                                    3.1.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/3.0.0/" class="missing-page">
+                                    
+                                        
+                                    3.0.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/2.9.0/" class="missing-page">
+                                    
+                                        
+                                    2.9.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/2.8.0/" class="missing-page">
+                                    
+                                        
+                                    2.8.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/2.7.0/" class="missing-page">
+                                    
+                                        
+                                    2.7.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/2.6.0/" class="missing-page">
+                                    
+                                        
+                                    2.6.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/2.5.0/" class="missing-page">
+                                    
+                                        
+                                    2.5.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/2.4.0/" class="missing-page">
+                                    
+                                        
+                                    2.4.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/2.3.0/" class="missing-page">
+                                    
+                                        
+                                    2.3.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/2.2.0/" class="missing-page">
+                                    
+                                        
+                                    2.2.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/2.1.0/" class="missing-page">
+                                    
+                                        
+                                    2.1.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/2.0.0/" class="missing-page">
+                                    
+                                        
+                                    2.0.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/1.9.0/" class="missing-page">
+                                    
+                                        
+                                    1.9.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/1.8.1/" class="missing-page">
+                                    
+                                        
+                                    1.8.1
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/1.8.0/" class="missing-page">
+                                    
+                                        
+                                    1.8.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/1.7.0/" class="missing-page">
+                                    
+                                        
+                                    1.7.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/1.6.1/" class="missing-page">
+                                    
+                                        
+                                    1.6.1
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/1.6.0/" class="missing-page">
+                                    
+                                        
+                                    1.6.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                            <li>
+                                
+                                
+                                    
+                                
+
+                                
+
+                                
+                                
+                                
+
+                                
+                                    
+                                
+
+                                <a href="/docs/en/1.5.0/" class="missing-page">
+                                    
+                                        
+                                    1.5.0
+                                    
+                                
+                                    
+                                </a>
+                            </li>
+                            
+                        </ul>
+                    </div>
+                </div>
+
+                
+                
+                
+
+                
+                
+                    
+                
+
+                <!-- Show warnings for special versions -->
+                <!-- dev warning -->
+                
+                    <div class="alert docs-alert alert-info" role="alert">
+                        <button type="button" class="close" 
data-dismiss="alert" aria-label="Close">
+                            <span aria-hidden="true">&times;</span>
+                        </button>
+                        This version of the documentation is under development!
+                        <a href="/docs/en/latest/">
+                            Click here for the latest released version.
+                        </a>
+                    </div>
+                
+
+                <!-- outdated warning -->
+                
+
+                <!-- plugin version warning -->
+                
+
+                <div id="page-toc-source">
+                    <h1>Windows Plugins</h1>
+
+<p>This section provides details for how to implement a plugin for use in
+a Windows Store app for Windows 8.1 phone and desktop, and Universal Windows 
Platform (Windows 10+). Before reading this, see <a 
href="../../hybrid/plugins/index.html">Create your first plugin</a> for an 
overview of the plugin&#39;s structure and its common JavaScript interface. 
This section continues to demonstrate the sample <em>echo</em> plugin that 
communicates from the Cordova webview to the native platform and back.</p>
+
+<h2>Creating a Windows Plugin in JavaScript</h2>
+
+<p>Windows Cordova plugins are essentially a thin wrapper around existing 
WinJS provided functions, but assuming you will want to define your JS common 
interface for multiple devices, you will typically have one JS file that 
provides the API:</p>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span 
class="c1">// inside file echoplugin.js</span>
+<span class="kd">var</span> <span class="nx">EchoPlugin</span> <span 
class="o">=</span> <span class="p">{</span>
+    <span class="c1">// the echo function calls successCallback with the 
provided text in strInput</span>
+    <span class="c1">// if strInput is empty, it will call the 
errorCallback</span>
+    <span class="na">echo</span><span class="p">:</span><span 
class="kd">function</span><span class="p">(</span><span 
class="nx">successCallback</span><span class="p">,</span> <span 
class="nx">errorCallback</span><span class="p">,</span> <span 
class="nx">strInput</span><span class="p">)</span> <span class="p">{</span>
+        <span class="nx">cordova</span><span class="p">.</span><span 
class="nx">exec</span><span class="p">(</span><span 
class="nx">successCallback</span><span class="p">,</span><span 
class="nx">errorCallback</span><span class="p">,</span><span 
class="s2">"EchoPlugin"</span><span class="p">,</span><span 
class="s2">"echo"</span><span class="p">,[</span><span 
class="nx">strInput</span><span class="p">]);</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</code></pre></div>
+<p>The <code>cordova.exec</code> function is defined differently on every 
platform, this is because each platform has it&#39;s own way of communicating 
between the application js code, and the native wrapper code. But in the case 
of Windows, there is no native wrapper, so the exec call is there for 
consistency. So even though you could write the Windows specific code as a part 
of plugin&#39;s common JS code directly, this is not recommended and plugin 
authors should use the same exec API for Windows as for other platforms. This 
way the plugin API becomes consistent and you can also take advantage of any 
parameter checking, or other common code provided by developers who were 
working on other platforms.</p>
+
+<p>On Windows, cordova provides a proxy that you can use to register an object 
that will handle all cordova.exec calls to an API. So in our case, we will 
assume that the code in <code>echoplugin.js</code> is handling cross platform 
relevant JavaScript, and we can simply write a proxy for Windows.</p>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span 
class="c1">// in file echoplugin.js</span>
+<span class="nb">window</span><span class="p">.</span><span 
class="nx">echo</span> <span class="o">=</span> <span 
class="kd">function</span><span class="p">(</span><span 
class="nx">str</span><span class="p">,</span> <span 
class="nx">callback</span><span class="p">)</span> <span class="p">{</span>
+    <span class="nx">cordova</span><span class="p">.</span><span 
class="nx">exec</span><span class="p">(</span><span 
class="nx">callback</span><span class="p">,</span> <span 
class="kd">function</span><span class="p">(</span><span 
class="nx">err</span><span class="p">)</span> <span class="p">{</span>
+        <span class="nx">callback</span><span class="p">(</span><span 
class="s1">'Nothing to echo.'</span><span class="p">);</span>
+    <span class="p">},</span> <span class="s2">"Echo"</span><span 
class="p">,</span> <span class="s2">"echo"</span><span class="p">,</span> <span 
class="p">[</span><span class="nx">str</span><span class="p">]);</span>
+<span class="p">};</span>
+</code></pre></div><div class="highlight"><pre><code class="language-js" 
data-lang="js"><span class="c1">// in file echopluginProxy.js</span>
+<span class="nx">cordova</span><span class="p">.</span><span 
class="nx">commandProxy</span><span class="p">.</span><span 
class="nx">add</span><span class="p">(</span><span 
class="s2">"Echo"</span><span class="p">,{</span>
+    <span class="na">echo</span><span class="p">:</span><span 
class="kd">function</span><span class="p">(</span><span 
class="nx">successCallback</span><span class="p">,</span><span 
class="nx">errorCallback</span><span class="p">,</span><span 
class="nx">strInput</span><span class="p">)</span> <span class="p">{</span>
+        <span class="k">if</span><span class="p">(</span><span 
class="o">!</span><span class="nx">strInput</span> <span class="o">||</span> 
<span class="o">!</span><span class="nx">strInput</span><span 
class="p">.</span><span class="nx">length</span><span class="p">)</span> <span 
class="p">{</span>
+            <span class="nx">errorCallback</span><span class="p">(</span><span 
class="s2">"Error, something was wrong with the input string. =&gt;"</span> 
<span class="o">+</span> <span class="nx">strInput</span><span 
class="p">);</span>
+        <span class="p">}</span>
+        <span class="k">else</span> <span class="p">{</span>
+            <span class="nx">successCallback</span><span 
class="p">(</span><span class="nx">strInput</span> <span class="o">+</span> 
<span class="s2">"echo"</span><span class="p">);</span>
+        <span class="p">}</span>
+    <span class="p">}</span>
+<span class="p">});</span>
+</code></pre></div>
+<p>The <code>echoplugin.js</code> file will forward the <code>echo</code> 
function call to this proxy through the <code>cordova.exec</code> command and 
execute this implementation.</p>
+
+<p>The plugin.xml file will have the settings required for our plugin. In this 
case, we want to add our <code>echoplugin.js</code> file in the 
<code>www</code> directory and the <code>echopluginProxy.js</code> file inside 
the <code>windows</code> source code of our application. Details of these 
elements can be found in the <a 
href="../../../plugin_ref/spec.html">Plugin.xml</a> reference.</p>
+<div class="highlight"><pre><code class="language-xml" data-lang="xml"><span 
class="cp">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
+<span class="nt">&lt;plugin</span> <span class="na">xmlns=</span><span 
class="s">"http://apache.org/cordova/ns/plugins/1.0";</span>
+    <span class="na">id=</span><span class="s">"echoplugin"</span>
+    <span class="na">version=</span><span class="s">"0.1.0"</span><span 
class="nt">&gt;</span>
+
+    <span class="nt">&lt;js-module</span> <span class="na">src=</span><span 
class="s">"www/echoplugin.js"</span> <span class="na">name=</span><span 
class="s">"echoplugin"</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;clobbers</span> <span 
class="na">target=</span><span class="s">"window.echoplugin"</span> <span 
class="nt">/&gt;</span>
+    <span class="nt">&lt;/js-module&gt;</span>
+
+    <span class="c">&lt;!-- windows --&gt;</span>
+    <span class="nt">&lt;platform</span> <span class="na">name=</span><span 
class="s">"windows"</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;js-module</span> <span 
class="na">src=</span><span class="s">"src/windows/echopluginProxy.js"</span> 
<span class="na">name=</span><span class="s">"EchoProxy"</span><span 
class="nt">&gt;</span>
+            <span class="nt">&lt;merges</span> <span 
class="na">target=</span><span class="s">""</span> <span class="nt">/&gt;</span>
+        <span class="nt">&lt;/js-module&gt;</span>
+    <span class="nt">&lt;/platform&gt;</span>
+
+    <span class="c">&lt;!-- other platforms --&gt;</span>
+
+<span class="nt">&lt;/plugin&gt;</span>
+</code></pre></div>
+<p>This gives us a working Windows JavaScript plugin that uses a common file ( 
echoplugin.js ) and uses a proxy to provide the Windows only portion of 
implementation ( echopluginProxy.js ). So how do we add native/managed code to 
this? Well we are going to start the same, the only difference will be what we 
do inside in echopluginProxy methods.</p>
+
+<h2>Creating a Windows Plugin in C++ or managed code.</h2>
+
+<p>In Windows, Javascript authored apps are able to interop with native (C++) 
and managed code (C#, VB) by creating a Windows runtime component. You can 
learn the basics here and checkout more details in guides on MSDN:</p>
+
+<ul>
+<li><a 
href="https://msdn.microsoft.com/en-us/library/windows/apps/br230301.aspx";>Creating
 Windows Runtime Components in C# and Visual Basic</a></li>
+<li><a 
href="http://msdn.microsoft.com/en-us/library/windows/apps/hh441569.aspx";>Creating
 Windows Runtime Components in C++</a></li>
+</ul>
+
+<p>When you create your Windows Runtime Component, any class that is defined 
as <code>public ref class sealed</code> is considered an &#39;activatable 
class&#39; and will be callable from JavaScript.</p>
+<div class="highlight"><pre><code class="language-cpp" data-lang="cpp"><span 
class="c1">// in your header file .h
+</span><span class="k">namespace</span> <span 
class="n">EchoRuntimeComponent</span>
+<span class="p">{</span>
+    <span class="k">public</span> <span class="n">ref</span> <span 
class="k">class</span> <span class="nc">EchoPluginRT</span> <span 
class="n">sealed</span>
+    <span class="p">{</span>
+        <span class="k">public</span><span class="o">:</span>
+        <span class="k">static</span> <span class="n">Platform</span><span 
class="o">::</span><span class="n">String</span><span class="o">^</span> <span 
class="n">Echo</span><span class="p">(</span><span 
class="n">Platform</span><span class="o">::</span><span 
class="n">String</span><span class="o">^</span> <span 
class="n">input</span><span class="p">);</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">// in the implementation file .cpp
+</span><span class="k">using</span> <span class="k">namespace</span> <span 
class="n">EchoRuntimeComponent</span><span class="p">;</span>
+<span class="k">using</span> <span class="k">namespace</span> <span 
class="n">Platform</span><span class="p">;</span>
+
+<span class="n">Platform</span><span class="o">::</span><span 
class="n">String</span><span class="o">^</span> <span 
class="n">EchoPluginRT</span><span class="o">::</span><span 
class="n">Echo</span><span class="p">(</span><span 
class="n">Platform</span><span class="o">::</span><span 
class="n">String</span><span class="o">^</span> <span 
class="n">input</span><span class="p">)</span>
+<span class="p">{</span>
+    <span class="k">if</span><span class="p">(</span><span 
class="n">input</span><span class="o">-&gt;</span><span 
class="n">IsEmpty</span><span class="p">())</span>
+    <span class="p">{</span>
+        <span class="k">return</span> <span class="s">"Error: input string is 
empty."</span><span class="p">;</span>
+    <span class="p">}</span>
+    <span class="k">else</span>
+    <span class="p">{</span>
+        <span class="k">return</span> <span class="n">input</span><span 
class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span> 
<span class="o">+</span> <span class="s">"echo"</span><span class="p">;</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</code></pre></div>
+<p>Now in order for us to call the native code, we use the namespace, 
classname, and lowerCamelCase the method we are calling.</p>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span 
class="kd">var</span> <span class="nx">res</span> <span class="o">=</span> 
<span class="nx">EchoRuntimeComponent</span><span class="p">.</span><span 
class="nx">EchoPluginRT</span><span class="p">.</span><span 
class="nx">echo</span><span class="p">(</span><span 
class="s2">"boom"</span><span class="p">);</span>
+</code></pre></div>
+<p>Moving this to our echopluginProxy.js file, we get:</p>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span 
class="c1">// in file echopluginProxy.js</span>
+<span class="nx">cordova</span><span class="p">.</span><span 
class="nx">commandProxy</span><span class="p">.</span><span 
class="nx">add</span><span class="p">(</span><span 
class="s2">"EchoPlugin"</span><span class="p">,{</span>
+    <span class="na">echo</span><span class="p">:</span><span 
class="kd">function</span><span class="p">(</span><span 
class="nx">successCallback</span><span class="p">,</span> <span 
class="nx">errorCallback</span><span class="p">,</span> <span 
class="nx">strInput</span><span class="p">)</span> <span class="p">{</span>
+        <span class="kd">var</span> <span class="nx">res</span> <span 
class="o">=</span> <span class="nx">EchoRuntimeComponent</span><span 
class="p">.</span><span class="nx">EchoPluginRT</span><span 
class="p">.</span><span class="nx">echo</span><span class="p">(</span><span 
class="nx">strInput</span><span class="p">);</span>
+        <span class="k">if</span><span class="p">(</span><span 
class="nx">res</span><span class="p">.</span><span 
class="nx">indexOf</span><span class="p">(</span><span 
class="s2">"Error"</span><span class="p">)</span> <span class="o">==</span> 
<span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
+            <span class="nx">errorCallback</span><span class="p">(</span><span 
class="nx">res</span><span class="p">);</span>
+        <span class="p">}</span>
+        <span class="k">else</span> <span class="p">{</span>
+            <span class="nx">successCallback</span><span 
class="p">(</span><span class="nx">res</span><span class="p">);</span>
+        <span class="p">}</span>
+    <span class="p">}</span>
+<span class="p">});</span>
+</code></pre></div>
+<p>And that&#39;s it, we have an end to end C++ backed js callable plugin for 
use in Apache Cordova Windows!</p>
+
+<h3>Considerations</h3>
+
+<ul>
+<li>The callback is typically async, so calling the callback right away is 
probably not expected by the caller. In practice, if the call is not async, you 
should at least use a javascript timeout to force the callback to be called 
asynchronously.</li>
+<li>Activatable classes can be used to do event dispatching, async callbacks, 
passing your own object types, arrays, collections, overloaded methods and much 
more. Refer to <a 
href="http://msdn.microsoft.com/en-us/library/windows/apps/hh441569.aspx";>Creating
 Windows Runtime Components in C++</a> for details.</li>
+</ul>
+
+<h3>Defining your plugin in plugin.xml</h3>
+
+<p>Now that we have a working plugin, we need to revisit the plugin definition 
from earlier so we can publish it. We can now add the runtime component as a 
framework, through the <code>&lt;framework&gt;</code> tag inside our platfrom 
settings. Note that the output type of a WindowsRuntimeComponent can be either 
.winmd or .dll</p>
+<div class="highlight"><pre><code class="language-xml" data-lang="xml"><span 
class="cp">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
+<span class="nt">&lt;plugin</span> <span class="na">xmlns=</span><span 
class="s">"http://apache.org/cordova/ns/plugins/1.0";</span>
+    <span class="na">id=</span><span class="s">"echoplugin"</span>
+    <span class="na">version=</span><span class="s">"0.2.0"</span><span 
class="nt">&gt;</span>
+
+    <span class="nt">&lt;js-module</span> <span class="na">src=</span><span 
class="s">"www/echoplugin.js"</span> <span class="na">name=</span><span 
class="s">"echoplugin"</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;clobbers</span> <span 
class="na">target=</span><span class="s">"window.echoplugin"</span> <span 
class="nt">/&gt;</span>
+    <span class="nt">&lt;/js-module&gt;</span>
+
+    <span class="c">&lt;!-- windows --&gt;</span>
+    <span class="nt">&lt;platform</span> <span class="na">name=</span><span 
class="s">"windows"</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;js-module</span> <span 
class="na">src=</span><span class="s">"src/windows/echopluginProxy.js"</span> 
<span class="na">name=</span><span class="s">"EchoProxy"</span><span 
class="nt">&gt;</span>
+            <span class="nt">&lt;merges</span> <span 
class="na">target=</span><span class="s">""</span> <span class="nt">/&gt;</span>
+        <span class="nt">&lt;/js-module&gt;</span>
+        <span class="nt">&lt;framework</span> <span 
class="na">src=</span><span 
class="s">"src/windows/EchoRuntimeComponent.winmd"</span> <span 
class="na">custom=</span><span class="s">"true"</span><span 
class="nt">/&gt;</span>
+    <span class="nt">&lt;/platform&gt;</span>
+
+    <span class="c">&lt;!-- other platforms --&gt;</span>
+<span class="nt">&lt;/plugin&gt;</span>
+</code></pre></div>
+<p>That&#39;s it, you now have a distributable plugin that you can share with 
the world!</p>
+
+
+                </div>
+            </div>
+        </div>
+        <div class="row">
+            <div class="blue-divider"></div>
+<footer>
+    <div class="container-fluid">
+        <div class="row">
+    <div class="col-sm-9">
+        <h1>More Resources</h1>
+        <div class="row">
+            <div class="col-sm-4">
+                <h2>General</h2>
+                <ul class="nav">
+                    <li>
+                        <a target="_blank" 
href="https://projects.apache.org/project.html?cordova";>Apache Project Page</a>
+                    </li>
+                    <li>
+                        <a 
href="http://www.apache.org/dyn/closer.cgi/cordova";>Source Distribution</a>
+                    </li>
+                    <li>
+                        <a target="_blank" 
href="http://www.apache.org/licenses/LICENSE-2.0";>License</a>
+                    </li>
+                    <li>
+                        <a href="/artwork">Artwork</a>
+                    </li>
+                </ul>
+            </div>
+            <div class="col-sm-4">
+                <h2>Development</h2>
+                <ul class="nav">
+                    <li><a target="_blank" 
href="https://github.com/apache?utf8=%E2%9C%93&amp;q=cordova-";>Source 
Code</a></li>
+                    <li><a target="_blank" 
href="https://issues.apache.org/jira/browse/CB/";>Issue Tracker</a></li>
+                    <li><a target="_blank" 
href="http://stackoverflow.com/questions/tagged/cordova";>Stack Overflow</a></li>
+                    <li><a href="/contact">Mailing List</a></li>
+                    <li><a href="/contribute/nightly_builds.html">Nightly 
builds</a></li>
+                </ul>
+            </div>
+            <div class="col-sm-4">
+                <h2>Apache Software Foundation</h2>
+                <ul class="nav">
+                    <li>
+                        <a target="_blank" href="http://www.apache.org/";>About 
ASF</a>
+                    </li>
+                    <li>
+                        <a target="_blank" 
href="http://www.apache.org/foundation/sponsorship.html";>Become a Sponsor</a>
+                    </li>
+                    <li>
+                        <a target="_blank" 
href="http://www.apache.org/foundation/thanks.html";>Thanks</a>
+                    </li>
+                    <li>
+                        <a target="_blank" 
href="http://www.apache.org/security/";>Security</a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+    </div>
+    <div class="col-sm-3">
+        <h1>Contribute</h1>
+        <p style="padding-top:20px"><strong>Help Cordova move 
forward!</strong></p>
+        <p>Report bugs, improve the docs, or contribute to the code.</p>
+        <a href="/contribute" class="btn btn-lg btn-primary">
+            Learn More
+        </a>
+        <p style="padding-top:20px"> <a 
href="https://twitter.com/apachecordova"; class="twitter-follow-button" 
data-show-count="false">Follow @apachecordova</a></p>
+        <script async defer 
src="https://slack-cordova-io.herokuapp.com/slackin.js";></script>
+    </div>
+</div>
+<p class="copyright_text">
+    Copyright &copy; 2012, 2013, 2015 The Apache Software Foundation, Licensed 
under the <a target="_blank" 
href="http://www.apache.org/licenses/LICENSE-2.0";>Apache License, Version 
2.0</a>.<br/>
+    Apache and the Apache feather logos are <a target="_blank" 
href="http://www.apache.org/foundation/marks/list/";>trademarks</a> of The 
Apache Software Foundation.
+    <br/>
+    "Raleway" font used under license. For details see the <a 
href="/attributions/">attributions page</a>.
+</p>
+
+    </div>
+</footer>
+
+        </div>
+    </div>
+</div>
+
+<script defer type="text/javascript" src="/static/js/lib/toc.min.js"></script>
+<script defer type="text/javascript" src="/static/js/docs.js"></script>
+
+    <script defer type="text/javascript" src="/static/js/index.js"></script>
+    <script defer type="text/javascript" src="/static/js/twitter.js"></script>
+    
+    
+
+
+
+    
+
+
+<script type="text/javascript" 
src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js";></script>
+<script type="text/javascript">
+    docsearch({
+        apiKey: '0a916ab198bd93d031aa70611271e42e',
+        indexName: 'cordova',
+        inputSelector: '#header-search-field',
+        algoliaOptions: { 'facetFilters': ["version:  dev", "language: en"] }
+    });
+</script>
+
+</body>
+</html>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to