Windows Platform

Windows Platform Guide This guide shows how to set up your SDK development environment to build and deploy Cordova apps for Windows 8.1, Windows Phone 8.1, and Windows 10 Universal App Platform. It shows how to use either shell tools to generate and build apps, or the cross-platform Cordova CLI. (See the Overview for a comparison of these development options.) This section also shows how to modify Cordova apps within Visual Studio. Regardless of which approach you take, you need to install the

<content>

content Defines the app's starting page in the top-level web assets directory. The default value is index.html, which customarily appears in a project's top-level www directory. Attributes(type) Only for platform: Description src(string) Required Defines the app's starting page in the top-level web assets directory. The default value is index.html, which customarily appears in a project's top-level www directory. Examples: <widget ...> <content src="startPage.html"></cont

backbutton

backbutton The event fires when the user presses the back button. To override the default back-button behavior, register an event listener for the backbutton event. It is no longer necessary to call any other method to override the back-button behavior. Quick Example document.addEventListener("backbutton", onBackKeyDown, false); function onBackKeyDown() { // Handle the back button } Windows Quirks Throw an error in a backbutton callback to force the default behavior, which is an app exit:

activated

activated The event fires when Windows Runtime activation has occurred. See MSDN docs for further details and activation types. Quick Example document.addEventListener("activated", activated, false); function activated(args) { if (args && args.kind === Windows.ApplicationModel.Activation.ActivationKind.file) { // Using args.raw to get the native StorageFile object Windows.Storage.FileIO.readTextAsync(args.raw.detail[0].files[0]).done(function (text) { con

deviceready

deviceready The deviceready event fires when Cordova is fully loaded. This event is essential to any application. It signals that Cordova's device APIs have loaded and are ready to access. Cordova consists of two code bases: native and JavaScript. While the native code loads, a custom loading image displays. However, JavaScript only loads once the DOM loads. This means the web app may potentially call a Cordova JavaScript function before the corresponding native code becomes available. The devi

cordova run

cordova run command Synopsis Prepares, builds, and deploys app on specified platform devices/emulators. If a device is connected it will be used, unless an eligible emulator is already running. Syntax cordova run [<platform> [...]] [--list | --debug | --release] [--noprepare] [--nobuild] [--device|--emulator|--target=<targetName>] [--buildConfig=<configfile>] [--browserify] [-- <platformOpts>] Option Description <platform> [..] Platform nam

cordova-plugin-inappbrowser

This documentation describes this plugin at version master. Other versions are on GitHub. Android iOS Windows 8.1 Store Windows 8.1 Phone Windows 10 Store Travis CI cordova-plugin-inappbrowser You can show helpful articles, videos, and web resources inside of your app. Users can view web pages without leaving your app. To get a few ideas, check out the sample at the bottom of this page or go straight to the reference content. This plugin provides a web browser view that displa

BlackBerry 10 Configuration

BlackBerry 10 Configuration The config.xml file controls an app's basic settings that apply across each application and CordovaWebView instance. This section details preferences that only apply to BlackBerry 10 builds. See The config.xml File for information on global configuration options. ChildBrowser (disable or the default enable): Disables child browser windows. By default, apps launch a secondary browser window to display resources accessed via window.open() or by specifying a _blank anc

cordova-plugin-file-transfer

This documentation describes this plugin at version master. Other versions are on GitHub. Android iOS Windows 8.1 Store Windows 8.1 Phone Windows 10 Store Travis CI cordova-plugin-file-transfer This plugin allows you to upload and download files. This plugin defines global FileTransfer, FileUploadOptions constructors. Although in the global scope, they are not available until after the deviceready event. document.addEventListener("deviceready", onDeviceReady, false); function on

Upgrading Windows Phone 8

Upgrading Windows Phone 8 This guide shows how to modify Windows Phone 8 projects, to upgrade from older versions of Cordova. Some of these instructions apply to projects created with an older set of command-line tools that precede the cordova CLI utility. See The Command-Line Interface for information how to update the version of the CLI. The following section shows how to upgrade from non-CLI and CLI projects. Upgrading 3.6.0 Projects to 4.0.0 For non-CLI projects, run: bin/update path/to/pro