diff --git a/plugins/android.json b/plugins/android.json
deleted file mode 100644
index 8dfb4a6..0000000
--- a/plugins/android.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "prepare_queue": {
- "installed": [],
- "uninstalled": []
- },
- "config_munge": {
- "files": {}
- },
- "installed_plugins": {
- "cordova-plugin-filechooser": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "cordova-plugin-share-content": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "ionic-plugin-keyboard": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "cordova-plugin-file": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "cordova-plugin-file-transfer": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "com-darryncampbell-cordova-plugin-intent": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "cordova-plugin-inappbrowser": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "cordova-plugin-whitelist": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "cordova-plugin-statusbar": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "cordova-plugin-splashscreen": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "cordova-plugin-device": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "cordova-plugin-console": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "cordova-android-support-gradle-release": {
- "ANDROID_SUPPORT_VERSION": "27.+",
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- },
- "cordova-plugin-filepath": {
- "PACKAGE_NAME": "com.monkeystew.goober_m"
- }
- },
- "dependent_plugins": {}
-}
\ No newline at end of file
diff --git a/plugins/com-darryncampbell-cordova-plugin-intent/LICENSE b/plugins/com-darryncampbell-cordova-plugin-intent/LICENSE
deleted file mode 100644
index 65d8f14..0000000
--- a/plugins/com-darryncampbell-cordova-plugin-intent/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2017 Darryn
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/plugins/com-darryncampbell-cordova-plugin-intent/README.md b/plugins/com-darryncampbell-cordova-plugin-intent/README.md
deleted file mode 100644
index e300ba3..0000000
--- a/plugins/com-darryncampbell-cordova-plugin-intent/README.md
+++ /dev/null
@@ -1,271 +0,0 @@
-*This plugin is provided without guarantee or warranty*
-=========================================================
-
-[![npm version](http://img.shields.io/npm/v/com-darryncampbell-cordova-plugin-intent.svg?style=flat-square)](https://npmjs.org/package/com-darryncampbell-cordova-plugin-intent "View this project on npm")
-[![npm downloads](http://img.shields.io/npm/dm/com-darryncampbell-cordova-plugin-intent.svg?style=flat-square)](https://npmjs.org/package/com-darryncampbell-cordova-plugin-intent "View this project on npm")
-[![npm downloads](http://img.shields.io/npm/dt/com-darryncampbell-cordova-plugin-intent.svg?style=flat-square)](https://npmjs.org/package/com-darryncampbell-cordova-plugin-intent "View this project on npm")
-[![npm licence](http://img.shields.io/npm/l/com-darryncampbell-cordova-plugin-intent.svg?style=flat-square)](https://npmjs.org/package/com-darryncampbell-cordova-plugin-intent "View this project on npm")
-
-Note: this is the current underlying implementation for https://www.npmjs.com/package/@ionic-native/web-intent and https://ionicframework.com/docs/native/web-intent/
-
-# Interaction with Camera Plugin
-If you are installing this plugin along with cordova-plugin-camera you **MUST install cordova-plugin-camera first.**
-
-# Overview
-This Cordova plugin provides a general purpose shim layer for the Android intent mechanism, exposing various ways to handle sending and receiving intents.
-
-## Credits
-This project uses code released under the following MIT projects:
-- https://github.com/napolitano/cordova-plugin-intent (marked as no longer maintained)
-- https://github.com/Initsogar/cordova-webintent.git (no longer available on github but the project is forked here: https://github.com/darryncampbell/cordova-webintent)
-This project is also released under MIT. Credit is given in the code where appropriate
-
-## IntentShim
-This plugin defines a `window.plugins.intentShim` object which provides an API for interacting with the Android intent mechanism on any Android device.
-
-## Testing / Example
-An example application is available at https://github.com/darryncampbell/plugin-intent-api-exerciser to demonstrate the API and can be used to test the functionality.
-
-## Installation
-
-### Cordova Version < 7
- cordova plugin add https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent.git
-
-### Cordova Version >= 7
- cordova plugin add com-darryncampbell-cordova-plugin-intent
-
-## Supported Platforms
-- Android
-
-## intentShim.registerBroadcastReceiver
-
-Registers a broadcast receiver for the specified filters
-
- window.plugins.intentShim.registerBroadcastReceiver(filters, callback);
-
-### Description
-
-The `intentShim.registerBroadcastReceiver` function registers a dynamic broadcast receiver for the specified list of filters and invokes the specified callback when any of those filters are received
-
-### Android Quirks
-
-Any existing broadcast receiver is unregistered when this method is called. To register for multiple types of broadcast, specify multiple filters.
-
-### Example
-
-Register a broadcast receiver for two filters:
-
- window.plugins.intentShim.registerBroadcastReceiver({
- filterActions: [
- 'com.darryncampbell.cordova.plugin.broadcastIntent.ACTION',
- 'com.darryncampbell.cordova.plugin.broadcastIntent.ACTION_2'
- ]
- },
- function(intent) {
- console.log('Received broadcast intent: ' + JSON.stringify(intent.extras));
- }
- );
-
-
-## intentShim.unregisterBroadcastReceiver
-
-Unregisters the broadcast receiver
-
- window.plugins.intentShim.unregisterBroadcastReceiver();
-
-### Description
-
-The `intentShim.unregisterBroadcastReceiver` function unregisters the broadcast receiver registered with `intentShim.registerBroadcastReceiver(filters, callback);`. No further broadcasts will be received for any registered filter after this call.
-
-### Android Quirks
-
-The developer is responsible for calling unregister / register when their application goes into the background or comes back to the foreground, if desired.
-
-### Example
-
-Unregister the broadcast receiver when the application receives an onPause event:
-
- bindEvents: function() {
- document.addEventListener('pause', this.onPause, false);
- },
- onPause: function()
- {
- window.plugins.intentShim.unregisterBroadcastReceiver();
- }
-
-## intentShim.sendBroadcast
-
-Sends a broadcast intent
-
- window.plugins.intentShim.sendBroadcast(action, extras, successCallback, failureCallback);
-
-### Description
-
-The `intentShim.sendBroadcast` function sends an Android broadcast intent with a specified action
-
-### Example
-
-Send a broadcast intent to a specified action that contains a random number in the extras
-
- window.plugins.intentShim.startActivity(
- {
- action: "com.darryncampbell.cordova.plugin.intent.ACTION",
- extras: {
- 'random.number': Math.floor((Math.random() * 1000) + 1)
- }
- },
- function() {},
- function() {alert('Failed to open URL via Android Intent')}
- );
-
-
-## intentShim.onIntent
-
-Returns the content of the intent used whenever the application activity is launched
-
- window.plugins.intentShim.onIntent(callback);
-
-### Description
-
-The `intentShim.onIntent` function returns the intent which launched the Activity and maps to the Android Activity's onNewIntent() method, https://developer.android.com/reference/android/app/Activity.html#onNewIntent(android.content.Intent). The registered callback is invoked whenever the activity is launched
-
-### Android Quirks
-
-By default the android application will be created with launch mode set to 'SingleTop'. If you wish to change this to 'SingleTask' you can do so by modifying `config.xml` as follows:
-
-
- ...
-
-
-See https://www.mobomo.com/2011/06/android-understanding-activity-launchmode/ for more information on the differences between the two.
-
-### Example
-
-Registers a callback to be invoked
-
- window.plugins.intentShim.onIntent(function (intent) {
- console.log('Received Intent: ' + JSON.stringify(intent.extras));
- });
-
-## intentShim.startActivity
-
-Starts a new activity using an intent built from action, url, type, extras or some subset of those parameters
-
- window.plugins.intentShim.startActivity(params, successCallback, failureCallback);
-
-### Description
-
-The `intentShim.startActivity` function maps to Android's activity method startActivity, https://developer.android.com/reference/android/app/Activity.html#startActivity(android.content.Intent) to launch a new activity.
-
-### Android Quirks
-
-Some common actions are defined as constants in the plugin, see below.
-
-### Examples
-
-Launch the maps activity
-
- window.plugins.intentShim.startActivity(
- {
- action: window.plugins.intentShim.ACTION_VIEW,
- url: 'geo:0,0?q=London'
- },
- function() {},
- function() {alert('Failed to open URL via Android Intent')}
- );
-
-Launch the web browser
-
- window.plugins.intentShim.startActivity(
- {
- action: window.plugins.intentShim.ACTION_VIEW,
- url: 'http://www.google.co.uk'
- },
- function() {},
- function() {alert('Failed to open URL via Android Intent')}
- );
-
-## intentShim.getIntent
-
-Retrieves the intent that launched the activity
-
- window.plugins.intentShim.getIntent(resultCallback, failureCallback);
-
-### Description
-
-The `intentShim.getIntent` function maps to Android's activity method getIntent, https://developer.android.com/reference/android/app/Activity.html#getIntent() to return the intent that started this activity.
-
-### Example
-
- window.plugins.intentShim.getIntent(
- function(intent)
- {
- console.log('Action' + JSON.stringify(intent.action));
- var intentExtras = intent.extras;
- if (intentExtras == null)
- intentExtras = "No extras in intent";
- console.log('Launch Intent Extras: ' + JSON.stringify(intentExtras));
- },
- function()
- {
- console.log('Error getting launch intent');
- });
-
-
-## intentShim.startActivityForResult
-
-Starts a new activity and return the result to the application
-
- window.plugins.intentShim.startActivityForResult(params, resultCallback, failureCallback);
-
-### Description
-
-The `intentShim.startActivityForResult` function maps to Android's activity method startActivityForResult, https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int) to launch a new activity and the resulting data is returned via the resultCallback.
-
-### Android Quirks
-
-Some common actions are defined as constants in the plugin, see below.
-
-### Example
-
-Pick an Android contact
-
- window.plugins.intentShim.startActivityForResult(
- {
- action: window.plugins.intentShim.ACTION_PICK,
- url: "content://com.android.contacts/contacts",
- requestCode: 1
- },
- function(intent)
- {
- if (intent.extras.requestCode == 1)
- {
- console.log('Picked contact: ' + intent.data);
- }
- },
- function()
- {
- console.log("StartActivityForResult failure");
- });
-
-
-## Predefined Constants
-
-The following constants are defined in the plugin for use in JavaScript
-- window.plugins.intentShim.ACTION_SEND
-- window.plugins.intentShim.ACTION_VIEW
-- window.plugins.intentShim.EXTRA_TEXT
-- window.plugins.intentShim.EXTRA_SUBJECT
-- window.plugins.intentShim.EXTRA_STREAM
-- window.plugins.intentShim.EXTRA_EMAIL
-- window.plugins.intentShim.ACTION_CALL
-- window.plugins.intentShim.ACTION_SENDTO
-- window.plugins.intentShim.ACTION_GET_CONTENT
-- window.plugins.intentShim.ACTION_PICK
-
-## Tested Versions
-
-Tested with Cordova version 6.5.0 and Cordova Android version 6.2.1
-
-
-
diff --git a/plugins/com-darryncampbell-cordova-plugin-intent/package.json b/plugins/com-darryncampbell-cordova-plugin-intent/package.json
deleted file mode 100644
index 7fdfa1a..0000000
--- a/plugins/com-darryncampbell-cordova-plugin-intent/package.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "_from": "com-darryncampbell-cordova-plugin-intent@^1.1.0",
- "_id": "com-darryncampbell-cordova-plugin-intent@1.1.0",
- "_inBundle": false,
- "_integrity": "sha512-KPyU4RlOl1ofliMSyHms3eyyzIAvRCEpGda5T8j3XXmYeU0YdLG7UeHat84eJWByjv8K7XhMbVu841DnipPrLg==",
- "_location": "/com-darryncampbell-cordova-plugin-intent",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "com-darryncampbell-cordova-plugin-intent@^1.1.0",
- "name": "com-darryncampbell-cordova-plugin-intent",
- "escapedName": "com-darryncampbell-cordova-plugin-intent",
- "rawSpec": "^1.1.0",
- "saveSpec": null,
- "fetchSpec": "^1.1.0"
- },
- "_requiredBy": [
- "#USER",
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/com-darryncampbell-cordova-plugin-intent/-/com-darryncampbell-cordova-plugin-intent-1.1.0.tgz",
- "_shasum": "ab7506183a9d171d6448e79c9722f2526f8a7efc",
- "_spec": "com-darryncampbell-cordova-plugin-intent@^1.1.0",
- "_where": "/home/thrrgilag/workspace/cordova/Goober",
- "author": {
- "name": "Darryn Campbell"
- },
- "bugs": {
- "url": "https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent/issues"
- },
- "bundleDependencies": false,
- "cordova": {
- "id": "com-darryncampbell-cordova-plugin-intent",
- "platforms": [
- "android"
- ]
- },
- "deprecated": false,
- "description": "General purpose intent shim layer for cordova appliations on Android. Handles various techniques for sending and receiving intents.",
- "homepage": "https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent#readme",
- "keywords": [
- "ecosystem:cordova",
- "cordova-android",
- "Intent"
- ],
- "license": "MIT",
- "main": "intentShim.js",
- "name": "com-darryncampbell-cordova-plugin-intent",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent.git"
- },
- "version": "1.1.0"
-}
diff --git a/plugins/com-darryncampbell-cordova-plugin-intent/plugin.xml b/plugins/com-darryncampbell-cordova-plugin-intent/plugin.xml
deleted file mode 100644
index e5f233f..0000000
--- a/plugins/com-darryncampbell-cordova-plugin-intent/plugin.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
- Intent Shim
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/com-darryncampbell-cordova-plugin-intent/src/android/IntentShim.java b/plugins/com-darryncampbell-cordova-plugin-intent/src/android/IntentShim.java
deleted file mode 100644
index b67978e..0000000
--- a/plugins/com-darryncampbell-cordova-plugin-intent/src/android/IntentShim.java
+++ /dev/null
@@ -1,794 +0,0 @@
-package com.darryncampbell.cordova.plugin.intent;
-
-import android.Manifest;
-import android.app.Activity;
-import android.content.BroadcastReceiver;
-import android.content.ClipData;
-import android.content.ComponentName;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.PackageManager;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.Environment;
-import android.provider.DocumentsContract;
-import android.provider.MediaStore;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.content.ContextCompat;
-import android.support.v4.content.FileProvider;
-import android.text.Html;
-import android.util.Log;
-import android.webkit.MimeTypeMap;
-
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.CordovaActivity;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.CordovaResourceApi;
-import org.apache.cordova.PluginResult;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.io.File;
-
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import static android.os.Environment.getExternalStorageDirectory;
-import static android.os.Environment.getExternalStorageState;
-
-public class IntentShim extends CordovaPlugin {
-
- private static final String LOG_TAG = "Cordova Intents Shim";
- private CallbackContext onNewIntentCallbackContext = null;
- private CallbackContext onBroadcastCallbackContext = null;
- private CallbackContext onActivityResultCallbackContext = null;
-
- private Intent deferredIntent = null;
-
- public IntentShim() {
-
- }
-
- public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException
- {
- Log.d(LOG_TAG, "Action: " + action);
- if (action.equals("startActivity") || action.equals("startActivityForResult"))
- {
- // Credit: https://github.com/chrisekelley/cordova-webintent
- if (args.length() != 1) {
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.INVALID_ACTION));
- return false;
- }
-
- JSONObject obj = args.getJSONObject(0);
- Intent intent = populateIntent(obj, callbackContext);
- int requestCode = obj.has("requestCode") ? obj.getInt("requestCode") : 1;
-
- boolean bExpectResult = false;
- if (action.equals("startActivityForResult"))
- {
- bExpectResult = true;
- this.onActivityResultCallbackContext = callbackContext;
- }
- startActivity(intent, bExpectResult, requestCode, callbackContext);
-
- return true;
- }
- else if (action.equals("sendBroadcast"))
- {
- // Credit: https://github.com/chrisekelley/cordova-webintent
- if (args.length() != 1) {
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.INVALID_ACTION));
- return false;
- }
-
- // Parse the arguments
- JSONObject obj = args.getJSONObject(0);
- Intent intent = populateIntent(obj, callbackContext);
-
- sendBroadcast(intent);
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));
- return true;
- }
- else if (action.equals("startService"))
- {
- if (args.length() != 1) {
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.INVALID_ACTION));
- return false;
- }
- JSONObject obj = args.getJSONObject(0);
- Intent intent = populateIntent(obj, callbackContext);
- startService(intent);
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));
- return true;
- }
- else if (action.equals("registerBroadcastReceiver")) {
- try
- {
- // Ensure we only have a single registered broadcast receiver
- ((CordovaActivity)this.cordova.getActivity()).unregisterReceiver(myBroadcastReceiver);
- }
- catch (IllegalArgumentException e) {}
-
- // No error callback
- if(args.length() != 1) {
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.INVALID_ACTION));
- return false;
- }
-
- // Expect an array of filterActions
- JSONObject obj = args.getJSONObject(0);
- JSONArray filterActions = obj.has("filterActions") ? obj.getJSONArray("filterActions") : null;
- if (filterActions == null || filterActions.length() == 0)
- {
- // The arguments are not correct
- Log.w(LOG_TAG, "filterActions argument is not in the expected format");
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.INVALID_ACTION));
- return false;
- }
-
- this.onBroadcastCallbackContext = callbackContext;
-
- PluginResult result = new PluginResult(PluginResult.Status.NO_RESULT);
- result.setKeepCallback(true);
-
- IntentFilter filter = new IntentFilter();
- for (int i = 0; i < filterActions.length(); i++) {
- Log.d(LOG_TAG, "Registering broadcast receiver for filter: " + filterActions.getString(i));
- filter.addAction(filterActions.getString(i));
- }
-
- // Allow an array of filterCategories
- JSONArray filterCategories = obj.has("filterCategories") ? obj.getJSONArray("filterCategories") : null;
- if (filterCategories != null) {
- for (int i = 0; i < filterCategories.length(); i++) {
- Log.d(LOG_TAG, "Registering broadcast receiver for category filter: " + filterCategories.getString(i));
- filter.addCategory(filterCategories.getString(i));
- }
- }
-
- // Add any specified Data Schemes
- // https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent/issues/24
- JSONArray filterDataSchemes = obj.has("filterDataSchemes") ? obj.getJSONArray("filterDataSchemes") : null;
- if (filterDataSchemes != null && filterDataSchemes.length() > 0)
- {
- for (int i = 0; i < filterDataSchemes.length(); i++)
- {
- Log.d(LOG_TAG, "Associating data scheme to filter: " + filterDataSchemes.getString(i));
- filter.addDataScheme(filterDataSchemes.getString(i));
- }
- }
-
- ((CordovaActivity)this.cordova.getActivity()).registerReceiver(myBroadcastReceiver, filter);
-
- callbackContext.sendPluginResult(result);
- }
- else if (action.equals("unregisterBroadcastReceiver"))
- {
- try
- {
- ((CordovaActivity)this.cordova.getActivity()).unregisterReceiver(myBroadcastReceiver);
- }
- catch (IllegalArgumentException e) {}
- }
- else if (action.equals("onIntent"))
- {
- // Credit: https://github.com/napolitano/cordova-plugin-intent
- if(args.length() != 1) {
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.INVALID_ACTION));
- return false;
- }
-
- this.onNewIntentCallbackContext = callbackContext;
-
- if (this.deferredIntent != null) {
- fireOnNewIntent(this.deferredIntent);
- this.deferredIntent = null;
- }
-
- PluginResult result = new PluginResult(PluginResult.Status.NO_RESULT);
- result.setKeepCallback(true);
- callbackContext.sendPluginResult(result);
- return true;
- }
- else if (action.equals("onActivityResult"))
- {
- if(args.length() != 1) {
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.INVALID_ACTION));
- return false;
- }
-
- this.onActivityResultCallbackContext = callbackContext;
-
- PluginResult result = new PluginResult(PluginResult.Status.NO_RESULT);
- result.setKeepCallback(true);
- callbackContext.sendPluginResult(result);
- return true;
- }
- else if (action.equals("getIntent"))
- {
- // Credit: https://github.com/napolitano/cordova-plugin-intent
- if(args.length() != 0) {
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.INVALID_ACTION));
- return false;
- }
-
- Intent intent;
-
- if (this.deferredIntent != null) {
- intent = this.deferredIntent;
- this.deferredIntent = null;
- }
- else {
- intent = cordova.getActivity().getIntent();
- }
-
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, getIntentJson(intent)));
- return true;
- }
- else if (action.equals("sendResult"))
- {
- // Assuming this application was started with startActivityForResult, send the result back
- // https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent/issues/3
- Intent result = new Intent();
- if (args.length() > 0)
- {
- JSONObject json = args.getJSONObject(0);
- JSONObject extras = (json.has("extras"))?json.getJSONObject("extras"):null;
-
- // Populate the extras if any exist
- if (extras != null) {
- JSONArray extraNames = extras.names();
- for (int i = 0; i < extraNames.length(); i++) {
- String key = extraNames.getString(i);
- String value = extras.getString(key);
- result.putExtra(key, value);
- }
- }
- }
-
- //set result
- cordova.getActivity().setResult(Activity.RESULT_OK, result);
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));
-
- //finish the activity
- cordova.getActivity().finish();
-
- }
- else if (action.equals("realPathFromUri"))
- {
- if (args.length() != 1) {
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.INVALID_ACTION));
- return false;
- }
-
- JSONObject obj = args.getJSONObject(0);
- String realPath = getRealPathFromURI_API19(obj, callbackContext);
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, realPath));
- return true;
-
- }
-
- return true;
- }
-
- private Uri remapUriWithFileProvider(String uriAsString, final CallbackContext callbackContext)
- {
- // Create the URI via FileProvider Special case for N and above when installing apks
- int permissionCheck = ContextCompat.checkSelfPermission(this.cordova.getActivity(),
- Manifest.permission.READ_EXTERNAL_STORAGE);
- if (permissionCheck != PackageManager.PERMISSION_GRANTED)
- {
- // Could do better here - if the app does not already have permission should
- // only continue when we get the success callback from this.
- ActivityCompat.requestPermissions(this.cordova.getActivity(),
- new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 1);
- callbackContext.error("Please grant read external storage permission");
- return null;
- }
-
- try
- {
- String externalStorageState = getExternalStorageState();
- if (externalStorageState.equals(Environment.MEDIA_MOUNTED) || externalStorageState.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) {
- String fileName = uriAsString.substring(uriAsString.indexOf('/') + 2, uriAsString.length());
- File uriAsFile = new File(fileName);
- boolean fileExists = uriAsFile.exists();
- if (!fileExists)
- {
- Log.e(LOG_TAG, "File at path " + uriAsFile.getPath() + " with name " + uriAsFile.getName() + "does not exist");
- callbackContext.error("File not found: " + uriAsFile.toString());
- return null;
- }
- String PACKAGE_NAME = this.cordova.getActivity().getPackageName() + ".provider";
- Uri uri = FileProvider.getUriForFile(this.cordova.getActivity().getApplicationContext(), PACKAGE_NAME, uriAsFile);
- return uri;
- }
- else
- {
- Log.e(LOG_TAG, "Storage directory is not mounted. Please ensure the device is not connected via USB for file transfer");
- callbackContext.error("Storage directory is returning not mounted");
- return null;
- }
- }
- catch(StringIndexOutOfBoundsException e)
- {
- Log.e(LOG_TAG, "URL is not well formed");
- callbackContext.error("URL is not well formed");
- return null;
- }
- }
-
- private String getRealPathFromURI_API19(JSONObject obj, CallbackContext callbackContext) throws JSONException
- {
- // Credit: https://stackoverflow.com/questions/2789276/android-get-real-path-by-uri-getpath/2790688
- Uri uri = obj.has("uri") ? Uri.parse(obj.getString("uri")) : null;
- if (uri == null)
- {
- Log.w(LOG_TAG, "URI is not a specified parameter");
- throw new JSONException("URI is not a specified parameter");
- }
- if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
- String filePath = "";
- if (uri.getHost().contains("com.android.providers.media")) {
- int permissionCheck = ContextCompat.checkSelfPermission(this.cordova.getActivity(),
- Manifest.permission.READ_EXTERNAL_STORAGE);
- if (permissionCheck != PackageManager.PERMISSION_GRANTED)
- {
- // Could do better here - if the app does not already have permission should
- // only continue when we get the success callback from this.
- ActivityCompat.requestPermissions(this.cordova.getActivity(),
- new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 1);
- callbackContext.error("Please grant read external storage permission");
- return null;
- }
-
- // Image pick from recent
- String wholeID = DocumentsContract.getDocumentId(uri);
-
- // Split at colon, use second item in the array
- String id = wholeID.split(":")[1];
-
- String[] column = {MediaStore.Images.Media.DATA};
-
- // where id is equal to
- String sel = MediaStore.Images.Media._ID + "=?";
-
- // This line requires read storage permission
-
- Cursor cursor = this.cordova.getActivity().getApplicationContext().getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
- column, sel, new String[]{id}, null);
-
- int columnIndex = cursor.getColumnIndex(column[0]);
-
- if (cursor.moveToFirst()) {
- filePath = cursor.getString(columnIndex);
- }
- cursor.close();
- return filePath;
- } else {
- // image pick from gallery
- String[] proj = {MediaStore.Images.Media.DATA};
- Cursor cursor = this.cordova.getActivity().getApplicationContext().getContentResolver().query(uri, proj, null, null, null);
- int column_index
- = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
- cursor.moveToFirst();
- return cursor.getString(column_index);
- }
- }
-
- return "Requires KK or higher";
- }
-
- private void startActivity(Intent i, boolean bExpectResult, int requestCode, CallbackContext callbackContext) {
-
- if (i.resolveActivityInfo(this.cordova.getActivity().getPackageManager(), 0) != null)
- {
- if (bExpectResult)
- {
- cordova.setActivityResultCallback(this);
- ((CordovaActivity) this.cordova.getActivity()).startActivityForResult(i, requestCode);
- }
- else
- {
- ((CordovaActivity)this.cordova.getActivity()).startActivity(i);
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));
- }
- }
- else
- {
- // Return an error as there is no app to handle this intent
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR));
- }
- }
-
- private void sendBroadcast(Intent intent) {
- ((CordovaActivity)this.cordova.getActivity()).sendBroadcast(intent);
- }
-
- private void startService(Intent intent)
- {
- ((CordovaActivity)this.cordova.getActivity()).startService(intent);
- }
-
- private Intent populateIntent(JSONObject obj, CallbackContext callbackContext) throws JSONException
- {
- // Credit: https://github.com/chrisekelley/cordova-webintent
- // Credit: https://github.com/chrisekelley/cordova-webintent
- String type = obj.has("type") ? obj.getString("type") : null;
- String packageAssociated = obj.has("package") ? obj.getString("package") : null;
-
- //Uri uri = obj.has("url") ? resourceApi.remapUri(Uri.parse(obj.getString("url"))) : null;
- Uri uri = null;
- final CordovaResourceApi resourceApi = webView.getResourceApi();
- if (obj.has("url"))
- {
- String uriAsString = obj.getString("url");
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && uriAsString.startsWith("file://"))
- {
- uri = remapUriWithFileProvider(uriAsString, callbackContext);
- }
- else
- {
- uri = resourceApi.remapUri(Uri.parse(obj.getString("url")));
- }
- }
-
- JSONObject extras = obj.has("extras") ? obj.getJSONObject("extras") : null;
- Map extrasMap = new HashMap();
- Bundle bundle = null;
- String bundleKey = "";
- if (extras != null) {
- JSONArray extraNames = extras.names();
- for (int i = 0; i < extraNames.length(); i++) {
- String key = extraNames.getString(i);
- Object extrasObj = extras.get(key);
- if (extrasObj instanceof JSONObject) {
- // The extra is a bundle
- bundleKey = key;
- bundle = toBundle((JSONObject) extras.get(key));
- } else {
- extrasMap.put(key, extras.get(key));
- }
- }
- }
-
- String action = obj.has("action") ? obj.getString("action") : null;
- Intent i = new Intent();
- if (action != null)
- i.setAction(action);
-
- if (type != null && uri != null) {
- i.setDataAndType(uri, type); //Fix the crash problem with android 2.3.6
- } else {
- if (type != null) {
- i.setType(type);
- }
- if (uri != null)
- {
- i.setData(uri);
- }
- }
-
- JSONObject component = obj.has("component") ? obj.getJSONObject("component") : null;
- if (component != null)
- {
- // User has specified an explicit intent
- String componentPackage = component.has("package") ? component.getString("package") : null;
- String componentClass = component.has("class") ? component.getString("class") : null;
- if (componentPackage == null || componentClass == null)
- {
- Log.w(LOG_TAG, "Component specified but missing corresponding package or class");
- throw new JSONException("Component specified but missing corresponding package or class");
- }
-
- else
- {
- ComponentName componentName = new ComponentName(componentPackage, componentClass);
- i.setComponent(componentName);
- }
- }
-
- if (packageAssociated != null)
- i.setPackage(packageAssociated);
-
- JSONArray flags = obj.has("flags") ? obj.getJSONArray("flags") : null;
- if (flags != null)
- {
- int length = flags.length();
- for (int k = 0; k < length; k++)
- {
- i.addFlags(flags.getInt(k));
- }
- }
-
- if (bundle != null)
- i.putExtra(bundleKey, bundle);
-
- for (String key : extrasMap.keySet()) {
- Object value = extrasMap.get(key);
- String valueStr = String.valueOf(value);
- // If type is text html, the extra text must sent as HTML
- if (key.equals(Intent.EXTRA_TEXT) && type.equals("text/html")) {
- i.putExtra(key, Html.fromHtml(valueStr));
- } else if (key.equals(Intent.EXTRA_STREAM)) {
- // allows sharing of images as attachments.
- // value in this case should be a URI of a file
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && valueStr.startsWith("file://"))
- {
- Uri uriOfStream = remapUriWithFileProvider(valueStr, callbackContext);
- if (uriOfStream != null)
- i.putExtra(key, uriOfStream);
- }
- else
- {
- //final CordovaResourceApi resourceApi = webView.getResourceApi();
- i.putExtra(key, resourceApi.remapUri(Uri.parse(valueStr)));
- }
- } else if (key.equals(Intent.EXTRA_EMAIL)) {
- // allows to add the email address of the receiver
- i.putExtra(Intent.EXTRA_EMAIL, new String[] { valueStr });
- } else {
- if (value instanceof Boolean) {
- i.putExtra(key, Boolean.valueOf(valueStr));
- } else if(value instanceof Integer) {
- i.putExtra(key, Integer.valueOf(valueStr));
- } else if(value instanceof Long) {
- i.putExtra(key, Long.valueOf(valueStr));
- } else if(value instanceof Double) {
- i.putExtra(key, Double.valueOf(valueStr));
- } else {
- i.putExtra(key, valueStr);
- }
- }
- }
-
- i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
-
- return i;
- }
-
- @Override
- public void onNewIntent(Intent intent) {
- if (this.onNewIntentCallbackContext != null) {
- fireOnNewIntent(intent);
- }
- else {
- // save the intent for use when onIntent action is called in the execute method
- this.deferredIntent = intent;
- }
- }
-
- @Override
- public void onActivityResult(int requestCode, int resultCode, Intent intent)
- {
- super.onActivityResult(requestCode, resultCode, intent);
- if (onActivityResultCallbackContext != null && intent != null)
- {
- intent.putExtra("requestCode", requestCode);
- intent.putExtra("resultCode", resultCode);
- PluginResult result = new PluginResult(PluginResult.Status.OK, getIntentJson(intent));
- result.setKeepCallback(true);
- onActivityResultCallbackContext.sendPluginResult(result);
- }
- else if (onActivityResultCallbackContext != null)
- {
- Intent canceledIntent = new Intent();
- canceledIntent.putExtra("requestCode", requestCode);
- canceledIntent.putExtra("resultCode", resultCode);
- PluginResult canceledResult = new PluginResult(PluginResult.Status.OK, getIntentJson(canceledIntent));
- canceledResult.setKeepCallback(true);
- onActivityResultCallbackContext.sendPluginResult(canceledResult);
- }
-
- }
-
- private BroadcastReceiver myBroadcastReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
- if (onBroadcastCallbackContext != null)
- {
- PluginResult result = new PluginResult(PluginResult.Status.OK, getIntentJson(intent));
- result.setKeepCallback(true);
- onBroadcastCallbackContext.sendPluginResult(result);
- }
- }
- };
-
- /**
- * Sends the provided Intent to the onNewIntentCallbackContext.
- *
- * @param intent This is the intent to send to the JS layer.
- */
- private void fireOnNewIntent(Intent intent) {
- PluginResult result = new PluginResult(PluginResult.Status.OK, getIntentJson(intent));
- result.setKeepCallback(true);
- this.onNewIntentCallbackContext.sendPluginResult(result);
- }
-
- /**
- * Return JSON representation of intent attributes
- *
- * @param intent
- * Credit: https://github.com/napolitano/cordova-plugin-intent
- */
- private JSONObject getIntentJson(Intent intent) {
- JSONObject intentJSON = null;
- ClipData clipData = null;
- JSONObject[] items = null;
- ContentResolver cR = this.cordova.getActivity().getApplicationContext().getContentResolver();
- MimeTypeMap mime = MimeTypeMap.getSingleton();
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
- clipData = intent.getClipData();
- if(clipData != null) {
- int clipItemCount = clipData.getItemCount();
- items = new JSONObject[clipItemCount];
-
- for (int i = 0; i < clipItemCount; i++) {
-
- ClipData.Item item = clipData.getItemAt(i);
-
- try {
- items[i] = new JSONObject();
- items[i].put("htmlText", item.getHtmlText());
- items[i].put("intent", item.getIntent());
- items[i].put("text", item.getText());
- items[i].put("uri", item.getUri());
-
- if (item.getUri() != null) {
- String type = cR.getType(item.getUri());
- String extension = mime.getExtensionFromMimeType(cR.getType(item.getUri()));
-
- items[i].put("type", type);
- items[i].put("extension", extension);
- }
-
- } catch (JSONException e) {
- Log.d(LOG_TAG, " Error thrown during intent > JSON conversion");
- Log.d(LOG_TAG, e.getMessage());
- Log.d(LOG_TAG, Arrays.toString(e.getStackTrace()));
- }
-
- }
- }
- }
-
- try {
- intentJSON = new JSONObject();
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
- if(items != null) {
- intentJSON.put("clipItems", new JSONArray(items));
- }
- }
-
- intentJSON.put("type", intent.getType());
- intentJSON.put("extras", toJsonObject(intent.getExtras()));
- intentJSON.put("action", intent.getAction());
- intentJSON.put("categories", intent.getCategories());
- intentJSON.put("flags", intent.getFlags());
- intentJSON.put("component", intent.getComponent());
- intentJSON.put("data", intent.getData());
- intentJSON.put("package", intent.getPackage());
-
- return intentJSON;
- } catch (JSONException e) {
- Log.d(LOG_TAG, " Error thrown during intent > JSON conversion");
- Log.d(LOG_TAG, e.getMessage());
- Log.d(LOG_TAG, Arrays.toString(e.getStackTrace()));
-
- return null;
- }
- }
-
- private static JSONObject toJsonObject(Bundle bundle) {
- // Credit: https://github.com/napolitano/cordova-plugin-intent
- try {
- return (JSONObject) toJsonValue(bundle);
- } catch (JSONException e) {
- throw new IllegalArgumentException("Cannot convert bundle to JSON: " + e.getMessage(), e);
- }
- }
-
- private static Object toJsonValue(final Object value) throws JSONException {
- // Credit: https://github.com/napolitano/cordova-plugin-intent
- if (value == null) {
- return null;
- } else if (value instanceof Bundle) {
- final Bundle bundle = (Bundle) value;
- final JSONObject result = new JSONObject();
- for (final String key : bundle.keySet()) {
- result.put(key, toJsonValue(bundle.get(key)));
- }
- return result;
- } else if ((value.getClass().isArray())) {
- final JSONArray result = new JSONArray();
- int length = Array.getLength(value);
- for (int i = 0; i < length; ++i) {
- result.put(i, toJsonValue(Array.get(value, i)));
- }
- return result;
- }
- else if (value instanceof ArrayList>) {
- final ArrayList arrayList = (ArrayList>)value;
- final JSONArray result = new JSONArray();
- for (int i = 0; i < arrayList.size(); i++)
- result.put(toJsonValue(arrayList.get(i)));
- return result;
- }
- else if (
- value instanceof String
- || value instanceof Boolean
- || value instanceof Integer
- || value instanceof Long
- || value instanceof Double) {
- return value;
- } else {
- return String.valueOf(value);
- }
- }
-
- private Bundle toBundle(final JSONObject obj) {
- Bundle returnBundle = new Bundle();
- if (obj == null) {
- return null;
- }
- try {
- Iterator> keys = obj.keys();
- while(keys.hasNext())
- {
- String key = (String)keys.next();
- Object compare = obj.get(key);
- if (obj.get(key) instanceof String)
- returnBundle.putString(key, obj.getString(key));
- else if (obj.get(key) instanceof Boolean)
- returnBundle.putBoolean(key, obj.getBoolean(key));
- else if (obj.get(key) instanceof Integer)
- returnBundle.putInt(key, obj.getInt(key));
- else if (obj.get(key) instanceof Long)
- returnBundle.putLong(key, obj.getLong(key));
- else if (obj.get(key) instanceof Double)
- returnBundle.putDouble(key, obj.getDouble(key));
- else if (obj.get(key).getClass().isArray() || obj.get(key) instanceof JSONArray)
- {
- JSONArray jsonArray = obj.getJSONArray(key);
- int length = jsonArray.length();
- if (jsonArray.get(0) instanceof String)
- {
- String[] stringArray = new String[length];
- for (int j = 0; j < length; j++)
- stringArray[j] = jsonArray.getString(j);
- returnBundle.putStringArray(key, stringArray);
- //returnBundle.putParcelableArray(key, obj.get);
- }
- else
- {
- Bundle[] bundleArray = new Bundle[length];
- for (int k = 0; k < length ; k++)
- bundleArray[k] = toBundle(jsonArray.getJSONObject(k));
- returnBundle.putParcelableArray(key, bundleArray);
- }
- }
- else if (obj.get(key) instanceof JSONObject)
- returnBundle.putBundle(key, toBundle((JSONObject)obj.get(key)));
- }
- }
- catch (JSONException e) {
- e.printStackTrace();
- }
-
-
- return returnBundle;
- }
-}
diff --git a/plugins/com-darryncampbell-cordova-plugin-intent/src/android/res/xml/provider_paths.xml b/plugins/com-darryncampbell-cordova-plugin-intent/src/android/res/xml/provider_paths.xml
deleted file mode 100644
index 3785fcc..0000000
--- a/plugins/com-darryncampbell-cordova-plugin-intent/src/android/res/xml/provider_paths.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/plugins/cordova-android-support-gradle-release/README.md b/plugins/cordova-android-support-gradle-release/README.md
deleted file mode 100644
index 97ade49..0000000
--- a/plugins/cordova-android-support-gradle-release/README.md
+++ /dev/null
@@ -1,172 +0,0 @@
-cordova-android-support-gradle-release
-======================================
-
-This Cordova/Phonegap plugin for Android aligns various versions of the Android Support libraries specified by other plugins to a specific version.
-
-
-
-**Table of Contents**
-
-- [Purpose](#purpose)
-- [Installation](#installation)
-- [Library versions](#library-versions)
- - [Default version](#default-version)
- - [Other versions](#other-versions)
-- [Example cases](#example-cases)
- - [Example 1](#example-1)
- - [Example 2](#example-2)
-- [Credits](#credits)
-- [License](#license)
-
-
-
-# Purpose
-
-**TL;DR**: To prevent build failures caused by including different versions of the support libraries.
-
-Some Cordova plugins include [Android Support Libraries](https://developer.android.com/topic/libraries/support-library/index.html) to faciliate them.
-Most commonly, these are now included into the Cordova project by specifying them as Gradle dependencies (see the [Cordova plugin spec documentation](https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#framework)).
-
-Example plugins:
-- [cordova-diagnostic-plugin](https://github.com/dpa99c/cordova-diagnostic-plugin)
-- [Telerik ImagePicker plugin](https://github.com/Telerik-Verified-Plugins/ImagePicker)
-- [cordova-plugin-local-notifications](https://github.com/katzer/cordova-plugin-local-notifications/)
-- [cordova-plugin-facebook4](https://github.com/jeduan/cordova-plugin-facebook4)
-
-The problem arises when these plugins specify different versions of the support libraries. This can cause build failures to occur, which are not easy to resolve without changes by the plugin authors to align the specified versions. See these issues:
-
-- [phonegap-plugin-barcodescanner#480](https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/480)
-- [cordova-plugin-facebook4#507](https://github.com/jeduan/cordova-plugin-facebook4/issues/507)
-- [cordova-plugin-local-notifications#1322](https://github.com/katzer/cordova-plugin-local-notifications/issues/1322)
-- [cordova-diagnostic-plugin#211](https://github.com/dpa99c/cordova-diagnostic-plugin/issues/211)
-
-To resolve these version collisions, this plugin injects a Gradle configuration file into the native Android platform project, which overrides any versions specified by other plugins, and forces them to the version specified in its Gradle file.
-
-If you're encountering similar problems with the Play Services and/or Firebase libraries, checkout the sister plugins:
-- [cordova-android-play-services-gradle-release](https://github.com/dpa99c/cordova-android-play-services-gradle-release)
-- [cordova-android-firebase-gradle-release](https://github.com/dpa99c/cordova-android-firebase-gradle-release)
-
-
-
-# Installation
-
- $ cordova plugin add cordova-android-support-gradle-release
- $ cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION={required version}
-
-The plugin needs to be installed with the [`cordova-fetch`](https://cordova.apache.org/news/2016/05/24/tools-release.html) mechanism in order to satisfy its [package dependencies](https://github.com/dpa99c/cordova-android-support-gradle-release/blob/master/package.json#L8) by installing it via npm.
-
-Therefore if you're installing with `cordova@6`, you'll need to explicitly specify the `--fetch` option:
-
- $ cordova plugin add cordova-android-support-gradle-release --fetch
-
-# Library versions
-
-## Default version
-By default, this plugin will use the major version of the most recent release of the support libraries - [see here](https://developer.android.com/topic/libraries/support-library/revisions.html) for a list recent versions. "Most recent release" means the highest major version that will not result in an Alpha or Beta version being included.
-
- $ cordova plugin add cordova-android-support-gradle-release
-
-For example, if the most recent versions are:
-- `26.0.0 Beta 2`
-- `25.4.0`
-
-Then this plugin will default to `25.+` because `26` is still in Beta.
-
-## Other versions
-
-In some cases, you may want to specify a different version of the support libraries. For example, [Telerik ImagePicker plugin v2.1.7](https://github.com/Telerik-Verified-Plugins/ImagePicker/tree/2.1.7) specifies `v23` because it contains code that is incompatible with `v24+`.
-
-In this case, including the default version of this plugin will still result in a build error. So this plugin enables you to specify other versions of the support library using the `ANDROID_SUPPORT_VERSION` plugin variable.
-
-In the above case, you'd want to install v23 of the support library. To so, you'd specify the version via the variable:
-
- cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=23.+
-
-# Example cases
-
-## Example 1
-
-Uses v25 of the support libraries to fix the build issue.
-
-1. `cordova create test1 && cd test1/`
-2. `cordova platform add android@latest`
-3. `cordova plugin add cordova-plugin-facebook4@1.9.1 --save --variable APP_ID="123456789" --variable APP_NAME="myApplication"`
-4. `cordova compile`
-
-Observe the build succeeds and in the console output is `v25.3.1` of Android Support Library:
-
- :prepareComAndroidSupportSupportV42531Library
-
-5. `cordova plugin add de.appplant.cordova.plugin.local-notification@0.8.5`
-6. `cordova compile`
-
-Observe the build failed and in the console output is higher than `v25.3.1` (e.g `v26.0.0-alpha1`) of Android Support Library:
-
- :prepareComAndroidSupportSupportV42600Alpha1Library
-
-7. `cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=25.+`
-8. `cordova prepare && cordova compile`
-
-Observe the build succeeds and in the console output is `v25` of Android Support Library.
-
-## Example 2
-
-Uses v23 of the support libraries to fix the build issue, because v2.1.7 of the ImagePicker only works with v23.
-
-1. `cordova create test2 && cd test2/`
-2. `cordova platform add android@latest`
-3. `cordova plugin add https://github.com/Telerik-Verified-Plugins/ImagePicker.git#2.1.7`
-4. `cordova compile`
-
-Observe the build succeeds and in the console output is `v23.4.0` of Android Support Library:
-
- :prepareComAndroidSupportSupportV42340Library
-
-5. `cordova plugin add cordova.plugins.diagnostic@3.6.5`
-
-Observe the build failed and in the console output is higher than `v23.4.0` (e.g `v26.0.0-alpha1`) of Android Support Library:
-
- :prepareComAndroidSupportSupportV42600Alpha1Library
-
-7. `cordova plugin add cordova-android-support-gradle-release`
-8. `cordova compile`
-
-Observe the build still failed and in the console output is still higher than `v23.4.0` (e.g `v25.3.1`) of Android Support Library:
-
- :prepareComAndroidSupportSupportV42531Library
-
-9. `cordova plugin rm cordova-android-support-gradle-release`
-10. `cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=23.+`
-11. `cordova prepare && cordova compile`
-
-Observe the build succeeds and in the console output is v23 of Android Support Library.
-
-
-# Credits
-
-Thanks to [**Chris Scott, Transistor Software**](https://github.com/christocracy) for his idea of extending the initial implementation to support dynamic specification of the library version via a plugin variable in [cordova-google-api-version](https://github.com/transistorsoft/cordova-google-api-version)
-
-License
-================
-
-The MIT License
-
-Copyright (c) 2017 Dave Alden / Working Edge Ltd.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file
diff --git a/plugins/cordova-android-support-gradle-release/cordova-android-support-gradle-release.gradle b/plugins/cordova-android-support-gradle-release/cordova-android-support-gradle-release.gradle
deleted file mode 100644
index 1b0bd72..0000000
--- a/plugins/cordova-android-support-gradle-release/cordova-android-support-gradle-release.gradle
+++ /dev/null
@@ -1,31 +0,0 @@
-repositories{
- // Google APIs are now hosted at Maven
- maven {
- url 'https://maven.google.com'
- }
-}
-
-def PLUGIN_NAME = "cordova-android-support-gradle-release"
-
-// Fetch ANDROID_SUPPORT_VERSION var from properties.gradle
-apply from: PLUGIN_NAME + '/properties.gradle'
-
-// List of libs to search for.
-def LIBS = [
- 'com.android.support'
-]
-
-def IGNORED = [
- 'multidex',
- 'multidex-instrumentation'
-]
-
-println("+-----------------------------------------------------------------");
-println("| " + PLUGIN_NAME + ": " + ANDROID_SUPPORT_VERSION);
-println("+-----------------------------------------------------------------");
-
-configurations.all {
- resolutionStrategy.eachDependency { DependencyResolveDetails details ->
- if (details.requested.group in LIBS && !(details.requested.name in IGNORED)) { details.useVersion ANDROID_SUPPORT_VERSION }
- }
-}
diff --git a/plugins/cordova-android-support-gradle-release/package.json b/plugins/cordova-android-support-gradle-release/package.json
deleted file mode 100644
index 3e3e9a7..0000000
--- a/plugins/cordova-android-support-gradle-release/package.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "_from": "cordova-android-support-gradle-release@^1.4.4",
- "_id": "cordova-android-support-gradle-release@1.4.4",
- "_inBundle": false,
- "_integrity": "sha512-DOwZ+MX0CBoagXV6cHqfQacVjsrDea8z2wuM427AIvi2eAFvojw85o1XMCdJ4kSDMbsUUaNPw12h7uY0m+rcvg==",
- "_location": "/cordova-android-support-gradle-release",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "cordova-android-support-gradle-release@^1.4.4",
- "name": "cordova-android-support-gradle-release",
- "escapedName": "cordova-android-support-gradle-release",
- "rawSpec": "^1.4.4",
- "saveSpec": null,
- "fetchSpec": "^1.4.4"
- },
- "_requiredBy": [
- "#USER",
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/cordova-android-support-gradle-release/-/cordova-android-support-gradle-release-1.4.4.tgz",
- "_shasum": "6a64db69f36c332727d95b421d53c25dfe99684d",
- "_spec": "cordova-android-support-gradle-release@^1.4.4",
- "_where": "/home/thrrgilag/workspace/cordova/Goober",
- "author": {
- "name": "Dave Alden"
- },
- "bundleDependencies": false,
- "dependencies": {
- "xml2js": "~0.4.19"
- },
- "deprecated": false,
- "description": "Cordova/Phonegap plugin to align various versions of the Android Support libraries specified by other plugins to a specific version",
- "devDependencies": {},
- "license": "MIT",
- "name": "cordova-android-support-gradle-release",
- "version": "1.4.4"
-}
diff --git a/plugins/cordova-android-support-gradle-release/plugin.xml b/plugins/cordova-android-support-gradle-release/plugin.xml
deleted file mode 100644
index 7407f7b..0000000
--- a/plugins/cordova-android-support-gradle-release/plugin.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- cordova-android-support-gradle-release
- Cordova/Phonegap plugin to align various versions of the Android Support libraries specified by other plugins to a specific version
- Dave Alden
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/cordova-android-support-gradle-release/properties.gradle b/plugins/cordova-android-support-gradle-release/properties.gradle
deleted file mode 100644
index 5d42a85..0000000
--- a/plugins/cordova-android-support-gradle-release/properties.gradle
+++ /dev/null
@@ -1 +0,0 @@
-ext {ANDROID_SUPPORT_VERSION = "27.+"}
\ No newline at end of file
diff --git a/plugins/cordova-android-support-gradle-release/scripts/apply-changes.js b/plugins/cordova-android-support-gradle-release/scripts/apply-changes.js
deleted file mode 100644
index 12adaf0..0000000
--- a/plugins/cordova-android-support-gradle-release/scripts/apply-changes.js
+++ /dev/null
@@ -1,90 +0,0 @@
-const PLUGIN_NAME = "cordova-android-support-gradle-release";
-const V6 = "cordova-android@6";
-const V7 = "cordova-android@7";
-const PACKAGE_PATTERN = /(compile "com.android.support:[^:]+:)([^"]+)"/g;
-const PROPERTIES_TEMPLATE = 'ext {ANDROID_SUPPORT_VERSION = ""}';
-
-var FILE_PATHS = {};
-FILE_PATHS[V6] = {
- "build.gradle": "platforms/android/build.gradle",
- "properties.gradle": "platforms/android/"+PLUGIN_NAME+"/properties.gradle"
-};
-FILE_PATHS[V7] = {
- "build.gradle": "platforms/android/app/build.gradle",
- "properties.gradle": "platforms/android/app/"+PLUGIN_NAME+"/properties.gradle"
-};
-
-var deferral, fs, path, parser, platformVersion;
-
-
-function log(message) {
- console.log(PLUGIN_NAME + ": " + message);
-}
-
-function onError(error) {
- log("ERROR: " + error);
- deferral.resolve();
-}
-
-function getCordovaAndroidVersion(){
- var cordovaVersion = require(path.resolve(process.cwd(),'platforms/android/cordova/version'));
- return parseInt(cordovaVersion.version) === 7 ? V7 : V6;
-}
-
-
-function run() {
- try {
- fs = require('fs');
- path = require('path');
- parser = require('xml2js');
- } catch (e) {
- throw("Failed to load dependencies. If using cordova@6 CLI, ensure this plugin is installed with the --fetch option: " + e.toString());
- }
-
- platformVersion = getCordovaAndroidVersion();
- log("Android platform: " + platformVersion);
-
- var data = fs.readFileSync(path.resolve(process.cwd(), 'config.xml'));
- parser.parseString(data, attempt(function (err, result) {
- if (err) throw err;
- var version, plugins = result.widget.plugin;
- for (var n = 0, len = plugins.length; n < len; n++) {
- var plugin = plugins[n];
- if (plugin.$.name === PLUGIN_NAME && plugin.variable && plugin.variable.length > 0) {
- version = plugin.variable.pop().$.value;
- break;
- }
- }
- if (version) {
- // build.gradle
- var buildGradlePath = path.resolve(process.cwd(), FILE_PATHS[platformVersion]["build.gradle"]);
- var contents = fs.readFileSync(buildGradlePath).toString();
- fs.writeFileSync(buildGradlePath, contents.replace(PACKAGE_PATTERN, "$1" + version + '"'), 'utf8');
- log("Wrote custom version '" + version + "' to " + buildGradlePath);
-
- // properties.gradle
- var propertiesGradlePath = path.resolve(process.cwd(), FILE_PATHS[platformVersion]["properties.gradle"]);
- fs.writeFileSync(propertiesGradlePath, PROPERTIES_TEMPLATE.replace(//, version), 'utf8');
- log("Wrote custom version '" + version + "' to " + propertiesGradlePath);
- } else {
- log("No custom version found in config.xml - using plugin default");
- }
- deferral.resolve();
- }));
-}
-
-function attempt(fn) {
- return function () {
- try {
- fn.apply(this, arguments);
- } catch (e) {
- onError("EXCEPTION: " + e.toString());
- }
- }
-}
-
-module.exports = function (ctx) {
- deferral = ctx.requireCordovaModule('q').defer();
- attempt(run)();
- return deferral.promise;
-};
diff --git a/plugins/cordova-plugin-console/CONTRIBUTING.md b/plugins/cordova-plugin-console/CONTRIBUTING.md
deleted file mode 100644
index 4c8e6a5..0000000
--- a/plugins/cordova-plugin-console/CONTRIBUTING.md
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-# Contributing to Apache Cordova
-
-Anyone can contribute to Cordova. And we need your contributions.
-
-There are multiple ways to contribute: report bugs, improve the docs, and
-contribute code.
-
-For instructions on this, start with the
-[contribution overview](http://cordova.apache.org/contribute/).
-
-The details are explained there, but the important items are:
- - Sign and submit an Apache ICLA (Contributor License Agreement).
- - Have a Jira issue open that corresponds to your contribution.
- - Run the tests so your patch doesn't break existing functionality.
-
-We look forward to your contributions!
diff --git a/plugins/cordova-plugin-console/LICENSE b/plugins/cordova-plugin-console/LICENSE
deleted file mode 100644
index 7a4a3ea..0000000
--- a/plugins/cordova-plugin-console/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-console/NOTICE b/plugins/cordova-plugin-console/NOTICE
deleted file mode 100644
index 8ec56a5..0000000
--- a/plugins/cordova-plugin-console/NOTICE
+++ /dev/null
@@ -1,5 +0,0 @@
-Apache Cordova
-Copyright 2012 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
diff --git a/plugins/cordova-plugin-console/README.md b/plugins/cordova-plugin-console/README.md
deleted file mode 100644
index f534be4..0000000
--- a/plugins/cordova-plugin-console/README.md
+++ /dev/null
@@ -1,116 +0,0 @@
----
-title: Console
-description: Get JavaScript logs in your native logs.
----
-
-
-|AppVeyor|Travis CI|
-|:-:|:-:|
-|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-console?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-console)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-console.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-console)|
-
-# cordova-plugin-console
-
-## Deprecated
-
-> This plugin is no longer being worked on as the functionality provided by this plugin is now included in cordova-ios 4.5.0 or greater, and support is already built in to cordova-windows > 5.0.0. You should upgrade your application to use version 2.0.0 of this plugin. It will detect whether or not the plugin is required based on the version of cordova-ios and cordova-windows your app uses.
-> Please file issues for this plugin against their respective platforms (cordova-ios, cordova-windows).
-
-## Description
-
-This plugin is meant to ensure that console.log() is as useful as it can be.
-It adds additional function for iOS, Ubuntu, Windows Phone 8, and Windows. If
-you are happy with how console.log() works for you, then you probably
-don't need this plugin.
-
-This plugin defines a global `console` object.
-
-Although the object is in the global scope, features provided by this plugin
-are not available until after the `deviceready` event.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-:warning: Report issues on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Console%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC)
-
-
-## Installation
-
- cordova plugin add cordova-plugin-console
-
-### Android Quirks
-
-On some platforms other than Android, console.log() will act on multiple
-arguments, such as console.log("1", "2", "3"). However, Android will act only
-on the first argument. Subsequent arguments to console.log() will be ignored.
-This plugin is not the cause of that, it is a limitation of Android itself.
-
-## Supported Methods
-
-The plugin support following methods of the `console` object:
-
-- `console.log`
-- `console.error`
-- `console.exception`
-- `console.warn`
-- `console.info`
-- `console.debug`
-- `console.assert`
-- `console.dir`
-- `console.dirxml`
-- `console.time`
-- `console.timeEnd`
-- `console.table`
-
-## Partially supported Methods
-
-Methods of the `console` object which implemented, but behave different from browser implementation:
-
-- `console.group`
-- `console.groupCollapsed`
-
-The grouping methods are just log name of the group and don't actually indicate grouping for later
-calls to `console` object methods.
-
-## Not supported Methods
-
-Methods of the `console` object which are implemented, but do nothing:
-
-- `console.clear`
-- `console.trace`
-- `console.groupEnd`
-- `console.timeStamp`
-- `console.profile`
-- `console.profileEnd`
-- `console.count`
-
-## Supported formatting
-
-The following formatting options available:
-
-Format chars:
-
-* `%j` - format arg as JSON
-* `%o` - format arg as JSON
-* `%c` - format arg as `''`. No color formatting could be done.
-* `%%` - replace with `'%'`
-
-Any other char following `%` will format its arg via `toString()`.
diff --git a/plugins/cordova-plugin-console/RELEASENOTES.md b/plugins/cordova-plugin-console/RELEASENOTES.md
deleted file mode 100644
index a6168e0..0000000
--- a/plugins/cordova-plugin-console/RELEASENOTES.md
+++ /dev/null
@@ -1,126 +0,0 @@
-
-# Release Notes
-
-### 1.1.0 (Sep 18, 2017)
-* [CB-13170](https://issues.apache.org/jira/browse/CB-13170) Integrated this plugin into `cordova-ios@4.5.0`. This plugin will not install for `cordova-ios >= 4.5.0`.
-* [CB-13028](https://issues.apache.org/jira/browse/CB-13028) (CI) **Browser** builds on `Travis` and `AppVeyor`
-* [CB-13000](https://issues.apache.org/jira/browse/CB-13000) (CI) Speed up **Android** builds
-* [CB-12991](https://issues.apache.org/jira/browse/CB-12991) (CI) Updated CI badges
-* [CB-12935](https://issues.apache.org/jira/browse/CB-12935) (**windows**) Enable paramedic builds on AppVeyor
-* [CB-12935](https://issues.apache.org/jira/browse/CB-12935) (**ios**, **Android**) Run `paramedic` builds on `Travis`
-* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`.
-
-### 1.0.7 (Apr 27, 2017)
-* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README`
-* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder
-
-### 1.0.6 (Feb 28, 2017)
-* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0**
-* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges
-
-### 1.0.5 (Dec 07, 2016)
-* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.0.5
-* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…"
-* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version.
-
-### 1.0.4 (Sep 08, 2016)
-* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to `cordovaDependencies`
-* add `JIRA` issue tracker link
-* Add badges for paramedic builds on Jenkins
-* Add pull request template.
-* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md
-
-### 1.0.3 (Apr 15, 2016)
-* [CB-10720](https://issues.apache.org/jira/browse/CB-10720) Minor spelling/formatting changes.
-* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins
-
-### 1.0.2 (Nov 18, 2015)
-* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest
-* Fixing contribute link.
-* Document formatting options for the console object
-* [CB-5089](https://issues.apache.org/jira/browse/CB-5089) Document supported methods for console object
-* reverted `d58f218b9149d362ebb0b8ce697cf403569d14cd` because `logger` is not needed on **Android**
-
-### 1.0.1 (Jun 17, 2015)
-* move logger.js and console-via-logger.js to common modules, instead of the numerous repeats that were there.
-* clean up tests, info is below log level so it does not exist by default.
-* add a couple tests
-* [CB-9191](https://issues.apache.org/jira/browse/CB-9191) Add basic test
-* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-console documentation translation: cordova-plugin-console
-* attempt to fix npm markdown issue
-
-### 1.0.0 (Apr 15, 2015)
-* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump
-* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name
-* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id
-* Use TRAVIS_BUILD_DIR, install paramedic by npm
-* docs: renamed Windows8 to Windows
-* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme
-* [CB-8560](https://issues.apache.org/jira/browse/CB-8560) Integrate TravisCI
-* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-console documentation translation: cordova-plugin-console
-* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file
-* [CB-8362](https://issues.apache.org/jira/browse/CB-8362) Add Windows platform section to Console plugin
-
-### 0.2.13 (Feb 04, 2015)
-* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) ios: Use argumentForIndex rather than NSArray extension
-
-### 0.2.12 (Dec 02, 2014)
-* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention `deviceready` in plugin docs
-* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-console documentation translation: cordova-plugin-console
-
-### 0.2.11 (Sep 17, 2014)
-* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-console documentation translation
-
-### 0.2.10 (Aug 06, 2014)
-* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs
-
-### 0.2.9 (Jun 05, 2014)
-* [CB-6848](https://issues.apache.org/jira/browse/CB-6848) Add Android quirk, list applicable platforms
-* [CB-6796](https://issues.apache.org/jira/browse/CB-6796) Add license
-* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md
-
-### 0.2.8 (Apr 17, 2014)
-* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers
-* Add NOTICE file
-
-### 0.2.7 (Feb 05, 2014)
-* Native console needs to be called DebugConsole to avoid ambiguous reference. This commit requires the 3.4.0 version of the native class factory
-* [CB-4718](https://issues.apache.org/jira/browse/CB-4718) fixed Console plugin not working on wp
-
-### 0.2.6 (Jan 02, 2014)
-* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc/index.md for Console plugin
-
-### 0.2.5 (Dec 4, 2013)
-* add ubuntu platform
-
-### 0.2.4 (Oct 28, 2013)
-* [CB-5154](https://issues.apache.org/jira/browse/CB-5154) log formatting incorrectly to native
-* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): added repo + issue tag to plugin.xml for console plugin
-* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch.
-
-### 0.2.3 (Sept 25, 2013)
-* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version
-* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.console to org.apache.cordova.console
-* Rename CHANGELOG.md -> RELEASENOTES.md
-* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch.
-
-
diff --git a/plugins/cordova-plugin-console/doc/de/README.md b/plugins/cordova-plugin-console/doc/de/README.md
deleted file mode 100644
index 933c1b7..0000000
--- a/plugins/cordova-plugin-console/doc/de/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-# cordova-plugin-console
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-console.svg)](https://travis-ci.org/apache/cordova-plugin-console)
-
-Dieses Plugin stellt sicher, dass der Befehl console.log() so hilfreich ist, wie er sein kann. Es fügt zusätzliche Funktion für iOS, Ubuntu, Windows Phone 8 und Windows. Teilweise kann es vorkommen, dass der Befehl console.log() nicht korrekt erkannt wird, und es zu Fehlern bzw. zu nicht angezeigten Logs in der Console kommt. Wenn Sie mit der derzeitigen Funktionsweise zufrieden sind, kann es sein, dass Sie dieses Plugin nicht benötigen.
-
-Dieses Plugin wird ein global-`console`-Objekt definiert.
-
-Obwohl das Objekt im globalen Gültigkeitsbereich ist, stehen Features von diesem Plugin nicht bis nach dem `deviceready`-Ereignis.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-
-## Installation
-
- cordova plugin add cordova-plugin-console
-
-
-### Android Eigenarten
-
-Auf einigen Plattformen als Android fungieren console.log() auf mehrere Argumente wie console.log ("1", "2", "3"). Android wird jedoch nur auf das erste Argument fungieren. Nachfolgende Argumente zu console.log() werden ignoriert. Dieses Plugin ist nicht die Verantwortung dafür, es ist eine Einschränkung von Android selbst.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-console/doc/de/index.md b/plugins/cordova-plugin-console/doc/de/index.md
deleted file mode 100644
index 9551782..0000000
--- a/plugins/cordova-plugin-console/doc/de/index.md
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-# cordova-plugin-console
-
-Dieses Plugin stellt sicher, dass der Befehl console.log() so hilfreich ist, wie er sein kann. Es fügt zusätzliche Funktion für iOS, Ubuntu, Windows Phone 8 und Windows 8 hinzu. Teilweise kann es vorkommen, dass der Befehl console.log() nicht korrekt erkannt wird, und es zu Fehlern bzw. zu nicht angezeigten Logs in der Console kommt. Wenn Sie mit der derzeitigen Funktionsweise zufrieden sind, kann es sein, dass Sie dieses Plugin nicht benötigen.
-
-Dieses Plugin wird ein global-`console`-Objekt definiert.
-
-Obwohl das Objekt im globalen Gültigkeitsbereich ist, stehen Features von diesem Plugin nicht bis nach dem `deviceready`-Ereignis.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-
-## Installation
-
- cordova plugin add cordova-plugin-console
-
-
-### Android Eigenarten
-
-Auf einigen Plattformen als Android fungieren console.log() auf mehrere Argumente wie console.log ("1", "2", "3"). Android wird jedoch nur auf das erste Argument fungieren. Nachfolgende Argumente zu console.log() werden ignoriert. Dieses Plugin ist nicht die Verantwortung dafür, es ist eine Einschränkung von Android selbst.
diff --git a/plugins/cordova-plugin-console/doc/es/README.md b/plugins/cordova-plugin-console/doc/es/README.md
deleted file mode 100644
index b089d63..0000000
--- a/plugins/cordova-plugin-console/doc/es/README.md
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-# cordova-plugin-console
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-console.svg)](https://travis-ci.org/apache/cordova-plugin-console)
-
-Este plugin es para asegurarse de que console.log() es tan útil como puede ser. Agrega la función adicional para iOS, Ubuntu, Windows Phone 8 y Windows. Si estás contento con cómo funciona console.log() para ti, entonces probablemente no necesitas este plugin.
-
-Este plugin define un global `console` objeto.
-
-Aunque el objeto está en el ámbito global, caracterÃsticas proporcionadas por este plugin no están disponibles hasta después de la `deviceready` evento.
-
- document.addEventListener ("deviceready", onDeviceReady, false);
- function onDeviceReady() {console.log ("console.log funciona bien");}
-
-
-## Instalación
-
- cordova plugin add cordova-plugin-console
-
-
-### Rarezas Android
-
-En algunas plataformas que no sean Android, console.log() actuará en varios argumentos, como console.log ("1", "2", "3"). Sin embargo, Android actuará sólo en el primer argumento. Se omitirá posteriores argumentos para console.log(). Este plugin no es la causa de eso, es una limitación propia de Android.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-console/doc/es/index.md b/plugins/cordova-plugin-console/doc/es/index.md
deleted file mode 100644
index e6b8e68..0000000
--- a/plugins/cordova-plugin-console/doc/es/index.md
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-# cordova-plugin-console
-
-Este plugin es para asegurarse de que console.log() es tan útil como puede ser. Añade función adicional para iOS, Windows Phone 8, Ubuntu y Windows 8. Si estás contento con cómo funciona console.log() para ti, entonces probablemente no necesitas este plugin.
-
-Este plugin define un global `console` objeto.
-
-Aunque el objeto está en el ámbito global, caracterÃsticas proporcionadas por este plugin no están disponibles hasta después de la `deviceready` evento.
-
- document.addEventListener ("deviceready", onDeviceReady, false);
- function onDeviceReady() {console.log ("console.log funciona bien");}
-
-
-## Instalación
-
- Cordova plugin agregar cordova-plugin-console
-
-
-### Rarezas Android
-
-En algunas plataformas que no sean Android, console.log() actuará en varios argumentos, como console.log ("1", "2", "3"). Sin embargo, Android actuará sólo en el primer argumento. Se omitirá posteriores argumentos para console.log(). Este plugin no es la causa de eso, es una limitación propia de Android.
diff --git a/plugins/cordova-plugin-console/doc/fr/README.md b/plugins/cordova-plugin-console/doc/fr/README.md
deleted file mode 100644
index 74207ac..0000000
--- a/plugins/cordova-plugin-console/doc/fr/README.md
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-# cordova-plugin-console
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-console.svg)](https://travis-ci.org/apache/cordova-plugin-console)
-
-Ce plugin est destiné à faire en sorte que console.log() est aussi utile que possible. Il ajoute une fonction supplémentaire pour iOS, Ubuntu, Windows Phone 8 et Windows. Si vous êtes satisfait du fonctionnement de console.log() pour vous, alors vous avez probablement pas besoin ce plugin.
-
-Ce plugin définit un global `console` objet.
-
-Bien que l'objet est dans la portée globale, les fonctions offertes par ce plugin ne sont pas disponibles jusqu'après la `deviceready` événement.
-
- document.addEventListener (« deviceready », onDeviceReady, false) ;
- function onDeviceReady() {console.log ("console.log fonctionne bien");}
-
-
-## Installation
-
- cordova plugin add cordova-plugin-console
-
-
-### Quirks Android
-
-Sur certaines plateformes autres que Android, console.log() va agir sur plusieurs arguments, tels que console.log ("1", "2", "3"). Toutefois, Android doit agir uniquement sur le premier argument. Les arguments suivants à console.log() seront ignorées. Ce plugin n'est pas la cause de cela, il s'agit d'une limitation d'Android lui-même.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-console/doc/fr/index.md b/plugins/cordova-plugin-console/doc/fr/index.md
deleted file mode 100644
index d0dbba5..0000000
--- a/plugins/cordova-plugin-console/doc/fr/index.md
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-# cordova-plugin-console
-
-Ce plugin est destiné à faire en sorte que console.log() est aussi utile que possible. Il ajoute une fonction supplémentaire pour iOS, Ubuntu, Windows Phone 8 et Windows 8. Si vous êtes satisfait du fonctionnement de console.log() pour vous, alors vous avez probablement pas besoin ce plugin.
-
-Ce plugin définit un global `console` objet.
-
-Bien que l'objet est dans la portée globale, les fonctions offertes par ce plugin ne sont pas disponibles jusqu'après la `deviceready` événement.
-
- document.addEventListener (« deviceready », onDeviceReady, false) ;
- function onDeviceReady() {console.log ("console.log fonctionne bien");}
-
-
-## Installation
-
- Cordova plugin ajouter cordova-plugin-console
-
-
-### Quirks Android
-
-Sur certaines plateformes autres que Android, console.log() va agir sur plusieurs arguments, tels que console.log ("1", "2", "3"). Toutefois, Android doit agir uniquement sur le premier argument. Les arguments suivants à console.log() seront ignorées. Ce plugin n'est pas la cause de cela, il s'agit d'une limitation d'Android lui-même.
diff --git a/plugins/cordova-plugin-console/doc/it/README.md b/plugins/cordova-plugin-console/doc/it/README.md
deleted file mode 100644
index 5394d55..0000000
--- a/plugins/cordova-plugin-console/doc/it/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-# cordova-plugin-console
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-console.svg)](https://travis-ci.org/apache/cordova-plugin-console)
-
-Questo plugin è intesa a garantire che console.log() è tanto utile quanto può essere. Aggiunge una funzione aggiuntiva per iOS, Ubuntu, Windows Phone 8 e Windows. Se sei soddisfatto di come console.log() funziona per voi, quindi probabilmente non è necessario questo plugin.
-
-Questo plugin definisce un oggetto globale `console`.
-
-Sebbene l'oggetto sia in ambito globale, funzionalità fornite da questo plugin non sono disponibili fino a dopo l'evento `deviceready`.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-
-## Installazione
-
- cordova plugin add cordova-plugin-console
-
-
-### Stranezze Android
-
-Su alcune piattaforme diverse da Android, console.log() agirà su più argomenti, come ad esempio console ("1", "2", "3"). Tuttavia, Android agirà solo sul primo argomento. Argomenti successivi a console.log() verranno ignorati. Questo plugin non è la causa di ciò, è una limitazione di Android stesso.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-console/doc/it/index.md b/plugins/cordova-plugin-console/doc/it/index.md
deleted file mode 100644
index f0625b3..0000000
--- a/plugins/cordova-plugin-console/doc/it/index.md
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-# cordova-plugin-console
-
-Questo plugin è intesa a garantire che console.log() è tanto utile quanto può essere. Aggiunge una funzione aggiuntiva per iOS, Ubuntu, Windows 8 e Windows Phone 8. Se sei soddisfatto di come console.log() funziona per voi, quindi probabilmente non è necessario questo plugin.
-
-Questo plugin definisce un oggetto globale `console`.
-
-Sebbene l'oggetto sia in ambito globale, funzionalità fornite da questo plugin non sono disponibili fino a dopo l'evento `deviceready`.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-
-## Installazione
-
- cordova plugin add cordova-plugin-console
-
-
-### Stranezze Android
-
-Su alcune piattaforme diverse da Android, console.log() agirà su più argomenti, come ad esempio console ("1", "2", "3"). Tuttavia, Android agirà solo sul primo argomento. Argomenti successivi a console.log() verranno ignorati. Questo plugin non è la causa di ciò, è una limitazione di Android stesso.
diff --git a/plugins/cordova-plugin-console/doc/ja/README.md b/plugins/cordova-plugin-console/doc/ja/README.md
deleted file mode 100644
index 059c373..0000000
--- a/plugins/cordova-plugin-console/doc/ja/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-# cordova-plugin-console
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-console.svg)](https://travis-ci.org/apache/cordova-plugin-console)
-
-ã“ã®ãƒ—ラグインã¯ã€ãã® console.log() ãŒã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ä¾¿åˆ©ãªã“ã¨ã‚’確èªã™ã‚‹ã‚‚ã®ã§ã™ã€‚ ãれ㯠iOSã€Ubuntuã€Windows Phone 8 ã¯ã€Windows ã«è¿½åŠ ã®é–¢æ•°ã‚’è¿½åŠ ã—ã¾ã™ã€‚ å ´åˆã¯ã‚ãªãŸã®ãŸã‚ã® console.log() ã®ä½œå“ã«æº€è¶³ã—ã¦ã„ã‚‹ã—ã€ãŠãらãå¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“ã“ã®ãƒ—ラグイン。
-
-ã“ã®ãƒ—ラグインã§ã¯ã€ã‚°ãƒãƒ¼ãƒãƒ« ・ `console` オブジェクトを定義ã—ã¾ã™ã€‚
-
-オブジェクトã¯ã€ã‚°ãƒãƒ¼ãƒãƒ« スコープã§ã§ã™ãŒã€ã“ã®ãƒ—ラグインã«ã‚ˆã£ã¦æä¾›ã•ã‚Œã‚‹æ©Ÿèƒ½ã¯ã€`deviceready` イベントã®å¾Œã¾ã§ä½¿ç”¨ã§ãã¾ã›ã‚“。
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-
-## インストール
-
- cordova plugin add cordova-plugin-console
-
-
-### Android ã®ç™–
-
-アンドãƒã‚¤ãƒ‰ä»¥å¤–ã®ã„ãã¤ã‹ã®ãƒ—ラットフォーム㧠console.log() 㯠console.log (「1ã€ã€ã€Œ2ã€ã€ã€Œ3ã€) ãªã©ã€è¤‡æ•°ã®å¼•æ•°ã«å‹•ä½œã—ã¾ã™ã€‚ ã—ã‹ã—ã€ã‚¢ãƒ³ãƒ‰ãƒã‚¤ãƒ‰ã¯ã€æœ€åˆã®å¼•æ•°ã§ã®ã¿å‹•ä½œã—ã¾ã™ã€‚ console.log() ã«å¾Œç¶šã®å¼•æ•°ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ ã“ã®ãƒ—ラグインãŒåŽŸå› ã§ã¯ãªã„ã€ãれ㯠Android ã®è‡ªä½“ã®åˆ¶é™ã§ã™ã€‚
\ No newline at end of file
diff --git a/plugins/cordova-plugin-console/doc/ja/index.md b/plugins/cordova-plugin-console/doc/ja/index.md
deleted file mode 100644
index 413593c..0000000
--- a/plugins/cordova-plugin-console/doc/ja/index.md
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-# cordova-plugin-console
-
-ã“ã®ãƒ—ラグインã¯ã€ãã® console.log() ãŒã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ä¾¿åˆ©ãªã“ã¨ã‚’確èªã™ã‚‹ã‚‚ã®ã§ã™ã€‚ ãã‚Œã¯ã€iOSã€Ubuntuã€Windows Phone 8 ãŠã‚ˆã³ Windows 8 ã®è¿½åŠ é–¢æ•°ã‚’è¿½åŠ ã—ã¾ã™ã€‚ å ´åˆã¯ã‚ãªãŸã®ãŸã‚ã® console.log() ã®ä½œå“ã«æº€è¶³ã—ã¦ã„ã‚‹ã—ã€ãŠãらãå¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“ã“ã®ãƒ—ラグイン。
-
-ã“ã®ãƒ—ラグインã§ã¯ã€ã‚°ãƒãƒ¼ãƒãƒ« ・ `console` オブジェクトを定義ã—ã¾ã™ã€‚
-
-オブジェクトã¯ã€ã‚°ãƒãƒ¼ãƒãƒ« スコープã§ã§ã™ãŒã€ã“ã®ãƒ—ラグインã«ã‚ˆã£ã¦æä¾›ã•ã‚Œã‚‹æ©Ÿèƒ½ã¯ã€`deviceready` イベントã®å¾Œã¾ã§ä½¿ç”¨ã§ãã¾ã›ã‚“。
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-
-## インストール
-
- cordova plugin add cordova-plugin-console
-
-
-### Android ã®ç™–
-
-アンドãƒã‚¤ãƒ‰ä»¥å¤–ã®ã„ãã¤ã‹ã®ãƒ—ラットフォーム㧠console.log() 㯠console.log (「1ã€ã€ã€Œ2ã€ã€ã€Œ3ã€) ãªã©ã€è¤‡æ•°ã®å¼•æ•°ã«å‹•ä½œã—ã¾ã™ã€‚ ã—ã‹ã—ã€ã‚¢ãƒ³ãƒ‰ãƒã‚¤ãƒ‰ã¯ã€æœ€åˆã®å¼•æ•°ã§ã®ã¿å‹•ä½œã—ã¾ã™ã€‚ console.log() ã«å¾Œç¶šã®å¼•æ•°ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ ã“ã®ãƒ—ラグインãŒåŽŸå› ã§ã¯ãªã„ã€ãれ㯠Android ã®è‡ªä½“ã®åˆ¶é™ã§ã™ã€‚
diff --git a/plugins/cordova-plugin-console/doc/ko/README.md b/plugins/cordova-plugin-console/doc/ko/README.md
deleted file mode 100644
index d03ee5a..0000000
--- a/plugins/cordova-plugin-console/doc/ko/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-# cordova-plugin-console
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-console.svg)](https://travis-ci.org/apache/cordova-plugin-console)
-
-ì´ í”ŒëŸ¬ê·¸ì¸ì„ console.log()ë¡œ 수 ìœ ìš© ë˜ë„ë¡ ì˜ë¯¸ìž…니다. ê·¸ê²ƒì€ iOS, 우분투, Windows Phone 8, ë° ì°½ì— ëŒ€ í•œ 추가 ê¸°ëŠ¥ì„ ì¶”ê°€í•©ë‹ˆë‹¤. Console.log() ë‹¹ì‹ ì„ ìœ„í•´ ìž‘ë™ í•˜ëŠ” 어떻게 행복 í•œ 경우ì—, 그때 ë‹¹ì‹ ì€ ì•„ë§ˆ í•„ìš” 하지 ì•ŠìŠµë‹ˆë‹¤ì´ í”ŒëŸ¬ê·¸ì¸.
-
-ì´ í”ŒëŸ¬ê·¸ì¸ ê¸€ë¡œë²Œ `console` 개체를 ì •ì˜í•©ë‹ˆë‹¤.
-
-개체가 ì „ì— ë²”ìœ„ì— ìžˆì§€ë§Œ,ì´ í”ŒëŸ¬ê·¸ì¸ì— ì˜í•´ ì œê³µ ë˜ëŠ” 기능 하지 ì‚¬ìš©í• ìˆ˜ 있습니다까지 `deviceready` ì´ë²¤íŠ¸ 후.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-
-## 설치
-
- cordova plugin add cordova-plugin-console
-
-
-### 안 ë“œ ë¡œì´ë“œ 단ì
-
-안 ë“œ ë¡œì´ë“œ ì´ì™¸ì˜ ì¼ë¶€ 플랫í¼ì—ì„œ console.log() console.log ("1", "2", "3")와 ê°™ì´ ì—¬ëŸ¬ ì¸ìˆ˜ì— ìž‘ë™í• 것 ì´ë‹¤. 그러나, 안 ë“œ ë¡œì´ë“œëŠ” 첫 번째 ì¸ìˆ˜ì—만 ìž‘ë™í• 것 ì´ë‹¤. Console.log() í›„ì† ì¸ìˆ˜ëŠ” 무시 ë©ë‹ˆë‹¤. ì´ í”ŒëŸ¬ê·¸ì¸ì˜ ì›ì¸ì´ ë˜ì§€ 않습니다, ê·¸ë¦¬ê³ ê·¸ê²ƒì€ ì•ˆ ë“œ ë¡œì´ë“œ ìžì²´ì˜ 한계입니다.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-console/doc/ko/index.md b/plugins/cordova-plugin-console/doc/ko/index.md
deleted file mode 100644
index ca631e4..0000000
--- a/plugins/cordova-plugin-console/doc/ko/index.md
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-# cordova-plugin-console
-
-ì´ í”ŒëŸ¬ê·¸ì¸ì„ console.log()ë¡œ 수 ìœ ìš© ë˜ë„ë¡ ì˜ë¯¸ìž…니다. IOS, 우분투, Windows Phone 8 ë° ìœˆë„ìš° 8ì— ëŒ€ í•œ 추가 ê¸°ëŠ¥ì„ ì¶”ê°€ 하 ê³ í•©ë‹ˆë‹¤. Console.log() ë‹¹ì‹ ì„ ìœ„í•´ ìž‘ë™ í•˜ëŠ” 어떻게 행복 í•œ 경우ì—, 그때 ë‹¹ì‹ ì€ ì•„ë§ˆ í•„ìš” 하지 ì•ŠìŠµë‹ˆë‹¤ì´ í”ŒëŸ¬ê·¸ì¸.
-
-ì´ í”ŒëŸ¬ê·¸ì¸ ê¸€ë¡œë²Œ `console` 개체를 ì •ì˜í•©ë‹ˆë‹¤.
-
-개체가 ì „ì— ë²”ìœ„ì— ìžˆì§€ë§Œ,ì´ í”ŒëŸ¬ê·¸ì¸ì— ì˜í•´ ì œê³µ ë˜ëŠ” 기능 하지 ì‚¬ìš©í• ìˆ˜ 있습니다까지 `deviceready` ì´ë²¤íŠ¸ 후.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-
-## 설치
-
- cordova plugin add cordova-plugin-console
-
-
-### 안 ë“œ ë¡œì´ë“œ 단ì
-
-안 ë“œ ë¡œì´ë“œ ì´ì™¸ì˜ ì¼ë¶€ 플랫í¼ì—ì„œ console.log() console.log ("1", "2", "3")와 ê°™ì´ ì—¬ëŸ¬ ì¸ìˆ˜ì— ìž‘ë™í• 것 ì´ë‹¤. 그러나, 안 ë“œ ë¡œì´ë“œëŠ” 첫 번째 ì¸ìˆ˜ì—만 ìž‘ë™í• 것 ì´ë‹¤. Console.log() í›„ì† ì¸ìˆ˜ëŠ” 무시 ë©ë‹ˆë‹¤. ì´ í”ŒëŸ¬ê·¸ì¸ì˜ ì›ì¸ì´ ë˜ì§€ 않습니다, ê·¸ë¦¬ê³ ê·¸ê²ƒì€ ì•ˆ ë“œ ë¡œì´ë“œ ìžì²´ì˜ 한계입니다.
diff --git a/plugins/cordova-plugin-console/doc/pl/README.md b/plugins/cordova-plugin-console/doc/pl/README.md
deleted file mode 100644
index 78ab9d2..0000000
--- a/plugins/cordova-plugin-console/doc/pl/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-# cordova-plugin-console
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-console.svg)](https://travis-ci.org/apache/cordova-plugin-console)
-
-Ten plugin jest przeznaczona do zapewnienia, że console.log() jest tak przydatne, jak to może być. To dodaje dodatkową funkcję dla iOS, Ubuntu, Windows Phone 8 i Windows. Jeśli jesteś zadowolony z jak console.log() pracuje dla Ciebie, wtedy prawdopodobnie nie potrzebują tej wtyczki.
-
-Ten plugin definiuje obiekt globalny `console`.
-
-Mimo, że obiekt jest w globalnym zasięgu, funkcji oferowanych przez ten plugin nie są dostępne dopiero po turnieju `deviceready`.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-
-## Instalacja
-
- cordova plugin add cordova-plugin-console
-
-
-### Dziwactwa Androida
-
-Na niektórych platformach innych niż Android console.log() będzie działać na wielu argumentów, takich jak console.log ("1", "2", "3"). Jednak Android będzie działać tylko na pierwszy argument. Kolejne argumenty do console.log() będą ignorowane. Ten plugin nie jest przyczyną, że, jest to ograniczenie Androida, sam.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-console/doc/pl/index.md b/plugins/cordova-plugin-console/doc/pl/index.md
deleted file mode 100644
index 922b577..0000000
--- a/plugins/cordova-plugin-console/doc/pl/index.md
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-# cordova-plugin-console
-
-Ten plugin jest przeznaczona do zapewnienia, że console.log() jest tak przydatne, jak to może być. To dodaje dodatkową funkcję dla iOS, Ubuntu, Windows Phone 8 i Windows 8. Jeśli jesteś zadowolony z jak console.log() pracuje dla Ciebie, wtedy prawdopodobnie nie potrzebują tej wtyczki.
-
-Ten plugin definiuje obiekt globalny `console`.
-
-Mimo, że obiekt jest w globalnym zasięgu, funkcji oferowanych przez ten plugin nie są dostępne dopiero po turnieju `deviceready`.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-
-## Instalacja
-
- cordova plugin add cordova-plugin-console
-
-
-### Dziwactwa Androida
-
-Na niektórych platformach innych niż Android console.log() będzie działać na wielu argumentów, takich jak console.log ("1", "2", "3"). Jednak Android będzie działać tylko na pierwszy argument. Kolejne argumenty do console.log() będą ignorowane. Ten plugin nie jest przyczyną, że, jest to ograniczenie Androida, sam.
diff --git a/plugins/cordova-plugin-console/doc/ru/index.md b/plugins/cordova-plugin-console/doc/ru/index.md
deleted file mode 100644
index 3cfe15d..0000000
--- a/plugins/cordova-plugin-console/doc/ru/index.md
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-# cordova-plugin-console
-
-Ðтот плагин предназначен Ð´Ð»Ñ Ð¾Ð±ÐµÑÐ¿ÐµÑ‡ÐµÐ½Ð¸Ñ ÐºÐ°Ðº полезным, поÑкольку Ñто может быть что console.log(). Он добавлÑет дополнительные функции Ð´Ð»Ñ iOS, Ubuntu, Windows Phone 8 и Windows 8. ЕÑли вы не довольны как console.log() работает Ð´Ð»Ñ Ð²Ð°Ñ, то вы вероÑтно не нужен Ñтот плагин.
-
-## УÑтановка
-
- cordova plugin add cordova-plugin-console
-
-
-### ОÑобенноÑти Android
-
-Ðа некоторых платформах, отличных от Android console.log() будет дейÑтвовать на неÑкольких аргументов, например console.log («1», «2», «3»). Тем не менее Android будет дейÑтвовать только на первого аргумента. ПоÑледующие аргументы Ð´Ð»Ñ console.log() будет игнорироватьÑÑ. Ðтот плагин не ÑвлÑетÑÑ Ð¿Ñ€Ð¸Ñ‡Ð¸Ð½Ð¾Ð¹ Ñтого, Ñто ограничение Android Ñам.
diff --git a/plugins/cordova-plugin-console/doc/zh/README.md b/plugins/cordova-plugin-console/doc/zh/README.md
deleted file mode 100644
index ce27c3e..0000000
--- a/plugins/cordova-plugin-console/doc/zh/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-# cordova-plugin-console
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-console.svg)](https://travis-ci.org/apache/cordova-plugin-console)
-
-這個外掛程å¼æ˜¯ç‚ºäº†ç¢ºä¿è©² console.log() 是一樣有用,它å¯ä»¥æ˜¯ã€‚ å®ƒå°‡æ·»åŠ é™„åŠ åŠŸèƒ½çš„ iOS,Ubuntu,Windows Phone 8 和視窗。 å¦‚æžœä½ æ˜¯å¿«æ¨‚èˆ‡ console.log() æ˜¯å¦‚ä½•ç‚ºä½ å·¥ä½œï¼Œé‚£éº¼å¯èƒ½ä¸éœ€è¦é€™å€‹å¤–掛程å¼ã€‚
-
-這個外掛程å¼å®šç¾©äº†ä¸€å€‹å…¨åŸŸ `console` 物件。
-
-儘管物件是在全çƒç¯„åœå…§ï¼Œæ供這個外掛程å¼çš„功能ä¸å¯ç”¨ç›´åˆ° `deviceready` 事件之後。
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-
-## 安è£
-
- cordova plugin add cordova-plugin-console
-
-
-### Android 的怪癖
-
-在一些平臺上除了 Android,console.log() äº¦æœƒæ ¹æ“šå¤šå€‹åƒæ•¸ï¼Œå¦‚ console.log ("1"ã€"2"ã€"3")。 然而,安å“系統åªäº¦æœƒæ ¹æ“šç¬¬ä¸€å€‹åƒæ•¸ã€‚ å° console.log() 的後續åƒæ•¸å°‡è¢«å¿½ç•¥ã€‚ 這個外掛程å¼ä¸æ˜¯çš„åŽŸå› ï¼Œå®ƒæ˜¯ä¸€å€‹ android 作æ¥ç³»çµ±æœ¬èº«çš„é™åˆ¶ã€‚
\ No newline at end of file
diff --git a/plugins/cordova-plugin-console/doc/zh/index.md b/plugins/cordova-plugin-console/doc/zh/index.md
deleted file mode 100644
index e18a141..0000000
--- a/plugins/cordova-plugin-console/doc/zh/index.md
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-# cordova-plugin-console
-
-這個外掛程å¼æ˜¯ç‚ºäº†ç¢ºä¿è©² console.log() 是一樣有用,它å¯ä»¥æ˜¯ã€‚ å®ƒå°‡æ·»åŠ é™„åŠ åŠŸèƒ½çš„ iOS〠Ubuntu,Windows Phone 8 å’Œ Windows 8。 å¦‚æžœä½ æ˜¯å¿«æ¨‚èˆ‡ console.log() æ˜¯å¦‚ä½•ç‚ºä½ å·¥ä½œï¼Œé‚£éº¼å¯èƒ½ä¸éœ€è¦é€™å€‹å¤–掛程å¼ã€‚
-
-這個外掛程å¼å®šç¾©äº†ä¸€å€‹å…¨åŸŸ `console` 物件。
-
-儘管物件是在全çƒç¯„åœå…§ï¼Œæ供這個外掛程å¼çš„功能ä¸å¯ç”¨ç›´åˆ° `deviceready` 事件之後。
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log("console.log works well");
- }
-
-
-## 安è£
-
- cordova plugin add cordova-plugin-console
-
-
-### Android 的怪癖
-
-在一些平臺上除了 Android,console.log() äº¦æœƒæ ¹æ“šå¤šå€‹åƒæ•¸ï¼Œå¦‚ console.log ("1"ã€"2"ã€"3")。 然而,安å“系統åªäº¦æœƒæ ¹æ“šç¬¬ä¸€å€‹åƒæ•¸ã€‚ å° console.log() 的後續åƒæ•¸å°‡è¢«å¿½ç•¥ã€‚ 這個外掛程å¼ä¸æ˜¯çš„åŽŸå› ï¼Œå®ƒæ˜¯ä¸€å€‹ android 作æ¥ç³»çµ±æœ¬èº«çš„é™åˆ¶ã€‚
diff --git a/plugins/cordova-plugin-console/package.json b/plugins/cordova-plugin-console/package.json
deleted file mode 100644
index 0eeba9a..0000000
--- a/plugins/cordova-plugin-console/package.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- "_from": "cordova-plugin-console@^1.1.0",
- "_id": "cordova-plugin-console@1.1.0",
- "_inBundle": false,
- "_integrity": "sha1-4vusECkBeeRMtyxf28QQpTHBzW0=",
- "_location": "/cordova-plugin-console",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "cordova-plugin-console@^1.1.0",
- "name": "cordova-plugin-console",
- "escapedName": "cordova-plugin-console",
- "rawSpec": "^1.1.0",
- "saveSpec": null,
- "fetchSpec": "^1.1.0"
- },
- "_requiredBy": [
- "#USER",
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/cordova-plugin-console/-/cordova-plugin-console-1.1.0.tgz",
- "_shasum": "e2fbac10290179e44cb72c5fdbc410a531c1cd6d",
- "_spec": "cordova-plugin-console@^1.1.0",
- "_where": "/home/thrrgilag/workspace/cordova/Goober",
- "author": {
- "name": "Apache Software Foundation"
- },
- "bugs": {
- "url": "https://issues.apache.org/jira/browse/CB"
- },
- "bundleDependencies": false,
- "cordova": {
- "id": "cordova-plugin-console",
- "platforms": [
- "ios",
- "ubuntu",
- "wp7",
- "wp8",
- "windows8",
- "windows"
- ]
- },
- "deprecated": "This plugin has been deprecated since it is now included in the latest versions of cordova-ios",
- "description": "Cordova Console Plugin",
- "devDependencies": {
- "jshint": "^2.6.0"
- },
- "engines": {
- "cordovaDependencies": {
- ">=2.0.0": {
- "cordova-ios": "<4.5.0",
- "cordova-windows": "<=5.0.0"
- }
- }
- },
- "homepage": "https://github.com/apache/cordova-plugin-console#readme",
- "keywords": [
- "cordova",
- "console",
- "ecosystem:cordova",
- "cordova-ios",
- "cordova-ubuntu",
- "cordova-wp7",
- "cordova-wp8",
- "cordova-windows8",
- "cordova-windows"
- ],
- "license": "Apache-2.0",
- "name": "cordova-plugin-console",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/apache/cordova-plugin-console.git"
- },
- "scripts": {
- "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests",
- "test": "npm run jshint"
- },
- "version": "1.1.0"
-}
diff --git a/plugins/cordova-plugin-console/plugin.xml b/plugins/cordova-plugin-console/plugin.xml
deleted file mode 100644
index e2d6fc3..0000000
--- a/plugins/cordova-plugin-console/plugin.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-
-
-
-
-
- Console
- Cordova Console Plugin
- Apache 2.0
- cordova,console
- https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git
- https://issues.apache.org/jira/browse/CB/component/12320644
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/cordova-plugin-console/src/ios/CDVLogger.h b/plugins/cordova-plugin-console/src/ios/CDVLogger.h
deleted file mode 100644
index 7cfb306..0000000
--- a/plugins/cordova-plugin-console/src/ios/CDVLogger.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import
-
-@interface CDVLogger : CDVPlugin
-
-- (void)logLevel:(CDVInvokedUrlCommand*)command;
-
-@end
diff --git a/plugins/cordova-plugin-console/src/ios/CDVLogger.m b/plugins/cordova-plugin-console/src/ios/CDVLogger.m
deleted file mode 100644
index ccfa3a5..0000000
--- a/plugins/cordova-plugin-console/src/ios/CDVLogger.m
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVLogger.h"
-#import
-
-@implementation CDVLogger
-
-/* log a message */
-- (void)logLevel:(CDVInvokedUrlCommand*)command
-{
- id level = [command argumentAtIndex:0];
- id message = [command argumentAtIndex:1];
-
- if ([level isEqualToString:@"LOG"]) {
- NSLog(@"%@", message);
- } else {
- NSLog(@"%@: %@", level, message);
- }
-}
-
-@end
diff --git a/plugins/cordova-plugin-console/src/ubuntu/console.cpp b/plugins/cordova-plugin-console/src/ubuntu/console.cpp
deleted file mode 100644
index 9de09f4..0000000
--- a/plugins/cordova-plugin-console/src/ubuntu/console.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "console.h"
-
-#include
-
-Console::Console(Cordova *cordova) : CPlugin(cordova) {
-}
-
-void Console::logLevel(int scId, int ecId, QString level, QString message) {
- Q_UNUSED(scId)
- Q_UNUSED(ecId)
-
- if (level != "LOG")
- std::cout << "[" << level.toStdString() << "] ";
- std::cout << message.toStdString() << std::endl;
-}
diff --git a/plugins/cordova-plugin-console/src/ubuntu/console.h b/plugins/cordova-plugin-console/src/ubuntu/console.h
deleted file mode 100644
index 3f3d163..0000000
--- a/plugins/cordova-plugin-console/src/ubuntu/console.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef CONSOLE_H_FDSVCXGFRS
-#define CONSOLE_H_FDSVCXGFRS
-
-#include
-
-#include
-
-class Console : public CPlugin {
- Q_OBJECT
-public:
- explicit Console(Cordova *cordova);
-
- virtual const QString fullName() override {
- return Console::fullID();
- }
-
- virtual const QString shortName() override {
- return "Console";
- }
-
- static const QString fullID() {
- return "Console";
- }
-
-public slots:
- void logLevel(int scId, int ecId, QString level, QString message);
-};
-
-#endif
diff --git a/plugins/cordova-plugin-console/src/wp/DebugConsole.cs b/plugins/cordova-plugin-console/src/wp/DebugConsole.cs
deleted file mode 100644
index 9bb5476..0000000
--- a/plugins/cordova-plugin-console/src/wp/DebugConsole.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-using System;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
-using System.Diagnostics;
-
-namespace WPCordovaClassLib.Cordova.Commands
-{
- public class DebugConsole : BaseCommand
- {
- public void logLevel(string options)
- {
- string[] args = JSON.JsonHelper.Deserialize(options);
- string level = args[0];
- string msg = args[1];
-
- if (level.Equals("LOG"))
- {
- Debug.WriteLine(msg);
- }
- else
- {
- Debug.WriteLine(level + ": " + msg);
- }
- }
- }
-}
diff --git a/plugins/cordova-plugin-console/tests/package.json b/plugins/cordova-plugin-console/tests/package.json
deleted file mode 100644
index c7bc7ea..0000000
--- a/plugins/cordova-plugin-console/tests/package.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "cordova-plugin-console-tests",
- "version": "1.0.7-dev",
- "description": "",
- "cordova": {
- "id": "cordova-plugin-console-tests",
- "platforms": []
- },
- "keywords": [
- "ecosystem:cordova"
- ],
- "author": "",
- "license": "Apache 2.0"
-}
diff --git a/plugins/cordova-plugin-console/tests/plugin.xml b/plugins/cordova-plugin-console/tests/plugin.xml
deleted file mode 100644
index 37c17d7..0000000
--- a/plugins/cordova-plugin-console/tests/plugin.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- Cordova Console Plugin Tests
- Apache 2.0
-
-
-
-
diff --git a/plugins/cordova-plugin-console/tests/tests.js b/plugins/cordova-plugin-console/tests/tests.js
deleted file mode 100644
index 74765d9..0000000
--- a/plugins/cordova-plugin-console/tests/tests.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-/* jshint jasmine: true */
-
-exports.defineAutoTests = function () {
- describe("Console", function () {
- it("console.spec.1 should exist", function() {
- expect(window.console).toBeDefined();
- });
-
- it("console.spec.2 has required methods log|warn|error", function(){
- expect(window.console.log).toBeDefined();
- expect(typeof window.console.log).toBe('function');
-
- expect(window.console.warn).toBeDefined();
- expect(typeof window.console.warn).toBe('function');
-
- expect(window.console.error).toBeDefined();
- expect(typeof window.console.error).toBe('function');
- });
- });
-};
-
-exports.defineManualTests = function (contentEl, createActionButton) {};
diff --git a/plugins/cordova-plugin-device/CONTRIBUTING.md b/plugins/cordova-plugin-device/CONTRIBUTING.md
deleted file mode 100644
index 4c8e6a5..0000000
--- a/plugins/cordova-plugin-device/CONTRIBUTING.md
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-# Contributing to Apache Cordova
-
-Anyone can contribute to Cordova. And we need your contributions.
-
-There are multiple ways to contribute: report bugs, improve the docs, and
-contribute code.
-
-For instructions on this, start with the
-[contribution overview](http://cordova.apache.org/contribute/).
-
-The details are explained there, but the important items are:
- - Sign and submit an Apache ICLA (Contributor License Agreement).
- - Have a Jira issue open that corresponds to your contribution.
- - Run the tests so your patch doesn't break existing functionality.
-
-We look forward to your contributions!
diff --git a/plugins/cordova-plugin-device/LICENSE b/plugins/cordova-plugin-device/LICENSE
deleted file mode 100644
index 7a4a3ea..0000000
--- a/plugins/cordova-plugin-device/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-device/NOTICE b/plugins/cordova-plugin-device/NOTICE
deleted file mode 100644
index 8ec56a5..0000000
--- a/plugins/cordova-plugin-device/NOTICE
+++ /dev/null
@@ -1,5 +0,0 @@
-Apache Cordova
-Copyright 2012 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
diff --git a/plugins/cordova-plugin-device/README.md b/plugins/cordova-plugin-device/README.md
deleted file mode 100644
index 048f028..0000000
--- a/plugins/cordova-plugin-device/README.md
+++ /dev/null
@@ -1,267 +0,0 @@
----
-title: Device
-description: Get device information.
----
-
-
-|AppVeyor|Travis CI|
-|:-:|:-:|
-|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-device?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-device)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device)|
-
-# cordova-plugin-device
-
-This plugin defines a global `device` object, which describes the device's hardware and software.
-Although the object is in the global scope, it is not available until after the `deviceready` event.
-
-```js
-document.addEventListener("deviceready", onDeviceReady, false);
-function onDeviceReady() {
- console.log(device.cordova);
-}
-```
-
-Report issues with this plugin on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Device%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC)
-
-
-## Installation
-
- cordova plugin add cordova-plugin-device
-
-## Properties
-
-- device.cordova
-- device.model
-- device.platform
-- device.uuid
-- device.version
-- device.manufacturer
-- device.isVirtual
-- device.serial
-
-## device.cordova
-
-Get the version of Cordova running on the device.
-
-### Supported Platforms
-
-- Android
-- Browser
-- iOS
-- Windows
-- OSX
-
-## device.model
-
-The `device.model` returns the name of the device's model or
-product. The value is set by the device manufacturer and may be
-different across versions of the same product.
-
-### Supported Platforms
-
-- Android
-- Browser
-- iOS
-- Windows
-- OSX
-
-### Quick Example
-
-```js
-// Android: Nexus One returns "Passion" (Nexus One code name)
-// Motorola Droid returns "voles"
-// BlackBerry: Torch 9800 returns "9800"
-// Browser: Google Chrome returns "Chrome"
-// Safari returns "Safari"
-// iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
-// OSX: returns "x86_64"
-//
-var model = device.model;
-```
-
-### Android Quirks
-
-- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.
-
-## device.platform
-
-Get the device's operating system name.
-
-```js
-var string = device.platform;
-```
-### Supported Platforms
-
-- Android
-- Browser
-- iOS
-- Windows
-- OSX
-
-### Quick Example
-
-```js
-// Depending on the device, a few examples are:
-// - "Android"
-// - "BlackBerry 10"
-// - "browser"
-// - "iOS"
-// - "WinCE"
-// - "Tizen"
-// - "Mac OS X"
-var devicePlatform = device.platform;
-```
-
-## device.uuid
-
-Get the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
-
-```js
-var string = device.uuid;
-```
-
-### Description
-
-The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.
-
-### Supported Platforms
-
-- Android
-- iOS
-- Windows
-- OSX
-
-### Quick Example
-
-```js
-// Android: Returns a random 64-bit integer (as a string, again!)
-// The integer is generated on the device's first boot
-//
-// BlackBerry: Returns the PIN number of the device
-// This is a nine-digit unique integer (as a string, though!)
-//
-// iPhone: (Paraphrased from the UIDevice Class documentation)
-// Returns the [UIDevice identifierForVendor] UUID which is unique and the same for all apps installed by the same vendor. However the UUID can be different if the user deletes all apps from the vendor and then reinstalls it.
-// Windows Phone 7 : Returns a hash of device+current user,
-// if the user is not defined, a guid is generated and will persist until the app is uninstalled
-// Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number
-// unique to every GSM and UMTS mobile phone.
-var deviceID = device.uuid;
-```
-
-### iOS Quirk
-
-The `uuid` on iOS uses the identifierForVendor property. It is unique to the device across the same vendor, but will be different for different vendors and will change if all apps from the vendor are deleted and then reinstalled.
-Refer [here](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/#//apple_ref/occ/instp/UIDevice/identifierForVendor) for details.
-The UUID will be the same if app is restored from a backup or iCloud as it is saved in preferences. Users using older versions of this plugin will still receive the same previous UUID generated by another means as it will be retrieved from preferences.
-
-### OSX Quirk
-
-The `uuid` on OSX is generated automatically if it does not exist yet and is stored in the `standardUserDefaults` in the `CDVUUID` property.
-
-## device.version
-
-Get the operating system version.
-
- var string = device.version;
-
-### Supported Platforms
-
-- Android 2.1+
-- Browser
-- iOS
-- Windows
-- OSX
-
-### Quick Example
-
-```js
-// Android: Froyo OS would return "2.2"
-// Eclair OS would return "2.1", "2.0.1", or "2.0"
-// Version can also return update level "2.1-update1"
-//
-// BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
-//
-// Browser: Returns version number for the browser
-//
-// iPhone: iOS 3.2 returns "3.2"
-//
-// Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
-// Windows 8: return the current OS version, ex on Windows 8.1 returns 6.3.9600.16384
-// Tizen: returns "TIZEN_20120425_2"
-// OSX: El Capitan would return "10.11.2"
-//
-var deviceVersion = device.version;
-```
-
-## device.manufacturer
-
-Get the device's manufacturer.
-
- var string = device.manufacturer;
-
-### Supported Platforms
-
-- Android
-- iOS
-- Windows
-
-### Quick Example
-
-```js
-// Android: Motorola XT1032 would return "motorola"
-// BlackBerry: returns "BlackBerry"
-// iPhone: returns "Apple"
-//
-var deviceManufacturer = device.manufacturer;
-```
-
-## device.isVirtual
-
-whether the device is running on a simulator.
-
-```js
-var isSim = device.isVirtual;
-```
-
-### Supported Platforms
-
-- Android 2.1+
-- Browser
-- iOS
-- Windows
-- OSX
-
-### OSX and Browser Quirk
-
-The `isVirtual` property on OS X and Browser always returns false.
-
-## device.serial
-
-Get the device hardware serial number ([SERIAL](http://developer.android.com/reference/android/os/Build.html#SERIAL)).
-
-```js
-var string = device.serial;
-```
-
-### Supported Platforms
-
-- Android
-- OSX
-
diff --git a/plugins/cordova-plugin-device/RELEASENOTES.md b/plugins/cordova-plugin-device/RELEASENOTES.md
deleted file mode 100644
index 12d4008..0000000
--- a/plugins/cordova-plugin-device/RELEASENOTES.md
+++ /dev/null
@@ -1,181 +0,0 @@
-
-# Release Notes
-
-### 2.0.2 (Apr 12, 2018)
-* [CB-13893](https://issues.apache.org/jira/browse/CB-13893) **iOS** delete `libz.tbd` from device plugin
-
-### 2.0.1 (Dec 27, 2017)
-* [CB-13702](https://issues.apache.org/jira/browse/CB-13702) Fix to allow 2.0.0 version install
-
-### 2.0.0 (Dec 15, 2017)
-* [CB-13670](https://issues.apache.org/jira/browse/CB-13670) Remove deprecated platforms
-
-### 1.1.7 (Nov 06, 2017)
-* [CB-13472](https://issues.apache.org/jira/browse/CB-13472) (CI) Fixed Travis **Android** builds again
-* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) setup `eslint` and removed `jshint`
-* [CB-13113](https://issues.apache.org/jira/browse/CB-13113) (browser) `device.isVirtual` is always false
-* [CB-13028](https://issues.apache.org/jira/browse/CB-13028) (CI) **Browser** builds on Travis and AppVeyor
-* [CB-13000](https://issues.apache.org/jira/browse/CB-13000) (CI) Speed up **Android** builds
-* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`.
-
-### 1.1.6 (Apr 27, 2017)
-* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README`
-* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder
-* [CB-12105](https://issues.apache.org/jira/browse/CB-12105) (browser) Properly detect Edge
-
-### 1.1.5 (Feb 28, 2017)
-* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml`
-* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped`
-* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0**
-* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges
-
-### 1.1.4 (Dec 07, 2016)
-* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.1.4
-* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…"
-* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version.
-
-### 1.1.3 (Sep 08, 2016)
-* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies
-* Add badges for paramedic builds on Jenkins
-* Add pull request template.
-* Readme: Add fenced code blocks with langauage hints
-* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to `README.md`
-
-### 1.1.2 (Apr 15, 2016)
-* Use passed device, follow create policy forf `CFUUIDCreate`
-* [CB-10631](https://issues.apache.org/jira/browse/CB-10631) Fix for `device.uuid` in **iOS 5.1.1**
-* Updating the comment to exclude URL
-* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins
-* Refactored `deviceInfo` on **iOS** for better readability.
-
-### 1.1.1 (Jan 15, 2016)
-* [CB-10238](https://issues.apache.org/jira/browse/CB-10238) **OSX** Move `device-plugin` out from `cordovalib` to the plugin repository
-* [CB-9923](https://issues.apache.org/jira/browse/CB-9923) Update `device.platform` documentation for **Browser** platform
-
-### 1.1.0 (Nov 18, 2015)
-* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest
-* Add `isVirtual` for **Windows Phone 8.x**
-* Added basic **Android** support for hardware serial number
-* [CB-9865](https://issues.apache.org/jira/browse/CB-9865) Better simulator detection for **iOS**
-* Fixing contribute link.
-* Added **WP8** implementation
-* update to use `TARGET_OS_SIMULATOR` as `TARGET_IPHONE_SIMULATOR` is deprecated.
-* update code to use 'isVirtual'
-* create test to verify existence and type of new property 'isVirtual'
-* add `isSimulator` for **iOS** & **Android** device
-* Updated documentation to mention backwards compatibility
-* Updated **README** to reflect new behaviour and quirks on **iOS**
-* Check user defaults first to maintain backwards compatibility
-* Changed `UUID` to use `[UIDevice identifierForVendor]`
-
-### 1.0.1 (Jun 17, 2015)
-* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-device documentation translation: cordova-plugin-device
-* Attempts to corrent npm markdown issue
-
-### 1.0.0 (Apr 15, 2015)
-* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump
-* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name
-* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id
-* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id
-* Use TRAVIS_BUILD_DIR, install paramedic by npm
-* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme
-* remove defunct windows8 version
-* add travis badge
-* Add cross-plugin ios paramedic test running for TravisCI
-* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file
-
-### 0.3.0 (Feb 04, 2015)
-* Added device.manufacturer property for Android, iOS, Blackberry, WP8
-* Support for Windows Phone 8 ANID2 ANID is only supported up to Windows Phone 7.5
-* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) Use a local copy of uniqueAppInstanceIdentifier rather than CordovaLib's version
-* browser: Fixed a bug that caused an "cannot call method of undefined" error if the browser's user agent wasn't recognized
-
-### 0.2.13 (Dec 02, 2014)
-* Changing `device.platform` to always report the platform as "browser".
-* [CB-5892](https://issues.apache.org/jira/browse/CB-5892) - Remove deprecated `window.Settings`
-* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-device documentation translation: cordova-plugin-device
-* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Bump version of nested plugin to match parent plugin
-
-### 0.2.12 (Sep 17, 2014)
-* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-device documentation translation
-* [CB-7552](https://issues.apache.org/jira/browse/CB-7552) device.name docs have not been removed
-* [fxos] Fix cordova version
-* added status box and documentation to manual tests
-* [fxos] Fix cordova version
-* added status box and documentation to manual tests
-* Added plugin support for the browser
-* [CB-7262](https://issues.apache.org/jira/browse/CB-7262) Adds support for universal windows apps.
-
-### 0.2.11 (Aug 06, 2014)
-* [FFOS] update DeviceProxy.js
-* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs
-* Use Windows system calls to get better info
-
-### 0.2.10 (Jun 05, 2014)
-* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and French Translations added. Github close #12
-* Changing 1.5 to 2.0
-* added firefoxos version - conversion
-* added firefoxos version
-* [CB-6800](https://issues.apache.org/jira/browse/CB-6800) Add license
-* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md
-
-### 0.2.9 (Apr 17, 2014)
-* [CB-5105](https://issues.apache.org/jira/browse/CB-5105): [Android, windows8, WP, BlackBerry10] Removed dead code for device.version
-* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy
-* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers
-* Add NOTICE file
-
-### 0.2.8 (Feb 05, 2014)
-* Tizen support added
-
-### 0.2.7 (Jan 07, 2014)
-* [CB-5737](https://issues.apache.org/jira/browse/CB-5737) Fix exception on close caused by left over telephony code from [CB-5504](https://issues.apache.org/jira/browse/CB-5504)
-
-### 0.2.6 (Jan 02, 2014)
-* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc/index.md for Device plugin
-* [CB-5504](https://issues.apache.org/jira/browse/CB-5504) Moving Telephony Logic out of Device
-
-### 0.2.5 (Dec 4, 2013)
-* [CB-5316](https://issues.apache.org/jira/browse/CB-5316) Spell Cordova as a brand unless it's a command or script
-* [ubuntu] use cordova/exec/proxy
-* add ubuntu platform
-* Modify Device.platform logic to use amazon-fireos as the platform for Amazon Devices
-* 1. Added amazon-fireos platform. 2. Change to use cordova-amazon-fireos as the platform if user agent contains 'cordova-amazon-fireos'
-
-### 0.2.4 (Oct 28, 2013)
-* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): added repo + issue tag in plugin.xml for device plugin
-* [CB-5085](https://issues.apache.org/jira/browse/CB-5085) device.cordova returning wrong value
-* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch.
-
-### 0.2.3 (Sept 25, 2013)
-* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version
-* [windows8] commandProxy has moved
-* [BlackBerry10] removed uneeded permission tags in plugin.xml
-* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.device to org.apache.cordova.device
-* Rename CHANGELOG.md -> RELEASENOTES.md
-* updated to use commandProxy for ffos
-* add firefoxos support
-* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch.
-
-### 0.2.1 (Sept 5, 2013)
-* removed extraneous print statement
-* [CB-4432](https://issues.apache.org/jira/browse/CB-4432) copyright notice change
diff --git a/plugins/cordova-plugin-device/doc/de/README.md b/plugins/cordova-plugin-device/doc/de/README.md
deleted file mode 100644
index 81f89e9..0000000
--- a/plugins/cordova-plugin-device/doc/de/README.md
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-# cordova-plugin-device
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device)
-
-Dieses Plugin definiert eine globale `device` -Objekt, das des Geräts Hard- und Software beschreibt. Das Objekt im globalen Gültigkeitsbereich ist es zwar nicht verfügbar bis nach dem `deviceready` Ereignis.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## Installation
-
- cordova plugin add cordova-plugin-device
-
-
-## Eigenschaften
-
- * device.cordova
- * device.model
- * device.platform
- * device.uuid
- * device.version
-
-## device.cordova
-
-Rufen Sie die Version von Cordova, die auf dem Gerät ausgeführt.
-
-### Unterstützte Plattformen
-
- * Amazon Fire OS
- * Android
- * BlackBerry 10
- * Browser
- * Firefox OS
- * iOS
- * Tizen
- * Windows Phone 7 und 8
- * Windows 8
-
-## device.model
-
-Die `device.model` gibt den Namen der Modell- oder des Geräts zurück. Der Wert wird vom Gerätehersteller festgelegt und kann zwischen den Versionen des gleichen Produkts unterschiedlich sein.
-
-### Unterstützte Plattformen
-
- * Android
- * BlackBerry 10
- * Browser
- * iOS
- * Tizen
- * Windows Phone 7 und 8
- * Windows 8
-
-### Kurzes Beispiel
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Finden Sie unter http://theiphonewiki.com/wiki/index.php?title=Models / / Var-Modell = device.model;
-
-
-### Android Eigenarten
-
- * Ruft den [Produktname](http://developer.android.com/reference/android/os/Build.html#PRODUCT) anstelle des [Modellnamens](http://developer.android.com/reference/android/os/Build.html#MODEL), das ist oft der Codename für die Produktion. Beispielsweise das Nexus One gibt `Passion` , und Motorola Droid gibt`voles`.
-
-### Tizen Macken
-
- * Gibt z. B. das Gerätemodell von dem Kreditor zugeordnet,`TIZEN`
-
-### Windows Phone 7 und 8 Eigenarten
-
- * Gibt das vom Hersteller angegebenen Gerätemodell zurück. Beispielsweise gibt der Samsung-Fokus`SGH-i917`.
-
-## device.platform
-
-Name des Betriebssystems des Geräts zu erhalten.
-
- var string = device.platform;
-
-
-### Unterstützte Plattformen
-
- * Android
- * BlackBerry 10
- * Browser4
- * Firefox OS
- * iOS
- * Tizen
- * Windows Phone 7 und 8
- * Windows 8
-
-### Kurzes Beispiel
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 Macken
-
-Windows Phone 7 Geräte melden die Plattform als`WinCE`.
-
-### Windows Phone 8 Macken
-
-Windows Phone 8 Geräte melden die Plattform als`Win32NT`.
-
-## device.uuid
-
-Des Geräts Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier) zu erhalten).
-
- var string = device.uuid;
-
-
-### Beschreibung
-
-Die Details wie eine UUID generiert wird werden vom Gerätehersteller und beziehen sich auf die Plattform oder das Modell des Geräts.
-
-### Unterstützte Plattformen
-
- * Android
- * BlackBerry 10
- * iOS
- * Tizen
- * Windows Phone 7 und 8
- * Windows 8
-
-### Kurzes Beispiel
-
- / / Android: wird eine zufällige 64-Bit-Ganzzahl (als Zeichenfolge, wieder!) / / die ganze Zahl wird beim ersten Start des Geräts erzeugt / / / / BlackBerry: gibt die PIN-Nummer des Gerätes / / Dies ist eine neunstellige eindeutige Ganzzahl (als String, obwohl!) / / / / iPhone: (paraphrasiert aus der Dokumentation zur UIDevice-Klasse) / / liefert eine Reihe von Hash-Werte, die aus mehreren Hardware erstellt identifiziert.
- / / Es ist gewährleistet, dass für jedes Gerät eindeutig sein und kann nicht gebunden werden / / an den Benutzer weitergeleitet.
- / / Windows Phone 7: gibt einen Hash des Gerät + aktueller Benutzer, / / wenn der Benutzer nicht definiert ist, eine Guid generiert und wird weiter bestehen, bis die app deinstalliert wird / / Tizen: gibt das Gerät IMEI (International Mobile Equipment Identity oder IMEI ist eine Zahl / / einzigartig für jedes GSM- und UMTS-Handy.
- var deviceID = device.uuid;
-
-
-### iOS Quirk
-
-Die `uuid` auf iOS ist nicht eindeutig zu einem Gerät, aber für jede Anwendung, für jede Installation variiert. Es ändert sich, wenn Sie löschen und neu die app installieren, und möglicherweise auch beim iOS zu aktualisieren, oder auch ein Upgrade möglich die app pro Version (scheinbaren in iOS 5.1). Die `uuid` ist kein zuverlässiger Wert.
-
-### Windows Phone 7 und 8 Eigenarten
-
-Die `uuid` für Windows Phone 7 die Berechtigung erfordert `ID_CAP_IDENTITY_DEVICE` . Microsoft wird diese Eigenschaft wahrscheinlich bald abzuschaffen. Wenn die Funktion nicht verfügbar ist, generiert die Anwendung eine persistente Guid, die für die Dauer der Installation der Anwendung auf dem Gerät gewährleistet ist.
-
-## device.version
-
-Version des Betriebssystems zu erhalten.
-
- var string = device.version;
-
-
-### Unterstützte Plattformen
-
- * Android 2.1 +
- * BlackBerry 10
- * Browser
- * iOS
- * Tizen
- * Windows Phone 7 und 8
- * Windows 8
-
-### Kurzes Beispiel
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
\ No newline at end of file
diff --git a/plugins/cordova-plugin-device/doc/de/index.md b/plugins/cordova-plugin-device/doc/de/index.md
deleted file mode 100644
index e3a537e..0000000
--- a/plugins/cordova-plugin-device/doc/de/index.md
+++ /dev/null
@@ -1,206 +0,0 @@
-
-
-# cordova-plugin-device
-
-Dieses Plugin definiert eine globale `device` -Objekt, das des Geräts Hard- und Software beschreibt. Das Objekt im globalen Gültigkeitsbereich ist es zwar nicht verfügbar bis nach dem `deviceready` Ereignis.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## Installation
-
- cordova plugin add cordova-plugin-device
-
-
-## Eigenschaften
-
-* device.cordova
-* device.model
-* device.platform
-* device.uuid
-* device.version
-
-## device.cordova
-
-Rufen Sie die Version von Cordova, die auf dem Gerät ausgeführt.
-
-### Unterstützte Plattformen
-
-* Amazon Fire OS
-* Android
-* BlackBerry 10
-* Browser
-* Firefox OS
-* iOS
-* Tizen
-* Windows Phone 7 und 8
-* Windows 8
-
-## device.model
-
-Die `device.model` gibt den Namen der Modell- oder des Geräts zurück. Der Wert wird vom Gerätehersteller festgelegt und kann zwischen den Versionen des gleichen Produkts unterschiedlich sein.
-
-### Unterstützte Plattformen
-
-* Android
-* BlackBerry 10
-* Browser
-* iOS
-* Tizen
-* Windows Phone 7 und 8
-* Windows 8
-
-### Kurzes Beispiel
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Finden Sie unter http://theiphonewiki.com/wiki/index.php?title=Models / / Var-Modell = device.model;
-
-
-### Android Eigenarten
-
-* Ruft den [Produktname][1] anstelle des [Modellnamens][2], das ist oft der Codename für die Produktion. Beispielsweise das Nexus One gibt `Passion` , und Motorola Droid gibt`voles`.
-
- [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
- [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
-
-### Tizen Macken
-
-* Gibt z. B. das Gerätemodell von dem Kreditor zugeordnet,`TIZEN`
-
-### Windows Phone 7 und 8 Eigenarten
-
-* Gibt das vom Hersteller angegebenen Gerätemodell zurück. Beispielsweise gibt der Samsung-Fokus`SGH-i917`.
-
-## device.platform
-
-Name des Betriebssystems des Geräts zu erhalten.
-
- var string = device.platform;
-
-
-### Unterstützte Plattformen
-
-* Android
-* BlackBerry 10
-* Browser4
-* Firefox OS
-* iOS
-* Tizen
-* Windows Phone 7 und 8
-* Windows 8
-
-### Kurzes Beispiel
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 Macken
-
-Windows Phone 7 Geräte melden die Plattform als`WinCE`.
-
-### Windows Phone 8 Macken
-
-Windows Phone 8 Geräte melden die Plattform als`Win32NT`.
-
-## device.uuid
-
-Des Geräts Universally Unique Identifier ([UUID][3] zu erhalten).
-
- [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
-
- var string = device.uuid;
-
-
-### Beschreibung
-
-Die Details wie eine UUID generiert wird werden vom Gerätehersteller und beziehen sich auf die Plattform oder das Modell des Geräts.
-
-### Unterstützte Plattformen
-
-* Android
-* BlackBerry 10
-* iOS
-* Tizen
-* Windows Phone 7 und 8
-* Windows 8
-
-### Kurzes Beispiel
-
- / / Android: wird eine zufällige 64-Bit-Ganzzahl (als Zeichenfolge, wieder!) / / die ganze Zahl wird beim ersten Start des Geräts erzeugt / / / / BlackBerry: gibt die PIN-Nummer des Gerätes / / Dies ist eine neunstellige eindeutige Ganzzahl (als String, obwohl!) / / / / iPhone: (paraphrasiert aus der Dokumentation zur UIDevice-Klasse) / / liefert eine Reihe von Hash-Werte, die aus mehreren Hardware erstellt identifiziert.
- / / Es ist gewährleistet, dass für jedes Gerät eindeutig sein und kann nicht gebunden werden / / an den Benutzer weitergeleitet.
- / / Windows Phone 7: gibt einen Hash des Gerät + aktueller Benutzer, / / wenn der Benutzer nicht definiert ist, eine Guid generiert und wird weiter bestehen, bis die app deinstalliert wird / / Tizen: gibt das Gerät IMEI (International Mobile Equipment Identity oder IMEI ist eine Zahl / / einzigartig für jedes GSM- und UMTS-Handy.
- var deviceID = device.uuid;
-
-
-### iOS Quirk
-
-Die `uuid` auf iOS ist nicht eindeutig zu einem Gerät, aber für jede Anwendung, für jede Installation variiert. Es ändert sich, wenn Sie löschen und neu die app installieren, und möglicherweise auch beim iOS zu aktualisieren, oder auch ein Upgrade möglich die app pro Version (scheinbaren in iOS 5.1). Die `uuid` ist kein zuverlässiger Wert.
-
-### Windows Phone 7 und 8 Eigenarten
-
-Die `uuid` für Windows Phone 7 die Berechtigung erfordert `ID_CAP_IDENTITY_DEVICE` . Microsoft wird diese Eigenschaft wahrscheinlich bald abzuschaffen. Wenn die Funktion nicht verfügbar ist, generiert die Anwendung eine persistente Guid, die für die Dauer der Installation der Anwendung auf dem Gerät gewährleistet ist.
-
-## device.version
-
-Version des Betriebssystems zu erhalten.
-
- var string = device.version;
-
-
-### Unterstützte Plattformen
-
-* Android 2.1 +
-* BlackBerry 10
-* Browser
-* iOS
-* Tizen
-* Windows Phone 7 und 8
-* Windows 8
-
-### Kurzes Beispiel
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
diff --git a/plugins/cordova-plugin-device/doc/es/README.md b/plugins/cordova-plugin-device/doc/es/README.md
deleted file mode 100644
index a27abfb..0000000
--- a/plugins/cordova-plugin-device/doc/es/README.md
+++ /dev/null
@@ -1,216 +0,0 @@
-
-
-# cordova-plugin-device
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device)
-
-Este plugin define un global `device` objeto que describe del dispositivo hardware y software. Aunque el objeto está en el ámbito global, no está disponible hasta después de la `deviceready` evento.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## Instalación
-
- cordova plugin add cordova-plugin-device
-
-
-## Propiedades
-
- * device.cordova
- * device.model
- * device.platform
- * device.uuid
- * device.version
-
-## device.cordova
-
-Obtener la versión de Cordova que se ejecuta en el dispositivo.
-
-### Plataformas soportadas
-
- * Amazon fire OS
- * Android
- * BlackBerry 10
- * Explorador
- * Firefox OS
- * iOS
- * Tizen
- * Windows Phone 7 y 8
- * Windows 8
-
-## device.model
-
-El `device.model` devuelve el nombre de modelo del dispositivo o producto. El valor es fijado por el fabricante del dispositivo y puede ser diferente a través de versiones del mismo producto.
-
-### Plataformas soportadas
-
- * Android
- * BlackBerry 10
- * Explorador
- * iOS
- * Tizen
- * Windows Phone 7 y 8
- * Windows 8
-
-### Ejemplo rápido
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
- //
- var model = device.model;
-
-
-### Rarezas Android
-
- * Obtiene el [nombre del producto](http://developer.android.com/reference/android/os/Build.html#PRODUCT) en lugar del [nombre de la modelo](http://developer.android.com/reference/android/os/Build.html#MODEL), que es a menudo el nombre de código de producción. Por ejemplo, el Nexus One devuelve `Passion` y Motorola Droid devuelve `voles`.
-
-### Rarezas Tizen
-
- * Devuelve que el modelo de dispositivo asignado por el proveedor, por ejemplo, `TIZEN`
-
-### Windows Phone 7 y 8 rarezas
-
- * Devuelve el modelo de dispositivo especificado por el fabricante. Por ejemplo, el Samsung Focus devuelve `SGH-i917`.
-
-## device.platform
-
-Obtener el nombre del sistema operativo del dispositivo.
-
- var string = device.platform;
-
-
-### Plataformas soportadas
-
- * Android
- * BlackBerry 10
- * Browser4
- * Firefox OS
- * iOS
- * Tizen
- * Windows Phone 7 y 8
- * Windows 8
-
-### Ejemplo rápido
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 rarezas
-
-Dispositivos Windows Phone 7 informe de la plataforma como `WinCE`.
-
-### Windows Phone 8 rarezas
-
-Dispositivos Windows Phone 8 Informe la plataforma como `Win32NT`.
-
-## device.uuid
-
-Obtener identificador universalmente única del dispositivo ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
-
- var string = device.uuid;
-
-
-### Descripción
-
-Los detalles de cómo se genera un UUID son determinados por el fabricante del dispositivo y son especÃficos a la plataforma del dispositivo o modelo.
-
-### Plataformas soportadas
-
- * Android
- * BlackBerry 10
- * iOS
- * Tizen
- * Windows Phone 7 y 8
- * Windows 8
-
-### Ejemplo rápido
-
- // Android: Returns a random 64-bit integer (as a string, again!)
- // The integer is generated on the device's first boot
- //
- // BlackBerry: Returns the PIN number of the device
- // This is a nine-digit unique integer (as a string, though!)
- //
- // iPhone: (Paraphrased from the UIDevice Class documentation)
- // Returns a string of hash values created from multiple hardware identifies.
- // It is guaranteed to be unique for every device and can't be tied
- // to the user account.
- // Windows Phone 7 : Returns a hash of device+current user,
- // if the user is not defined, a guid is generated and will persist until the app is uninstalled
- // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number
- // unique to every GSM and UMTS mobile phone.
- var deviceID = device.uuid;
-
-
-### Rarezas de iOS
-
-El `uuid` en iOS no es exclusiva de un dispositivo, pero varÃa para cada aplicación, para cada instalación. Cambia si puedes borrar y volver a instalar la aplicación, y posiblemente también cuándo actualizar iOS, o incluso mejorar la aplicación por la versión (evidente en iOS 5.1). El `uuid` no es un valor confiable.
-
-### Windows Phone 7 y 8 rarezas
-
-El `uuid` para Windows Phone 7 requiere el permiso `ID_CAP_IDENTITY_DEVICE`. Microsoft pronto probablemente desaprueban esta propiedad. Si la capacidad no está disponible, la aplicación genera un guid persistente que se mantiene durante la duración de la instalación de la aplicación en el dispositivo.
-
-## device.version
-
-Obtener la versión del sistema operativo.
-
- var string = device.version;
-
-
-### Plataformas soportadas
-
- * Android 2.1 +
- * BlackBerry 10
- * Explorador
- * iOS
- * Tizen
- * Windows Phone 7 y 8
- * Windows 8
-
-### Ejemplo rápido
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
\ No newline at end of file
diff --git a/plugins/cordova-plugin-device/doc/es/index.md b/plugins/cordova-plugin-device/doc/es/index.md
deleted file mode 100644
index f4a5897..0000000
--- a/plugins/cordova-plugin-device/doc/es/index.md
+++ /dev/null
@@ -1,220 +0,0 @@
-
-
-# cordova-plugin-device
-
-Este plugin define un global `device` objeto que describe del dispositivo hardware y software. Aunque el objeto está en el ámbito global, no está disponible hasta después de la `deviceready` evento.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## Instalación
-
- cordova plugin add cordova-plugin-device
-
-
-## Propiedades
-
-* device.cordova
-* device.model
-* device.platform
-* device.uuid
-* device.version
-
-## device.cordova
-
-Obtener la versión de Cordova que se ejecuta en el dispositivo.
-
-### Plataformas soportadas
-
-* Amazon fire OS
-* Android
-* BlackBerry 10
-* Explorador
-* Firefox OS
-* iOS
-* Tizen
-* Windows Phone 7 y 8
-* Windows 8
-
-## device.model
-
-El `device.model` devuelve el nombre de modelo del dispositivo o producto. El valor es fijado por el fabricante del dispositivo y puede ser diferente a través de versiones del mismo producto.
-
-### Plataformas soportadas
-
-* Android
-* BlackBerry 10
-* Explorador
-* iOS
-* Tizen
-* Windows Phone 7 y 8
-* Windows 8
-
-### Ejemplo rápido
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
- //
- var model = device.model;
-
-
-### Rarezas Android
-
-* Obtiene el [nombre del producto][1] en lugar del [nombre de la modelo][2], que es a menudo el nombre de código de producción. Por ejemplo, el Nexus One devuelve `Passion` y Motorola Droid devuelve `voles`.
-
- [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
- [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
-
-### Rarezas Tizen
-
-* Devuelve que el modelo de dispositivo asignado por el proveedor, por ejemplo, `TIZEN`
-
-### Windows Phone 7 y 8 rarezas
-
-* Devuelve el modelo de dispositivo especificado por el fabricante. Por ejemplo, el Samsung Focus devuelve `SGH-i917`.
-
-## device.platform
-
-Obtener el nombre del sistema operativo del dispositivo.
-
- var string = device.platform;
-
-
-### Plataformas soportadas
-
-* Android
-* BlackBerry 10
-* Browser4
-* Firefox OS
-* iOS
-* Tizen
-* Windows Phone 7 y 8
-* Windows 8
-
-### Ejemplo rápido
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 rarezas
-
-Dispositivos Windows Phone 7 informe de la plataforma como `WinCE`.
-
-### Windows Phone 8 rarezas
-
-Dispositivos Windows Phone 8 Informe la plataforma como `Win32NT`.
-
-## device.uuid
-
-Obtener identificador universalmente única del dispositivo ([UUID][3]).
-
- [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
-
- var string = device.uuid;
-
-
-### Descripción
-
-Los detalles de cómo se genera un UUID son determinados por el fabricante del dispositivo y son especÃficos a la plataforma del dispositivo o modelo.
-
-### Plataformas soportadas
-
-* Android
-* BlackBerry 10
-* iOS
-* Tizen
-* Windows Phone 7 y 8
-* Windows 8
-
-### Ejemplo rápido
-
- // Android: devuelve un entero de 64 bits al azar (como una cadena, otra vez!)
- // el entero es generado en el primer arranque del dispositivo
- //
- // BlackBerry: devuelve el número PIN del dispositivo
- // este es un entero único de nueve dÃgitos (como una cadena, aunque!)
- //
- // iPhone: (parafraseado de la documentación de la clase UIDevice)
- // devuelve una cadena de valores hash creado a partir
- // de múltiples hardware identifica.
- / / Está garantizado para ser único para cada dispositivo y no puede ser atado / / a la cuenta de usuario.
- // Windows Phone 7: devuelve un hash de dispositivo + usuario actual,
- // si el usuario no está definido, un guid generado y persistirá hasta que se desinstala la aplicación
- //
- // Tizen: devuelve el dispositivo IMEI (identidad de equipo móvil internacional o IMEI es un número
- // único para cada teléfono móvil GSM y UMTS.
- var deviceID = device.uuid;
-
-
-### iOS chanfle
-
-El `uuid` en iOS no es exclusiva de un dispositivo, pero varÃa para cada aplicación, para cada instalación. Cambia si puedes borrar y volver a instalar la aplicación, y posiblemente también cuándo actualizar iOS, o incluso mejorar la aplicación por la versión (evidente en iOS 5.1). El `uuid` no es un valor confiable.
-
-### Windows Phone 7 y 8 rarezas
-
-El `uuid` para Windows Phone 7 requiere el permiso `ID_CAP_IDENTITY_DEVICE`. Microsoft pronto probablemente desaprueban esta propiedad. Si la capacidad no está disponible, la aplicación genera un guid persistente que se mantiene durante la duración de la instalación de la aplicación en el dispositivo.
-
-## device.version
-
-Obtener la versión del sistema operativo.
-
- var string = device.version;
-
-
-### Plataformas soportadas
-
-* Android 2.1 +
-* BlackBerry 10
-* Explorador
-* iOS
-* Tizen
-* Windows Phone 7 y 8
-* Windows 8
-
-### Ejemplo rápido
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. el Mango se vuelve 7.10.7720
- // Tizen: devuelve "TIZEN_20120425_2"
- var deviceVersion = device.version;
diff --git a/plugins/cordova-plugin-device/doc/fr/README.md b/plugins/cordova-plugin-device/doc/fr/README.md
deleted file mode 100644
index 4101fd9..0000000
--- a/plugins/cordova-plugin-device/doc/fr/README.md
+++ /dev/null
@@ -1,215 +0,0 @@
-
-
-# cordova-plugin-device
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device)
-
-Ce plugin définit un global `device` objet qui décrit le matériel et les logiciels de l'appareil. Bien que l'objet est dans la portée globale, il n'est pas disponible jusqu'après la `deviceready` événement.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## Installation
-
- cordova plugin add cordova-plugin-device
-
-
-## Propriétés
-
- * device.cordova
- * device.model
- * device.platform
- * device.uuid
- * device.version
-
-## device.cordova
-
-Retourne la version de Cordova en cours d'exécution sur l'appareil.
-
-### Plates-formes supportées
-
- * Amazon Fire OS
- * Android
- * BlackBerry 10
- * Navigateur
- * Firefox OS
- * iOS
- * Paciarelli
- * Windows Phone 7 et 8
- * Windows 8
-
-## device.model
-
-L'objet `device.model` retourne le nom du modèle de l'appareil/produit. Cette valeur est définie par le fabricant du périphérique et peut varier entre les différentes versions d'un même produit.
-
-### Plates-formes supportées
-
- * Android
- * BlackBerry 10
- * Navigateur
- * iOS
- * Paciarelli
- * Windows Phone 7 et 8
- * Windows 8
-
-### Exemple court
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Voir http://theiphonewiki.com/wiki/index.php?title=Models
- //
- var model = device.model;
-
-
-### Quirks Android
-
- * Retourne le [nom du produit](http://developer.android.com/reference/android/os/Build.html#PRODUCT) au lieu du [nom du modèle](http://developer.android.com/reference/android/os/Build.html#MODEL), ce qui équivaut souvent au nom de code de production. Par exemple, `Passion` pour le Nexus One et `voles` pour le Motorola Droid.
-
-### Bizarreries de paciarelli
-
- * Retourne le modèle du dispositif, assigné par le vendeur, par exemple `TIZEN`
-
-### Notes au sujet de Windows Phone 7 et 8
-
- * Retourne le modèle de l'appareil spécifié par le fabricant. Par exemple `SGH-i917` pour le Samsung Focus.
-
-## device.platform
-
-Obtenir le nom de système d'exploitation de l'appareil.
-
- var string = device.platform;
-
-
-### Plates-formes supportées
-
- * Android
- * BlackBerry 10
- * Browser4
- * Firefox OS
- * iOS
- * Paciarelli
- * Windows Phone 7 et 8
- * Windows 8
-
-### Exemple court
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 Quirks
-
-Appareils Windows Phone 7 rapport de la plate-forme comme`WinCE`.
-
-### Notes au sujet de Windows Phone 8
-
-Appareils Windows Phone 8 rapport de la plate-forme comme`Win32NT`.
-
-## device.uuid
-
-Obtenir Universally Unique Identifier de l'appareil ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
-
- var string = device.uuid;
-
-
-### Description
-
-Les détails de comment un UUID généré sont déterminées par le fabricant du périphérique et sont spécifiques à la plate-forme ou le modèle de l'appareil.
-
-### Plates-formes supportées
-
- * Android
- * BlackBerry 10
- * iOS
- * Paciarelli
- * Windows Phone 7 et 8
- * Windows 8
-
-### Exemple court
-
- // Android : retourne un nombre entier 64-bit aléatoire (sous la forme d'une chaîne de caractères, encore !)
- // Ce nombre entier est généré lors du premier démarrage de l'appareil
- //
- // BlackBerry : retourne le numéro PIN de l'appareil
- // Il s'agit d'un nombre entier unique à neuf chiffres (sous la forme d'une chaîne de caractères cependant !)
- //
- // iPhone : (copié depuis la documentation de la classe UIDevice)
- // Retourne une chaîne de caractères générée à partir de plusieurs caractéristiques matérielles.
- / / Il est garanti pour être unique pour chaque appareil et ne peut pas être lié / / pour le compte d'utilisateur.
- // Windows Phone 7 : retourne un hashage généré à partir de appareil+utilisateur actuel,
- // si aucun utilisateur n'est défini, un guid est généré persistera jusqu'à ce que l'application soit désinstallée
- // Tizen : retourne le numéro IMEI (International Mobile Equipment Identity) de l'appareil, ce numéro est
- // unique pour chaque téléphone GSM et UMTS.
- var deviceID = device.uuid;
-
-
-### Spécificités iOS
-
-Le `uuid` sur iOS n'est pas propre à un périphérique, mais varie pour chaque application, pour chaque installation. Elle change si vous supprimez, puis réinstallez l'application, et éventuellement aussi quand vous mettre à jour d'iOS, ou même mettre à jour le soft par version (apparent dans iOS 5.1). Le `uuid` n'est pas une valeur fiable.
-
-### Notes au sujet de Windows Phone 7 et 8
-
-Le `uuid` pour Windows Phone 7 requiert l'autorisation `ID_CAP_IDENTITY_DEVICE` . Microsoft va probablement bientôt obsolète de cette propriété. Si la capacité n'est pas disponible, l'application génère un guid persistant qui est maintenu pendant toute la durée de l'installation de l'application sur le périphérique.
-
-## device.version
-
-Téléchargez la version de système d'exploitation.
-
- var string = device.version;
-
-
-### Plates-formes supportées
-
- * Android 2.1+
- * BlackBerry 10
- * Navigateur
- * iOS
- * Paciarelli
- * Windows Phone 7 et 8
- * Windows 8
-
-### Exemple court
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
\ No newline at end of file
diff --git a/plugins/cordova-plugin-device/doc/fr/index.md b/plugins/cordova-plugin-device/doc/fr/index.md
deleted file mode 100644
index 163e498..0000000
--- a/plugins/cordova-plugin-device/doc/fr/index.md
+++ /dev/null
@@ -1,218 +0,0 @@
-
-
-# cordova-plugin-device
-
-Ce plugin définit un global `device` objet qui décrit le matériel et les logiciels de l'appareil. Bien que l'objet est dans la portée globale, il n'est pas disponible jusqu'après la `deviceready` événement.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## Installation
-
- cordova plugin add cordova-plugin-device
-
-
-## Propriétés
-
-* device.cordova
-* device.model
-* device.platform
-* device.uuid
-* device.version
-
-## device.cordova
-
-Retourne la version de Cordova en cours d'exécution sur l'appareil.
-
-### Plates-formes prises en charge
-
-* Amazon Fire OS
-* Android
-* BlackBerry 10
-* Navigateur
-* Firefox OS
-* iOS
-* Paciarelli
-* Windows Phone 7 et 8
-* Windows 8
-
-## device.model
-
-L'objet `device.model` retourne le nom du modèle de l'appareil/produit. Cette valeur est définie par le fabricant du périphérique et peut varier entre les différentes versions d'un même produit.
-
-### Plates-formes prises en charge
-
-* Android
-* BlackBerry 10
-* Navigateur
-* iOS
-* Paciarelli
-* Windows Phone 7 et 8
-* Windows 8
-
-### Petit exemple
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Voir http://theiphonewiki.com/wiki/index.php?title=Models
- //
- var model = device.model;
-
-
-### Quirks Android
-
-* Retourne le [nom du produit][1] au lieu du [nom du modèle][2], ce qui équivaut souvent au nom de code de production. Par exemple, `Passion` pour le Nexus One et `voles` pour le Motorola Droid.
-
- [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
- [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
-
-### Bizarreries de paciarelli
-
-* Retourne le modèle du dispositif, assigné par le vendeur, par exemple `TIZEN`
-
-### Windows Phone 7 et 8 Quirks
-
-* Retourne le modèle de l'appareil spécifié par le fabricant. Par exemple `SGH-i917` pour le Samsung Focus.
-
-## device.platform
-
-Obtenir le nom de système d'exploitation de l'appareil.
-
- var string = device.platform;
-
-
-### Plates-formes prises en charge
-
-* Android
-* BlackBerry 10
-* Browser4
-* Firefox OS
-* iOS
-* Paciarelli
-* Windows Phone 7 et 8
-* Windows 8
-
-### Petit exemple
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 Quirks
-
-Appareils Windows Phone 7 rapport de la plate-forme comme`WinCE`.
-
-### Notes au sujet de Windows Phone 8
-
-Appareils Windows Phone 8 rapport de la plate-forme comme`Win32NT`.
-
-## device.uuid
-
-Obtenir Universally Unique Identifier de l'appareil ([UUID][3]).
-
- [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
-
- var string = device.uuid;
-
-
-### Description
-
-Les détails de comment un UUID généré sont déterminées par le fabricant du périphérique et sont spécifiques à la plate-forme ou le modèle de l'appareil.
-
-### Plates-formes prises en charge
-
-* Android
-* BlackBerry 10
-* iOS
-* Paciarelli
-* Windows Phone 7 et 8
-* Windows 8
-
-### Petit exemple
-
- // Android : retourne un nombre entier 64-bit aléatoire (sous la forme d'une chaîne de caractères, encore !)
- // Ce nombre entier est généré lors du premier démarrage de l'appareil
- //
- // BlackBerry : retourne le numéro PIN de l'appareil
- // Il s'agit d'un nombre entier unique à neuf chiffres (sous la forme d'une chaîne de caractères cependant !)
- //
- // iPhone : (copié depuis la documentation de la classe UIDevice)
- // Retourne une chaîne de caractères générée à partir de plusieurs caractéristiques matérielles.
- / / Il est garanti pour être unique pour chaque appareil et ne peut pas être lié / / pour le compte d'utilisateur.
- // Windows Phone 7 : retourne un hashage généré à partir de appareil+utilisateur actuel,
- // si aucun utilisateur n'est défini, un guid est généré persistera jusqu'à ce que l'application soit désinstallée
- // Tizen : retourne le numéro IMEI (International Mobile Equipment Identity) de l'appareil, ce numéro est
- // unique pour chaque téléphone GSM et UMTS.
- var deviceID = device.uuid;
-
-
-### Spécificités iOS
-
-Le `uuid` sur iOS n'est pas propre à un périphérique, mais varie pour chaque application, pour chaque installation. Elle change si vous supprimez, puis réinstallez l'application, et éventuellement aussi quand vous mettre à jour d'iOS, ou même mettre à jour le soft par version (apparent dans iOS 5.1). Le `uuid` n'est pas une valeur fiable.
-
-### Windows Phone 7 et 8 Quirks
-
-Le `uuid` pour Windows Phone 7 requiert l'autorisation `ID_CAP_IDENTITY_DEVICE` . Microsoft va probablement bientôt obsolète de cette propriété. Si la capacité n'est pas disponible, l'application génère un guid persistant qui est maintenu pendant toute la durée de l'installation de l'application sur le périphérique.
-
-## device.version
-
-Téléchargez la version de système d'exploitation.
-
- var string = device.version;
-
-
-### Plates-formes prises en charge
-
-* Android 2.1+
-* BlackBerry 10
-* Navigateur
-* iOS
-* Paciarelli
-* Windows Phone 7 et 8
-* Windows 8
-
-### Petit exemple
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
diff --git a/plugins/cordova-plugin-device/doc/it/README.md b/plugins/cordova-plugin-device/doc/it/README.md
deleted file mode 100644
index 7974962..0000000
--- a/plugins/cordova-plugin-device/doc/it/README.md
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-# cordova-plugin-device
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device)
-
-Questo plugin definisce un global `device` oggetto che descrive il dispositivo hardware e software. Sebbene l'oggetto sia in ambito globale, non è disponibile fino a dopo il `deviceready` evento.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## Installazione
-
- cordova plugin add cordova-plugin-device
-
-
-## ProprietÃ
-
- * device.cordova
- * device.model
- * device.platform
- * device.uuid
- * device.version
-
-## device.cordova
-
-Ottenere la versione di Cordova in esecuzione nel dispositivo.
-
-### Piattaforme supportate
-
- * Amazon fuoco OS
- * Android
- * BlackBerry 10
- * Browser
- * Firefox OS
- * iOS
- * Tizen
- * Windows Phone 7 e 8
- * Windows 8
-
-## device.model
-
-Il `device.model` restituisce il nome del modello del dispositivo o del prodotto. Il valore viene impostato dal produttore del dispositivo e può essere differente tra le versioni dello stesso prodotto.
-
-### Piattaforme supportate
-
- * Android
- * BlackBerry 10
- * Browser
- * iOS
- * Tizen
- * Windows Phone 7 e 8
- * Windows 8
-
-### Esempio rapido
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Vedi http://theiphonewiki.com/wiki/index.php?title=Models / / modello var = device.model;
-
-
-### Stranezze Android
-
- * Ottiene il [nome del prodotto](http://developer.android.com/reference/android/os/Build.html#PRODUCT) anziché il [nome del modello](http://developer.android.com/reference/android/os/Build.html#MODEL), che è spesso il nome di codice di produzione. Ad esempio, restituisce il Nexus One `Passion` , e Motorola Droid restituisce`voles`.
-
-### Tizen stranezze
-
- * Restituisce il modello di dispositivo assegnato dal fornitore, ad esempio,`TIZEN`
-
-### Windows Phone 7 e 8 stranezze
-
- * Restituisce il modello di dispositivo specificato dal produttore. Ad esempio, restituisce il Samsung Focus`SGH-i917`.
-
-## device.platform
-
-Ottenere il nome del sistema operativo del dispositivo.
-
- var string = device.platform;
-
-
-### Piattaforme supportate
-
- * Android
- * BlackBerry 10
- * Browser4
- * Firefox OS
- * iOS
- * Tizen
- * Windows Phone 7 e 8
- * Windows 8
-
-### Esempio rapido
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 capricci
-
-Windows Phone 7 dispositivi segnalano la piattaforma come`WinCE`.
-
-### Windows Phone 8 stranezze
-
-Dispositivi Windows Phone 8 segnalano la piattaforma come`Win32NT`.
-
-## device.uuid
-
-Ottenere identificatore del dispositivo univoco universale ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
-
- var string = device.uuid;
-
-
-### Descrizione
-
-I dettagli di come viene generato un UUID sono determinati dal produttore del dispositivo e sono specifici per la piattaforma o il modello del dispositivo.
-
-### Piattaforme supportate
-
- * Android
- * BlackBerry 10
- * iOS
- * Tizen
- * Windows Phone 7 e 8
- * Windows 8
-
-### Esempio rapido
-
- / / Android: restituisce un intero casuale di 64 bit (come stringa, ancora una volta!) / / il numero intero è generato al primo avvio del dispositivo / / / / BlackBerry: restituisce il numero PIN del dispositivo / / questo è un valore integer univoco a nove cifre (come stringa, benchè!) / / / / iPhone: (parafrasato dalla documentazione della classe UIDevice) / / restituisce una stringa di valori hash creata dall'hardware più identifica.
- / / È garantito per essere unica per ogni dispositivo e non può essere legato / / per l'account utente.
- / / Windows Phone 7: restituisce un hash dell'utente corrente, + dispositivo / / se l'utente non è definito, un guid generato e persisterà fino a quando l'applicazione viene disinstallata / / Tizen: restituisce il dispositivo IMEI (International Mobile Equipment Identity o IMEI è un numero / / unico per ogni cellulare GSM e UMTS.
- var deviceID = device.uuid;
-
-
-### iOS Quirk
-
-Il `uuid` su iOS non è univoco per un dispositivo, ma varia per ogni applicazione, per ogni installazione. Cambia se si elimina e re-installare l'app, e possibilmente anche quando aggiornare iOS o anche aggiornare l'app per ogni versione (apparente in iOS 5.1). Il `uuid` non è un valore affidabile.
-
-### Windows Phone 7 e 8 stranezze
-
-Il `uuid` per Windows Phone 7 richiede l'autorizzazione `ID_CAP_IDENTITY_DEVICE` . Microsoft probabilmente sarà presto deprecare questa proprietà . Se la funzionalità non è disponibile, l'applicazione genera un guid persistente che viene mantenuto per la durata dell'installazione dell'applicazione sul dispositivo.
-
-## device.version
-
-Ottenere la versione del sistema operativo.
-
- var string = device.version;
-
-
-### Piattaforme supportate
-
- * Android 2.1 +
- * BlackBerry 10
- * Browser
- * iOS
- * Tizen
- * Windows Phone 7 e 8
- * Windows 8
-
-### Esempio rapido
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
\ No newline at end of file
diff --git a/plugins/cordova-plugin-device/doc/it/index.md b/plugins/cordova-plugin-device/doc/it/index.md
deleted file mode 100644
index 98c6200..0000000
--- a/plugins/cordova-plugin-device/doc/it/index.md
+++ /dev/null
@@ -1,206 +0,0 @@
-
-
-# cordova-plugin-device
-
-Questo plugin definisce un global `device` oggetto che descrive il dispositivo hardware e software. Sebbene l'oggetto sia in ambito globale, non è disponibile fino a dopo il `deviceready` evento.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## Installazione
-
- cordova plugin add cordova-plugin-device
-
-
-## ProprietÃ
-
-* device.cordova
-* device.model
-* device.platform
-* device.uuid
-* device.version
-
-## device.cordova
-
-Ottenere la versione di Cordova in esecuzione nel dispositivo.
-
-### Piattaforme supportate
-
-* Amazon fuoco OS
-* Android
-* BlackBerry 10
-* Browser
-* Firefox OS
-* iOS
-* Tizen
-* Windows Phone 7 e 8
-* Windows 8
-
-## device.model
-
-Il `device.model` restituisce il nome del modello del dispositivo o del prodotto. Il valore viene impostato dal produttore del dispositivo e può essere differente tra le versioni dello stesso prodotto.
-
-### Piattaforme supportate
-
-* Android
-* BlackBerry 10
-* Browser
-* iOS
-* Tizen
-* Windows Phone 7 e 8
-* Windows 8
-
-### Esempio rapido
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Vedi http://theiphonewiki.com/wiki/index.php?title=Models / / modello var = device.model;
-
-
-### Stranezze Android
-
-* Ottiene il [nome del prodotto][1] anziché il [nome del modello][2], che è spesso il nome di codice di produzione. Ad esempio, restituisce il Nexus One `Passion` , e Motorola Droid restituisce`voles`.
-
- [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
- [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
-
-### Tizen stranezze
-
-* Restituisce il modello di dispositivo assegnato dal fornitore, ad esempio,`TIZEN`
-
-### Windows Phone 7 e 8 stranezze
-
-* Restituisce il modello di dispositivo specificato dal produttore. Ad esempio, restituisce il Samsung Focus`SGH-i917`.
-
-## device.platform
-
-Ottenere il nome del sistema operativo del dispositivo.
-
- var string = device.platform;
-
-
-### Piattaforme supportate
-
-* Android
-* BlackBerry 10
-* Browser4
-* Firefox OS
-* iOS
-* Tizen
-* Windows Phone 7 e 8
-* Windows 8
-
-### Esempio rapido
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 capricci
-
-Windows Phone 7 dispositivi segnalano la piattaforma come`WinCE`.
-
-### Windows Phone 8 stranezze
-
-Dispositivi Windows Phone 8 segnalano la piattaforma come`Win32NT`.
-
-## device.uuid
-
-Ottenere identificatore del dispositivo univoco universale ([UUID][3]).
-
- [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
-
- var string = device.uuid;
-
-
-### Descrizione
-
-I dettagli di come viene generato un UUID sono determinati dal produttore del dispositivo e sono specifici per la piattaforma o il modello del dispositivo.
-
-### Piattaforme supportate
-
-* Android
-* BlackBerry 10
-* iOS
-* Tizen
-* Windows Phone 7 e 8
-* Windows 8
-
-### Esempio rapido
-
- / / Android: restituisce un intero casuale di 64 bit (come stringa, ancora una volta!) / / il numero intero è generato al primo avvio del dispositivo / / / / BlackBerry: restituisce il numero PIN del dispositivo / / questo è un valore integer univoco a nove cifre (come stringa, benchè!) / / / / iPhone: (parafrasato dalla documentazione della classe UIDevice) / / restituisce una stringa di valori hash creata dall'hardware più identifica.
- / / È garantito per essere unica per ogni dispositivo e non può essere legato / / per l'account utente.
- / / Windows Phone 7: restituisce un hash dell'utente corrente, + dispositivo / / se l'utente non è definito, un guid generato e persisterà fino a quando l'applicazione viene disinstallata / / Tizen: restituisce il dispositivo IMEI (International Mobile Equipment Identity o IMEI è un numero / / unico per ogni cellulare GSM e UMTS.
- var deviceID = device.uuid;
-
-
-### iOS Quirk
-
-Il `uuid` su iOS non è univoco per un dispositivo, ma varia per ogni applicazione, per ogni installazione. Cambia se si elimina e re-installare l'app, e possibilmente anche quando aggiornare iOS o anche aggiornare l'app per ogni versione (apparente in iOS 5.1). Il `uuid` non è un valore affidabile.
-
-### Windows Phone 7 e 8 stranezze
-
-Il `uuid` per Windows Phone 7 richiede l'autorizzazione `ID_CAP_IDENTITY_DEVICE` . Microsoft probabilmente sarà presto deprecare questa proprietà . Se la funzionalità non è disponibile, l'applicazione genera un guid persistente che viene mantenuto per la durata dell'installazione dell'applicazione sul dispositivo.
-
-## device.version
-
-Ottenere la versione del sistema operativo.
-
- var string = device.version;
-
-
-### Piattaforme supportate
-
-* Android 2.1 +
-* BlackBerry 10
-* Browser
-* iOS
-* Tizen
-* Windows Phone 7 e 8
-* Windows 8
-
-### Esempio rapido
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
diff --git a/plugins/cordova-plugin-device/doc/ja/README.md b/plugins/cordova-plugin-device/doc/ja/README.md
deleted file mode 100644
index 5a345f8..0000000
--- a/plugins/cordova-plugin-device/doc/ja/README.md
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-# cordova-plugin-device
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device)
-
-ã“ã®ãƒ—ラグインをグãƒãƒ¼ãƒãƒ«å®šç¾©ã—ã¾ã™ `device` オブジェクトã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã¨ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ ãã‚Œã¯å¾Œã¾ã§åˆ©ç”¨å¯èƒ½ãªã‚ªãƒ–ジェクトãŒã‚°ãƒãƒ¼ãƒãƒ« スコープã§ã¯ã€ `deviceready` イベント。
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## インストール
-
- cordova plugin add cordova-plugin-device
-
-
-## プãƒãƒ‘ティ
-
- * device.cordova
- * device.model
- * device.platform
- * device.uuid
- * device.version
-
-## device.cordova
-
-デãƒã‚¤ã‚¹ã§å®Ÿè¡Œã•ã‚Œã¦ã„るコルドãƒã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ã€‚
-
-### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプラットフォーãƒ
-
- * ã‚¢ãƒžã‚¾ãƒ³ç« OS
- * アンドãƒã‚¤ãƒ‰
- * ブラックベリー 10
- * ブラウザー
- * Firefox ã® OS
- * iOS
- * Tizen
- * Windows Phone 7 㨠8
- * Windows 8
-
-## device.model
-
-`device.model`ã€ãƒ‡ãƒã‚¤ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã¾ãŸã¯è£½å“ã®åå‰ã‚’è¿”ã—ã¾ã™ã€‚値ã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®è£½é€ å…ƒã«ã‚ˆã£ã¦è¨å®šã•ã‚Œã€åŒã˜è£½å“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³é–“ã§ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚
-
-### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプラットフォーãƒ
-
- * アンドãƒã‚¤ãƒ‰
- * ブラックベリー 10
- * ブラウザー
- * iOS
- * Tizen
- * Windows Phone 7 㨠8
- * Windows 8
-
-### ç°¡å˜ãªä¾‹
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Http://theiphonewiki.com/wiki/index.php?title=Models ã‚’å‚ç…§ã—ã¦ãã ã•ã„//var モデル = device.model;
-
-
-### Android ã®ç™–
-
- * 生産コードåã¯[モデルå](http://developer.android.com/reference/android/os/Build.html#MODEL)ã®ä»£ã‚ã‚Šã«[製å“å](http://developer.android.com/reference/android/os/Build.html#PRODUCT)ã‚’å–å¾—ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒã‚¯ã‚µã‚¹ 1 ã¤ã‚’è¿”ã—ã¾ã™ `Passion` ã€Motorola ã®ãƒ‰ãƒã‚¤ãƒ‰ã‚’è¿”ã—ã¾ã™`voles`.
-
-### Tizen ã®ç™–
-
- * ãŸã¨ãˆã°ã€ãƒ™ãƒ³ãƒ€ãƒ¼ã«ã‚ˆã£ã¦å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„るデãƒã‚¤ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã‚’è¿”ã—ã¾ã™`TIZEN`
-
-### Windows Phone 7 㨠8 癖
-
- * è£½é€ å…ƒã«ã‚ˆã£ã¦æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒã‚¤ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã‚’è¿”ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€ä¸‰æ˜Ÿãƒ•ã‚©ãƒ¼ã‚«ã‚¹ã‚’è¿”ã—ã¾ã™`SGH-i917`.
-
-## device.platform
-
-デãƒã‚¤ã‚¹ã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚° システムåã‚’å–å¾—ã—ã¾ã™ã€‚
-
- var string = device.platform;
-
-
-### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプラットフォーãƒ
-
- * アンドãƒã‚¤ãƒ‰
- * ブラックベリー 10
- * Browser4
- * Firefox ã® OS
- * iOS
- * Tizen
- * Windows Phone 7 㨠8
- * Windows 8
-
-### ç°¡å˜ãªä¾‹
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 ã®ç™–
-
-Windows Phone 7 デãƒã‚¤ã‚¹ã¨ãƒ—ãƒ©ãƒƒãƒˆãƒ•ã‚©ãƒ¼ãƒ ã‚’å ±å‘Šã—ã¾ã™ã€‚`WinCE`.
-
-### Windows Phone 8 ç™–
-
-Windows Phone 8 デãƒã‚¤ã‚¹ã¨ãƒ—ãƒ©ãƒƒãƒˆãƒ•ã‚©ãƒ¼ãƒ ã‚’å ±å‘Šã—ã¾ã™ã€‚`Win32NT`.
-
-## device.uuid
-
-デãƒã‚¤ã‚¹ã®ãƒ¦ãƒ‹ãƒãƒ¼ã‚µãƒ« ・ ユニークè˜åˆ¥å ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)ã‚’å–å¾—ã—ã¾ã™ã€‚).
-
- var string = device.uuid;
-
-
-### 解説
-
-UUID を生æˆã™ã‚‹æ–¹æ³•ã®è©³ç´°ã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®è£½é€ å…ƒã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã€ãƒ‡ãƒã‚¤ã‚¹ã®ãƒ—ラットフォームやモデルã«å›ºæœ‰ã§ã™ã€‚
-
-### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプラットフォーãƒ
-
- * アンドãƒã‚¤ãƒ‰
- * ブラックベリー 10
- * iOS
- * Tizen
- * Windows Phone 7 㨠8
- * Windows 8
-
-### ç°¡å˜ãªä¾‹
-
- //アンドãƒã‚¤ãƒ‰: ランダム㪠64 ビットã®æ•´æ•° (ã‚’æ–‡å—列ã¨ã—ã¦è¿”ã—ã¾ã™ã€å†ã³ ï¼ï¼‰/デãƒã‚¤ã‚¹ã®æœ€åˆã®èµ·å‹•æ™‚ã«ç”Ÿæˆã•ã‚Œã‚‹æ•´æ•°/////ブラックベリー: デãƒã‚¤ã‚¹ã®ãƒ”ン番å·ã‚’è¿”ã—ã¾ã™//ã“れ㯠9 æ¡ã®ä¸€æ„ãªæ•´æ•° (ã‚’æ–‡å—列ã¨ã—ã¦ã‚‚ ï¼)////iPhone: (UIDevice クラスã®ãƒ‰ã‚ュメントã‹ã‚‰è¨€ã„æ›ãˆï¼‰//è˜åˆ¥è¤‡æ•°ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‹ã‚‰ä½œæˆã•ã‚ŒãŸãƒãƒƒã‚·ãƒ¥å€¤ã®æ–‡å—列を返ã—ã¾ã™ã€‚。
- //ãã‚Œã¯ã™ã¹ã¦ã®ãƒ‡ãƒã‚¤ã‚¹ã«å¯¾ã—ã¦ä¸€æ„ã§ã‚ã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã€æŽ¥ç¶šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“//ユーザー アカウント。
- //Windows Phone 7: デãƒã‚¤ã‚¹ + ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒãƒƒã‚·ãƒ¥ã‚’è¿”ã—ã¾ã™//ユーザーãŒå®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆ guid ãŒç”Ÿæˆã•ã‚Œã€ã‚¢ãƒ—リãŒã‚¢ãƒ³ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã‚‹ã¾ã§ä¿æŒã•ã‚Œã¾ã™//Tizen: デãƒã‚¤ã‚¹ã® IMEI ã‚’è¿”ã—ã¾ã™ (国際モãƒã‚¤ãƒ«æ©Ÿå™¨ã‚¢ã‚¤ãƒ‡ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¾ãŸã¯ IMEI ã¯ç•ªå·ã§ã™//ã™ã¹ã¦ã® GSM ãŠã‚ˆã³ UMTS ã®æºå¸¯é›»è©±ã«å›ºæœ‰ã§ã™ã€‚
- var deviceID = device.uuid;
-
-
-### iOS ã®æ°—ã¾ãã‚Œ
-
-`uuid`IOS ã§ã€ãƒ‡ãƒã‚¤ã‚¹ã«å›ºæœ‰ã§ã¯ãªã„インストールã”ã¨ã€ã‚¢ãƒ—リケーションã”ã¨ã«ç•°ãªã‚Šã¾ã™ã€‚ 削除ã€ã‚¢ãƒ—リをå†ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãŸå ´åˆã«å¤‰æ›´ã¨å¤šåˆ†ã¾ãŸã¨ãアップグレード iOS ã®, ã¾ãŸã¯ã‚‚アップグレードã™ã‚‹ã‚¢ãƒ—リ (iOS ã® 5.1 ã§æ˜Žã‚‰ã‹ã«ï¼‰ ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã”ã¨ã€‚ `uuid`ã¯ä¿¡é ¼æ€§ã®é«˜ã„値ã§ã¯ã‚ã‚Šã¾ã›ã‚“。
-
-### Windows Phone 7 㨠8 癖
-
-`uuid`ã®ãŸã‚ã« Windows Phone 7 ã«ã¯ã€æ¨©é™ãŒå¿…è¦ã§ã™ `ID_CAP_IDENTITY_DEVICE` 。 Microsoft ã¯ã™ãã«ã“ã®ãƒ—ãƒãƒ‘ティを廃æ¢ã—ã¦å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ 機能ãŒåˆ©ç”¨ã§ããªã„å ´åˆã€ã‚¢ãƒ—リケーションã¯ãƒ‡ãƒã‚¤ã‚¹ã¸ã®ã‚¢ãƒ—リケーションã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã®æŒç¶šæœŸé–“ã®ãŸã‚ã«ä¿æŒã•ã‚Œã¦ã„る永続的㪠guid を生æˆã—ã¾ã™ã€‚
-
-## device.version
-
-オペレーティング システムã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ã€‚
-
- var string = device.version;
-
-
-### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプラットフォーãƒ
-
- * アンドãƒã‚¤ãƒ‰ 2.1 +
- * ブラックベリー 10
- * ブラウザー
- * iOS
- * Tizen
- * Windows Phone 7 㨠8
- * Windows 8
-
-### ç°¡å˜ãªä¾‹
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
\ No newline at end of file
diff --git a/plugins/cordova-plugin-device/doc/ja/index.md b/plugins/cordova-plugin-device/doc/ja/index.md
deleted file mode 100644
index b4030fd..0000000
--- a/plugins/cordova-plugin-device/doc/ja/index.md
+++ /dev/null
@@ -1,206 +0,0 @@
-
-
-# cordova-plugin-device
-
-ã“ã®ãƒ—ラグインをグãƒãƒ¼ãƒãƒ«å®šç¾©ã—ã¾ã™ `device` オブジェクトã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã¨ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ ãã‚Œã¯å¾Œã¾ã§åˆ©ç”¨å¯èƒ½ãªã‚ªãƒ–ジェクトãŒã‚°ãƒãƒ¼ãƒãƒ« スコープã§ã¯ã€ `deviceready` イベント。
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## インストール
-
- cordova plugin add cordova-plugin-device
-
-
-## プãƒãƒ‘ティ
-
-* device.cordova
-* device.model
-* device.platform
-* device.uuid
-* device.version
-
-## device.cordova
-
-デãƒã‚¤ã‚¹ã§å®Ÿè¡Œã•ã‚Œã¦ã„るコルドãƒã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ã€‚
-
-### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプラットフォーãƒ
-
-* ã‚¢ãƒžã‚¾ãƒ³ç« OS
-* アンドãƒã‚¤ãƒ‰
-* ブラックベリー 10
-* ブラウザー
-* Firefox ã® OS
-* iOS
-* Tizen
-* Windows Phone 7 㨠8
-* Windows 8
-
-## device.model
-
-`device.model`ã€ãƒ‡ãƒã‚¤ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã¾ãŸã¯è£½å“ã®åå‰ã‚’è¿”ã—ã¾ã™ã€‚値ã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®è£½é€ å…ƒã«ã‚ˆã£ã¦è¨å®šã•ã‚Œã€åŒã˜è£½å“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³é–“ã§ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚
-
-### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプラットフォーãƒ
-
-* アンドãƒã‚¤ãƒ‰
-* ブラックベリー 10
-* ブラウザー
-* iOS
-* Tizen
-* Windows Phone 7 㨠8
-* Windows 8
-
-### ç°¡å˜ãªä¾‹
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Http://theiphonewiki.com/wiki/index.php?title=Models ã‚’å‚ç…§ã—ã¦ãã ã•ã„//var モデル = device.model;
-
-
-### Android ã®ç™–
-
-* 生産コードåã¯[モデルå][1]ã®ä»£ã‚ã‚Šã«[製å“å][2]ã‚’å–å¾—ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒã‚¯ã‚µã‚¹ 1 ã¤ã‚’è¿”ã—ã¾ã™ `Passion` ã€Motorola ã®ãƒ‰ãƒã‚¤ãƒ‰ã‚’è¿”ã—ã¾ã™`voles`.
-
- [1]: http://developer.android.com/reference/android/os/Build.html#MODEL
- [2]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
-
-### Tizen ã®ç™–
-
-* ãŸã¨ãˆã°ã€ãƒ™ãƒ³ãƒ€ãƒ¼ã«ã‚ˆã£ã¦å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„るデãƒã‚¤ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã‚’è¿”ã—ã¾ã™`TIZEN`
-
-### Windows Phone 7 㨠8 癖
-
-* è£½é€ å…ƒã«ã‚ˆã£ã¦æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒã‚¤ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã‚’è¿”ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€ä¸‰æ˜Ÿãƒ•ã‚©ãƒ¼ã‚«ã‚¹ã‚’è¿”ã—ã¾ã™`SGH-i917`.
-
-## device.platform
-
-デãƒã‚¤ã‚¹ã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚° システムåã‚’å–å¾—ã—ã¾ã™ã€‚
-
- var string = device.platform;
-
-
-### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプラットフォーãƒ
-
-* アンドãƒã‚¤ãƒ‰
-* ブラックベリー 10
-* Browser4
-* Firefox ã® OS
-* iOS
-* Tizen
-* Windows Phone 7 㨠8
-* Windows 8
-
-### ç°¡å˜ãªä¾‹
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 ã®ç™–
-
-Windows Phone 7 デãƒã‚¤ã‚¹ã¨ãƒ—ãƒ©ãƒƒãƒˆãƒ•ã‚©ãƒ¼ãƒ ã‚’å ±å‘Šã—ã¾ã™ã€‚`WinCE`.
-
-### Windows Phone 8 ç™–
-
-Windows Phone 8 デãƒã‚¤ã‚¹ã¨ãƒ—ãƒ©ãƒƒãƒˆãƒ•ã‚©ãƒ¼ãƒ ã‚’å ±å‘Šã—ã¾ã™ã€‚`Win32NT`.
-
-## device.uuid
-
-デãƒã‚¤ã‚¹ã®ãƒ¦ãƒ‹ãƒãƒ¼ã‚µãƒ« ・ ユニークè˜åˆ¥å ([UUID][3]ã‚’å–å¾—ã—ã¾ã™ã€‚).
-
- [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
-
- var string = device.uuid;
-
-
-### 説明
-
-UUID を生æˆã™ã‚‹æ–¹æ³•ã®è©³ç´°ã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®è£½é€ å…ƒã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã€ãƒ‡ãƒã‚¤ã‚¹ã®ãƒ—ラットフォームやモデルã«å›ºæœ‰ã§ã™ã€‚
-
-### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプラットフォーãƒ
-
-* アンドãƒã‚¤ãƒ‰
-* ブラックベリー 10
-* iOS
-* Tizen
-* Windows Phone 7 㨠8
-* Windows 8
-
-### ç°¡å˜ãªä¾‹
-
- //アンドãƒã‚¤ãƒ‰: ランダム㪠64 ビットã®æ•´æ•° (ã‚’æ–‡å—列ã¨ã—ã¦è¿”ã—ã¾ã™ã€å†ã³ ï¼ï¼‰/デãƒã‚¤ã‚¹ã®æœ€åˆã®èµ·å‹•æ™‚ã«ç”Ÿæˆã•ã‚Œã‚‹æ•´æ•°/////ブラックベリー: デãƒã‚¤ã‚¹ã®ãƒ”ン番å·ã‚’è¿”ã—ã¾ã™//ã“れ㯠9 æ¡ã®ä¸€æ„ãªæ•´æ•° (ã‚’æ–‡å—列ã¨ã—ã¦ã‚‚ ï¼)////iPhone: (UIDevice クラスã®ãƒ‰ã‚ュメントã‹ã‚‰è¨€ã„æ›ãˆï¼‰//è˜åˆ¥è¤‡æ•°ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‹ã‚‰ä½œæˆã•ã‚ŒãŸãƒãƒƒã‚·ãƒ¥å€¤ã®æ–‡å—列を返ã—ã¾ã™ã€‚。
- //ãã‚Œã¯ã™ã¹ã¦ã®ãƒ‡ãƒã‚¤ã‚¹ã«å¯¾ã—ã¦ä¸€æ„ã§ã‚ã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã€æŽ¥ç¶šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“//ユーザー アカウント。
- //Windows Phone 7: デãƒã‚¤ã‚¹ + ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒãƒƒã‚·ãƒ¥ã‚’è¿”ã—ã¾ã™//ユーザーãŒå®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆ guid ãŒç”Ÿæˆã•ã‚Œã€ã‚¢ãƒ—リãŒã‚¢ãƒ³ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã‚‹ã¾ã§ä¿æŒã•ã‚Œã¾ã™//Tizen: デãƒã‚¤ã‚¹ã® IMEI ã‚’è¿”ã—ã¾ã™ (国際モãƒã‚¤ãƒ«æ©Ÿå™¨ã‚¢ã‚¤ãƒ‡ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¾ãŸã¯ IMEI ã¯ç•ªå·ã§ã™//ã™ã¹ã¦ã® GSM ãŠã‚ˆã³ UMTS ã®æºå¸¯é›»è©±ã«å›ºæœ‰ã§ã™ã€‚
- var deviceID = device.uuid;
-
-
-### iOS ã®æ°—ã¾ãã‚Œ
-
-`uuid`IOS ã§ã€ãƒ‡ãƒã‚¤ã‚¹ã«å›ºæœ‰ã§ã¯ãªã„インストールã”ã¨ã€ã‚¢ãƒ—リケーションã”ã¨ã«ç•°ãªã‚Šã¾ã™ã€‚ 削除ã€ã‚¢ãƒ—リをå†ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãŸå ´åˆã«å¤‰æ›´ã¨å¤šåˆ†ã¾ãŸã¨ãアップグレード iOS ã®, ã¾ãŸã¯ã‚‚アップグレードã™ã‚‹ã‚¢ãƒ—リ (iOS ã® 5.1 ã§æ˜Žã‚‰ã‹ã«ï¼‰ ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã”ã¨ã€‚ `uuid`ã¯ä¿¡é ¼æ€§ã®é«˜ã„値ã§ã¯ã‚ã‚Šã¾ã›ã‚“。
-
-### Windows Phone 7 㨠8 癖
-
-`uuid`ã®ãŸã‚ã« Windows Phone 7 ã«ã¯ã€æ¨©é™ãŒå¿…è¦ã§ã™ `ID_CAP_IDENTITY_DEVICE` 。 Microsoft ã¯ã™ãã«ã“ã®ãƒ—ãƒãƒ‘ティを廃æ¢ã—ã¦å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ 機能ãŒåˆ©ç”¨ã§ããªã„å ´åˆã€ã‚¢ãƒ—リケーションã¯ãƒ‡ãƒã‚¤ã‚¹ã¸ã®ã‚¢ãƒ—リケーションã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã®æŒç¶šæœŸé–“ã®ãŸã‚ã«ä¿æŒã•ã‚Œã¦ã„る永続的㪠guid を生æˆã—ã¾ã™ã€‚
-
-## device.version
-
-オペレーティング システムã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ã€‚
-
- var string = device.version;
-
-
-### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプラットフォーãƒ
-
-* アンドãƒã‚¤ãƒ‰ 2.1 +
-* ブラックベリー 10
-* ブラウザー
-* iOS
-* Tizen
-* Windows Phone 7 㨠8
-* Windows 8
-
-### ç°¡å˜ãªä¾‹
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
diff --git a/plugins/cordova-plugin-device/doc/ko/README.md b/plugins/cordova-plugin-device/doc/ko/README.md
deleted file mode 100644
index a818aac..0000000
--- a/plugins/cordova-plugin-device/doc/ko/README.md
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-# cordova-plugin-device
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device)
-
-ì´ í”ŒëŸ¬ê·¸ì¸ ì •ì˜ ì „ì— `device` 개체, 디바ì´ìŠ¤ì˜ 하드웨어 ë° ì†Œí”„íŠ¸ì›¨ì–´ì— ì„¤ëª… 합니다. 개체는 ì „ì— ë²”ìœ„ì—ì„œ ë¹„ë¡ ê·¸ê²ƒì€ í›„ê¹Œì§€ ì‚¬ìš©í• ìˆ˜ 있는 `deviceready` ì´ë²¤íŠ¸.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## 설치
-
- cordova plugin add cordova-plugin-device
-
-
-## ì†ì„±
-
- * device.cordova
- * device.model
- * device.platform
- * device.uuid
- * device.version
-
-## device.cordova
-
-코르ë„바는 장치ì—ì„œ 실행 ì¤‘ì¸ ë²„ì „ì„ ì–»ì„.
-
-### ì§€ì› ë˜ëŠ” 플랫í¼
-
- * 아마존 화재 ìš´ì˜ ì²´ì œ
- * 안 ë“œ ë¡œì´ë“œ
- * ë¸”ëž™ë² ë¦¬ 10
- * 브ë¼ìš°ì €
- * Firefox ìš´ì˜ ì²´ì œ
- * iOS
- * Tizen
- * Windows Phone 7ê³¼ 8
- * 윈ë„ìš° 8
-
-## device.model
-
-`device.model`소ìžì˜ ëª¨ë¸ ë˜ëŠ” ì œí’ˆì˜ ì´ë¦„ì„ ë°˜í™˜ 합니다. ê°’ 장치 ì œì¡°ì—…ì²´ì—ì„œ ì„¤ì • ë˜ ê³ ë™ì¼ ì œí’ˆì˜ ë²„ì „ ê°„ì— ë‹¤ë¥¼ 수 있습니다.
-
-### ì§€ì› ë˜ëŠ” 플랫í¼
-
- * 안 ë“œ ë¡œì´ë“œ
- * ë¸”ëž™ë² ë¦¬ 10
- * 브ë¼ìš°ì €
- * iOS
- * Tizen
- * Windows Phone 7ê³¼ 8
- * 윈ë„ìš° 8
-
-### ë¹ ë¥¸ ì˜ˆì œ
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Http://theiphonewiki.com/wiki/index.php?title=Models 참조 / / var ëª¨ë¸ = device.model;
-
-
-### 안 ë“œ ë¡œì´ë“œ 단ì
-
- * ì–´ë–¤ì€ ì¢…ì¢… 프로ë•ì…˜ 코드 ì´ë¦„ ëŒ€ì‹ [ì œí’ˆ ëª¨ë¸ ì´ë¦„](http://developer.android.com/reference/android/os/Build.html#MODEL), [ì œí’ˆ ì´ë¦„](http://developer.android.com/reference/android/os/Build.html#PRODUCT) ì„ ê°€ì ¸ì˜µë‹ˆë‹¤. 예를 들어 넥서스 하나 반환 합니다 `Passion` , ëª¨í† ë¡œë¼ Droid를 반환 합니다`voles`.
-
-### Tizen 특수
-
- * 예를 들어, 공급 ì—…ì²´ì— ì˜í•´ í• ë‹¹ ëœ ë””ë°”ì´ìŠ¤ 모ë¸ì„ 반환 합니다.`TIZEN`
-
-### Windows Phone 7, 8 특수
-
- * ì œì¡°ì—…ì²´ì—ì„œ ì§€ì • 하는 장치 모ë¸ì„ 반환 합니다. 예를 들어 삼성 í¬ì»¤ìŠ¤ë¥¼ 반환 합니다.`SGH-i917`.
-
-## device.platform
-
-ìž¥ì¹˜ì˜ ìš´ì˜ ì²´ì œ ì´ë¦„ì„ ì–»ì„.
-
- var string = device.platform;
-
-
-### ì§€ì› ë˜ëŠ” 플랫í¼
-
- * 안 ë“œ ë¡œì´ë“œ
- * ë¸”ëž™ë² ë¦¬ 10
- * Browser4
- * Firefox ìš´ì˜ ì²´ì œ
- * iOS
- * Tizen
- * Windows Phone 7ê³¼ 8
- * 윈ë„ìš° 8
-
-### ë¹ ë¥¸ ì˜ˆì œ
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 단ì
-
-Windows Phone 7 장치 ë³´ê³ í”Œëž«í¼ìœ¼ë¡œ`WinCE`.
-
-### Windows Phone 8 단ì
-
-Windows Phone 8 장치 ë³´ê³ í”Œëž«í¼ìœ¼ë¡œ`Win32NT`.
-
-## device.uuid
-
-소ìžì˜ 보편ì 으로 ê³ ìœ ì‹ë³„ìž ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier) 를 ì–»ì„합니다).
-
- var string = device.uuid;
-
-
-### 설명
-
-UUID ìƒì„± ë°©ë²•ì˜ ìžì„¸í•œ ë‚´ìš©ì€ ìž¥ì¹˜ ì œì¡°ì—…ì²´ì— ì˜í•´ ê²°ì • ë©ë‹ˆë‹¤ ë° ì†Œìžì˜ í”Œëž«í¼ ì´ë‚˜ 모ë¸.
-
-### ì§€ì› ë˜ëŠ” 플랫í¼
-
- * 안 ë“œ ë¡œì´ë“œ
- * ë¸”ëž™ë² ë¦¬ 10
- * iOS
- * Tizen
- * Windows Phone 7ê³¼ 8
- * 윈ë„ìš° 8
-
-### ë¹ ë¥¸ ì˜ˆì œ
-
- / / 안 ë“œ ë¡œì´ë“œ: (문ìžì—´ë¡œ 다시!) ìž„ì˜ì˜ 64 비트 ì •ìˆ˜ë¥¼ 반환 합니다 / / ì •ìˆ˜ ìž¥ì¹˜ì˜ ì²« 번째 부팅ì—ì„œ ìƒì„± / / / / ë¸”ëž™ë² ë¦¬: 디바ì´ìŠ¤ì˜ í•€ 번호를 반환 합니다 / / ì´ê²ƒì€ 9 ìžë¦¬ ê³ ìœ ì •ìˆ˜ (문ìžì—´ë¡œ 비ë¡!) / / / / ì•„ì´í°: (UIDevice í´ëž˜ìŠ¤ 설명서ì—ì„œ ìŠ ì—ˆ) / / 문ìžì—´ 여러 하드웨어ì—ì„œ ìƒì„± 하는 í•´ì‹œ ê°’ì„ ì‹ë³„ 하는 반환 합니다.
- / ê·¸ê²ƒì€ ëª¨ë“ ìž¥ì¹˜ì— ëŒ€ í•œ ê³ ìœ í•´ì•¼ 보장 ë˜ ê³ ë¬¶ì¼ ìˆ˜ 없습니다 / / / ì‚¬ìš©ìž ê³„ì •ì—.
- / / Windows Phone 7: 장치 + 현재 사용ìžì˜ 해시를 반환 합니다 / / ì‚¬ìš©ìž ì •ì˜ ë˜ì§€ ì•Šì€ ê²½ìš° guid ìƒì„± ë˜ ê³ ì‘ìš© í”„ë¡œê·¸ëž¨ì„ ì œê±°í• ë•Œê¹Œì§€ ìœ ì§€ ë©ë‹ˆë‹¤ / / Tizen: 반환 장치 IMEI (êµì œ ëª¨ë°”ì¼ ê¸°ê¸° ì‹ë³„ ë˜ëŠ” IMEI 숫ìžìž…니다 / / ëª¨ë“ GSM와 UMTS 휴대 ì „í™” ê³ ìœ .
- var deviceID = device.uuid;
-
-
-### iOS 특질
-
-`uuid`ios ìž¥ì¹˜ì— ê³ ìœ í•˜ì§€ 않습니다 하지만 ê° ì„¤ì¹˜ì— ëŒ€ í•œ ì‘ìš© 프로그램 마다 다릅니다. ì‚ì œ 하 ê³ ë‹¤ì‹œ ì• í”Œ 리 ì¼€ì´ ì…˜ì„ ì„¤ì¹˜ 하는 경우 변경 가능 하 게 ë˜í•œ iOS를 ì—…ê·¸ë ˆì´ë“œ 하거나 ë•Œ ë²„ì „ (iOS 5.1ì—ì—ì„œ 명백한) 당 ì‘ìš© 프로그램 ì—…ê·¸ë ˆì´ë“œë„ 하 ê³ . `uuid`ì€ ì‹ ë¢°í• ìˆ˜ 있는 ê°’ì´ ì•„ë‹™ë‹ˆë‹¤.
-
-### Windows Phone 7, 8 특수
-
-`uuid`Windows Phone 7 í•„ìš” 허가 `ID_CAP_IDENTITY_DEVICE` . Microsoft는 ê³§ì´ ì†ì„±ì„ 세ì›ë‹ˆë‹¤ ê°€ëŠ¥ì„±ì´ ê²ƒìž…ë‹ˆë‹¤. ê¸°ëŠ¥ì„ ì‚¬ìš©í• ìˆ˜ 없는 경우 ì‘ìš© 프로그램 ìž¥ì¹˜ì— ì‘ìš© í”„ë¡œê·¸ëž¨ì˜ ì„¤ì¹˜ 하는 ë™ì•ˆ ìœ ì§€ 하는 ì˜êµ¬ guid를 ìƒì„± 합니다.
-
-## device.version
-
-ìš´ì˜ ì²´ì œ ë²„ì „ì„ ì–»ì„.
-
- var string = device.version;
-
-
-### ì§€ì› ë˜ëŠ” 플랫í¼
-
- * 안 ë“œ ë¡œì´ë“œ 2.1 +
- * ë¸”ëž™ë² ë¦¬ 10
- * 브ë¼ìš°ì €
- * iOS
- * Tizen
- * Windows Phone 7ê³¼ 8
- * 윈ë„ìš° 8
-
-### ë¹ ë¥¸ ì˜ˆì œ
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
\ No newline at end of file
diff --git a/plugins/cordova-plugin-device/doc/ko/index.md b/plugins/cordova-plugin-device/doc/ko/index.md
deleted file mode 100644
index 0fe38a7..0000000
--- a/plugins/cordova-plugin-device/doc/ko/index.md
+++ /dev/null
@@ -1,206 +0,0 @@
-
-
-# cordova-plugin-device
-
-ì´ í”ŒëŸ¬ê·¸ì¸ ì •ì˜ ì „ì— `device` 개체, 디바ì´ìŠ¤ì˜ 하드웨어 ë° ì†Œí”„íŠ¸ì›¨ì–´ì— ì„¤ëª… 합니다. 개체는 ì „ì— ë²”ìœ„ì—ì„œ ë¹„ë¡ ê·¸ê²ƒì€ í›„ê¹Œì§€ ì‚¬ìš©í• ìˆ˜ 있는 `deviceready` ì´ë²¤íŠ¸.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## 설치
-
- cordova plugin add cordova-plugin-device
-
-
-## ì†ì„±
-
-* device.cordova
-* device.model
-* device.platform
-* device.uuid
-* device.version
-
-## device.cordova
-
-코르ë„바는 장치ì—ì„œ 실행 ì¤‘ì¸ ë²„ì „ì„ ì–»ì„.
-
-### ì§€ì› ë˜ëŠ” 플랫í¼
-
-* 아마존 화재 ìš´ì˜ ì²´ì œ
-* 안 ë“œ ë¡œì´ë“œ
-* ë¸”ëž™ë² ë¦¬ 10
-* 브ë¼ìš°ì €
-* Firefox ìš´ì˜ ì²´ì œ
-* iOS
-* Tizen
-* Windows Phone 7ê³¼ 8
-* 윈ë„ìš° 8
-
-## device.model
-
-`device.model`소ìžì˜ ëª¨ë¸ ë˜ëŠ” ì œí’ˆì˜ ì´ë¦„ì„ ë°˜í™˜ 합니다. ê°’ 장치 ì œì¡°ì—…ì²´ì—ì„œ ì„¤ì • ë˜ ê³ ë™ì¼ ì œí’ˆì˜ ë²„ì „ ê°„ì— ë‹¤ë¥¼ 수 있습니다.
-
-### ì§€ì› ë˜ëŠ” 플랫í¼
-
-* 안 ë“œ ë¡œì´ë“œ
-* ë¸”ëž™ë² ë¦¬ 10
-* 브ë¼ìš°ì €
-* iOS
-* Tizen
-* Windows Phone 7ê³¼ 8
-* 윈ë„ìš° 8
-
-### ë¹ ë¥¸ ì˜ˆì œ
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Http://theiphonewiki.com/wiki/index.php?title=Models 참조 / / var ëª¨ë¸ = device.model;
-
-
-### 안 ë“œ ë¡œì´ë“œ 단ì
-
-* ì–´ë–¤ì€ ì¢…ì¢… 프로ë•ì…˜ 코드 ì´ë¦„ ëŒ€ì‹ [ì œí’ˆ ëª¨ë¸ ì´ë¦„][1], [ì œí’ˆ ì´ë¦„][2] ì„ ê°€ì ¸ì˜µë‹ˆë‹¤. 예를 들어 넥서스 하나 반환 합니다 `Passion` , ëª¨í† ë¡œë¼ Droid를 반환 합니다`voles`.
-
- [1]: http://developer.android.com/reference/android/os/Build.html#MODEL
- [2]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
-
-### Tizen 특수
-
-* 예를 들어, 공급 ì—…ì²´ì— ì˜í•´ í• ë‹¹ ëœ ë””ë°”ì´ìŠ¤ 모ë¸ì„ 반환 합니다.`TIZEN`
-
-### Windows Phone 7, 8 특수
-
-* ì œì¡°ì—…ì²´ì—ì„œ ì§€ì • 하는 장치 모ë¸ì„ 반환 합니다. 예를 들어 삼성 í¬ì»¤ìŠ¤ë¥¼ 반환 합니다.`SGH-i917`.
-
-## device.platform
-
-ìž¥ì¹˜ì˜ ìš´ì˜ ì²´ì œ ì´ë¦„ì„ ì–»ì„.
-
- var string = device.platform;
-
-
-### ì§€ì› ë˜ëŠ” 플랫í¼
-
-* 안 ë“œ ë¡œì´ë“œ
-* ë¸”ëž™ë² ë¦¬ 10
-* Browser4
-* Firefox ìš´ì˜ ì²´ì œ
-* iOS
-* Tizen
-* Windows Phone 7ê³¼ 8
-* 윈ë„ìš° 8
-
-### ë¹ ë¥¸ ì˜ˆì œ
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 단ì
-
-Windows Phone 7 장치 ë³´ê³ í”Œëž«í¼ìœ¼ë¡œ`WinCE`.
-
-### Windows Phone 8 단ì
-
-Windows Phone 8 장치 ë³´ê³ í”Œëž«í¼ìœ¼ë¡œ`Win32NT`.
-
-## device.uuid
-
-소ìžì˜ 보편ì 으로 ê³ ìœ ì‹ë³„ìž ([UUID][3] 를 ì–»ì„합니다).
-
- [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
-
- var string = device.uuid;
-
-
-### 설명
-
-UUID ìƒì„± ë°©ë²•ì˜ ìžì„¸í•œ ë‚´ìš©ì€ ìž¥ì¹˜ ì œì¡°ì—…ì²´ì— ì˜í•´ ê²°ì • ë©ë‹ˆë‹¤ ë° ì†Œìžì˜ í”Œëž«í¼ ì´ë‚˜ 모ë¸.
-
-### ì§€ì› ë˜ëŠ” 플랫í¼
-
-* 안 ë“œ ë¡œì´ë“œ
-* ë¸”ëž™ë² ë¦¬ 10
-* iOS
-* Tizen
-* Windows Phone 7ê³¼ 8
-* 윈ë„ìš° 8
-
-### ë¹ ë¥¸ ì˜ˆì œ
-
- / / 안 ë“œ ë¡œì´ë“œ: (문ìžì—´ë¡œ 다시!) ìž„ì˜ì˜ 64 비트 ì •ìˆ˜ë¥¼ 반환 합니다 / / ì •ìˆ˜ ìž¥ì¹˜ì˜ ì²« 번째 부팅ì—ì„œ ìƒì„± / / / / ë¸”ëž™ë² ë¦¬: 디바ì´ìŠ¤ì˜ í•€ 번호를 반환 합니다 / / ì´ê²ƒì€ 9 ìžë¦¬ ê³ ìœ ì •ìˆ˜ (문ìžì—´ë¡œ 비ë¡!) / / / / ì•„ì´í°: (UIDevice í´ëž˜ìŠ¤ 설명서ì—ì„œ ìŠ ì—ˆ) / / 문ìžì—´ 여러 하드웨어ì—ì„œ ìƒì„± 하는 í•´ì‹œ ê°’ì„ ì‹ë³„ 하는 반환 합니다.
- / ê·¸ê²ƒì€ ëª¨ë“ ìž¥ì¹˜ì— ëŒ€ í•œ ê³ ìœ í•´ì•¼ 보장 ë˜ ê³ ë¬¶ì¼ ìˆ˜ 없습니다 / / / ì‚¬ìš©ìž ê³„ì •ì—.
- / / Windows Phone 7: 장치 + 현재 사용ìžì˜ 해시를 반환 합니다 / / ì‚¬ìš©ìž ì •ì˜ ë˜ì§€ ì•Šì€ ê²½ìš° guid ìƒì„± ë˜ ê³ ì‘ìš© í”„ë¡œê·¸ëž¨ì„ ì œê±°í• ë•Œê¹Œì§€ ìœ ì§€ ë©ë‹ˆë‹¤ / / Tizen: 반환 장치 IMEI (êµì œ ëª¨ë°”ì¼ ê¸°ê¸° ì‹ë³„ ë˜ëŠ” IMEI 숫ìžìž…니다 / / ëª¨ë“ GSM와 UMTS 휴대 ì „í™” ê³ ìœ .
- var deviceID = device.uuid;
-
-
-### iOS 특질
-
-`uuid`ios ìž¥ì¹˜ì— ê³ ìœ í•˜ì§€ 않습니다 하지만 ê° ì„¤ì¹˜ì— ëŒ€ í•œ ì‘ìš© 프로그램 마다 다릅니다. ì‚ì œ 하 ê³ ë‹¤ì‹œ ì• í”Œ 리 ì¼€ì´ ì…˜ì„ ì„¤ì¹˜ 하는 경우 변경 가능 하 게 ë˜í•œ iOS를 ì—…ê·¸ë ˆì´ë“œ 하거나 ë•Œ ë²„ì „ (iOS 5.1ì—ì—ì„œ 명백한) 당 ì‘ìš© 프로그램 ì—…ê·¸ë ˆì´ë“œë„ 하 ê³ . `uuid`ì€ ì‹ ë¢°í• ìˆ˜ 있는 ê°’ì´ ì•„ë‹™ë‹ˆë‹¤.
-
-### Windows Phone 7, 8 특수
-
-`uuid`Windows Phone 7 í•„ìš” 허가 `ID_CAP_IDENTITY_DEVICE` . Microsoft는 ê³§ì´ ì†ì„±ì„ 세ì›ë‹ˆë‹¤ ê°€ëŠ¥ì„±ì´ ê²ƒìž…ë‹ˆë‹¤. ê¸°ëŠ¥ì„ ì‚¬ìš©í• ìˆ˜ 없는 경우 ì‘ìš© 프로그램 ìž¥ì¹˜ì— ì‘ìš© í”„ë¡œê·¸ëž¨ì˜ ì„¤ì¹˜ 하는 ë™ì•ˆ ìœ ì§€ 하는 ì˜êµ¬ guid를 ìƒì„± 합니다.
-
-## device.version
-
-ìš´ì˜ ì²´ì œ ë²„ì „ì„ ì–»ì„.
-
- var string = device.version;
-
-
-### ì§€ì› ë˜ëŠ” 플랫í¼
-
-* 안 ë“œ ë¡œì´ë“œ 2.1 +
-* ë¸”ëž™ë² ë¦¬ 10
-* 브ë¼ìš°ì €
-* iOS
-* Tizen
-* Windows Phone 7ê³¼ 8
-* 윈ë„ìš° 8
-
-### ë¹ ë¥¸ ì˜ˆì œ
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
diff --git a/plugins/cordova-plugin-device/doc/pl/README.md b/plugins/cordova-plugin-device/doc/pl/README.md
deleted file mode 100644
index c38832d..0000000
--- a/plugins/cordova-plugin-device/doc/pl/README.md
+++ /dev/null
@@ -1,214 +0,0 @@
-
-
-# cordova-plugin-device
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device)
-
-Ten plugin określa globalne `device` obiekt, który opisuje urządzenia sprzętowe i programowe. Mimo, że obiekt jest w globalnym zasięgu, nie jest dostępne dopiero po `deviceready` zdarzenie.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## Instalacja
-
- cordova plugin add cordova-plugin-device
-
-
-## Właściwości
-
- * device.cordova
- * device.model
- * device.platform
- * device.uuid
- * device.version
-
-## device.cordova
-
-Pobierz wersję Cordova działa na urządzeniu.
-
-### Obsługiwane platformy
-
- * Amazon Fire OS
- * Android
- * BlackBerry 10
- * PrzeglÄ…darka
- * Firefox OS
- * iOS
- * Tizen
- * Windows Phone 7 i 8
- * Windows 8
-
-## device.model
-
-`device.model`Zwraca nazwę modelu lub produktu. Wartość jest zestaw przez producenta urządzenia i mogą się różnić między wersjami tego samego produktu.
-
-### Obsługiwane platformy
-
- * Android
- * BlackBerry 10
- * PrzeglÄ…darka
- * iOS
- * Tizen
- * Windows Phone 7 i 8
- * Windows 8
-
-### Szybki przykład
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Zobacz http://theiphonewiki.com/wiki/index.php?title=Models / / modelu var = device.model;
-
-
-### Dziwactwa Androida
-
- * Pobiera [nazwę produktu](http://developer.android.com/reference/android/os/Build.html#PRODUCT) zamiast [nazwy modelu](http://developer.android.com/reference/android/os/Build.html#MODEL), który często jest nazwą kod produkcji. Na przykład, Nexus One zwraca `Passion` , i zwraca Motorola Droid`voles`.
-
-### Dziwactwa Tizen
-
- * Zwraca modelu urządzenia przypisane przez dostawcę, na przykład,`TIZEN`
-
-### Windows Phone 7 i 8 dziwactwa
-
- * Zwraca modelu urządzenia, określonej przez producenta. Na przykład Samsung ostrości zwraca`SGH-i917`.
-
-## device.platform
-
-Uzyskać nazwę systemu operacyjnego urządzenia.
-
- var string = device.platform;
-
-
-### Obsługiwane platformy
-
- * Android
- * BlackBerry 10
- * Browser4
- * Firefox OS
- * iOS
- * Tizen
- * Windows Phone 7 i 8
- * Windows 8
-
-### Szybki przykład
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Dziwactwa Windows Phone 7
-
-UrzÄ…dzenia Windows Phone 7 raport platformy jako`WinCE`.
-
-### Windows Phone 8 dziwactwa
-
-UrzÄ…dzenia Windows Phone 8 raport platformy jako`Win32NT`.
-
-## device.uuid
-
-SiÄ™ urzÄ…dzenia uniwersalnie unikatowy identyfikator ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
-
- var string = device.uuid;
-
-
-### Opis
-
-Szczegóły jak UUID jest generowane są określane przez producenta urządzenia i są specyficzne dla platformy lub modelu urządzenia.
-
-### Obsługiwane platformy
-
- * Android
- * BlackBerry 10
- * iOS
- * Tizen
- * Windows Phone 7 i 8
- * Windows 8
-
-### Szybki przykład
-
- // Android: Returns a random 64-bit integer (as a string, again!)
- // The integer is generated on the device's first boot
- //
- // BlackBerry: Returns the PIN number of the device
- // This is a nine-digit unique integer (as a string, though!)
- //
- // iPhone: (Paraphrased from the UIDevice Class documentation)
- // Returns a string of hash values created from multiple hardware identifies.
- // It is guaranteed to be unique for every device and can't be tied
- // to the user account.
- // Windows Phone 7 : Returns a hash of device+current user,
- // if the user is not defined, a guid is generated and will persist until the app is uninstalled
- // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number
- // unique to every GSM and UMTS mobile phone.
- var deviceID = device.uuid;
-
-
-### iOS dziwactwo
-
-`uuid`Na iOS nie jest przypisany do urządzenia, ale różni się dla każdej aplikacji, dla każdej instalacji. Zmienia się jeśli możesz usunąć i ponownie zainstalować aplikację, a ewentualnie także po aktualizacji iOS czy nawet uaktualnienia aplikacji dla wersji (widoczny w iOS 5.1). `uuid`Jest nie wiarygodne wartości.
-
-### Windows Phone 7 i 8 dziwactwa
-
-`uuid`Dla Windows Phone 7 wymaga uprawnień `ID_CAP_IDENTITY_DEVICE` . Microsoft będzie prawdopodobnie potępiać ten wkrótce. Jeśli funkcja nie jest dostępna, aplikacja generuje trwałe identyfikator guid, który jest utrzymywany przez czas trwania instalacji aplikacji na urządzeniu.
-
-## device.version
-
-Pobierz wersjÄ™ systemu operacyjnego.
-
- var string = device.version;
-
-
-### Obsługiwane platformy
-
- * Android 2.1 +
- * BlackBerry 10
- * PrzeglÄ…darka
- * iOS
- * Tizen
- * Windows Phone 7 i 8
- * Windows 8
-
-### Szybki przykład
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
\ No newline at end of file
diff --git a/plugins/cordova-plugin-device/doc/pl/index.md b/plugins/cordova-plugin-device/doc/pl/index.md
deleted file mode 100644
index acc8f9c..0000000
--- a/plugins/cordova-plugin-device/doc/pl/index.md
+++ /dev/null
@@ -1,206 +0,0 @@
-
-
-# cordova-plugin-device
-
-Ten plugin określa globalne `device` obiekt, który opisuje urządzenia sprzętowe i programowe. Mimo, że obiekt jest w globalnym zasięgu, nie jest dostępne dopiero po `deviceready` zdarzenie.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## Instalacja
-
- cordova plugin add cordova-plugin-device
-
-
-## Właściwości
-
-* device.cordova
-* device.model
-* device.platform
-* device.uuid
-* device.version
-
-## device.cordova
-
-Pobierz wersję Cordova działa na urządzeniu.
-
-### Obsługiwane platformy
-
-* Amazon Fire OS
-* Android
-* BlackBerry 10
-* PrzeglÄ…darka
-* Firefox OS
-* iOS
-* Tizen
-* Windows Phone 7 i 8
-* Windows 8
-
-## device.model
-
-`device.model`Zwraca nazwę modelu lub produktu. Wartość jest zestaw przez producenta urządzenia i mogą się różnić między wersjami tego samego produktu.
-
-### Obsługiwane platformy
-
-* Android
-* BlackBerry 10
-* PrzeglÄ…darka
-* iOS
-* Tizen
-* Windows Phone 7 i 8
-* Windows 8
-
-### Szybki przykład
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Zobacz http://theiphonewiki.com/wiki/index.php?title=Models / / modelu var = device.model;
-
-
-### Dziwactwa Androida
-
-* Pobiera [nazwę produktu][1] zamiast [nazwy modelu][2], który często jest nazwą kod produkcji. Na przykład, Nexus One zwraca `Passion` , i zwraca Motorola Droid`voles`.
-
- [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
- [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
-
-### Dziwactwa Tizen
-
-* Zwraca modelu urządzenia przypisane przez dostawcę, na przykład,`TIZEN`
-
-### Windows Phone 7 i 8 dziwactwa
-
-* Zwraca modelu urządzenia, określonej przez producenta. Na przykład Samsung ostrości zwraca`SGH-i917`.
-
-## device.platform
-
-Uzyskać nazwę systemu operacyjnego urządzenia.
-
- var string = device.platform;
-
-
-### Obsługiwane platformy
-
-* Android
-* BlackBerry 10
-* Browser4
-* Firefox OS
-* iOS
-* Tizen
-* Windows Phone 7 i 8
-* Windows 8
-
-### Szybki przykład
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Dziwactwa Windows Phone 7
-
-UrzÄ…dzenia Windows Phone 7 raport platformy jako`WinCE`.
-
-### Windows Phone 8 dziwactwa
-
-UrzÄ…dzenia Windows Phone 8 raport platformy jako`Win32NT`.
-
-## device.uuid
-
-SiÄ™ urzÄ…dzenia uniwersalnie unikatowy identyfikator ([UUID][3]).
-
- [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
-
- var string = device.uuid;
-
-
-### Opis
-
-Szczegóły jak UUID jest generowane są określane przez producenta urządzenia i są specyficzne dla platformy lub modelu urządzenia.
-
-### Obsługiwane platformy
-
-* Android
-* BlackBerry 10
-* iOS
-* Tizen
-* Windows Phone 7 i 8
-* Windows 8
-
-### Szybki przykład
-
- / / Android: zwraca losowe 64-bitowa liczba całkowita (jako ciąg, znowu!) / / liczba całkowita jest generowany na pierwszego uruchomienia urządzenia / / / / BlackBerry: zwraca numer PIN urządzenia / / to jest unikatową liczbą całkowitą dziewięciu cyfr (jako ciąg, choć!) / / / / iPhone: (zacytowana w dokumentacji klasy UIDevice) / / zwraca ciąg wartości mieszania utworzone z wielu sprzętu identyfikuje.
- Zapewniona jest unikatowy dla każdego urządzenia i nie może być związane z / do konta użytkownika.
- / / Windows Phone 7: zwraca wartość mieszania urządzenia + bieżący użytkownik, / / jeśli nie zdefiniowane przez użytkownika, identyfikator guid jest generowany i będzie trwać do czasu odinstalowania aplikacji / / Tizen: zwraca urządzenia IMEI (International Mobile Equipment Identity lub IMEI jest liczbą / / unikatowe dla każdego telefonu komórkowego GSM i UMTS.
- var deviceID = device.uuid;
-
-
-### iOS dziwactwo
-
-`uuid`Na iOS nie jest przypisany do urządzenia, ale różni się dla każdej aplikacji, dla każdej instalacji. Zmienia się jeśli możesz usunąć i ponownie zainstalować aplikację, a ewentualnie także po aktualizacji iOS czy nawet uaktualnienia aplikacji dla wersji (widoczny w iOS 5.1). `uuid`Jest nie wiarygodne wartości.
-
-### Windows Phone 7 i 8 dziwactwa
-
-`uuid`Dla Windows Phone 7 wymaga uprawnień `ID_CAP_IDENTITY_DEVICE` . Microsoft będzie prawdopodobnie potępiać ten wkrótce. Jeśli funkcja nie jest dostępna, aplikacja generuje trwałe identyfikator guid, który jest utrzymywany przez czas trwania instalacji aplikacji na urządzeniu.
-
-## device.version
-
-Pobierz wersjÄ™ systemu operacyjnego.
-
- var string = device.version;
-
-
-### Obsługiwane platformy
-
-* Android 2.1 +
-* BlackBerry 10
-* PrzeglÄ…darka
-* iOS
-* Tizen
-* Windows Phone 7 i 8
-* Windows 8
-
-### Szybki przykład
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
diff --git a/plugins/cordova-plugin-device/doc/ru/index.md b/plugins/cordova-plugin-device/doc/ru/index.md
deleted file mode 100644
index 263b1cd..0000000
--- a/plugins/cordova-plugin-device/doc/ru/index.md
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-# cordova-plugin-device
-
-Ðтот плагин определÑет глобальный объект `device`, который опиÑывает оборудование и программное обеÑпечение уÑтройÑтва. ÐеÑÐ¼Ð¾Ñ‚Ñ€Ñ Ð½Ð° то что объект в глобальной облаÑти видимоÑти, он не доÑтупен до того момента пока не произойдет Ñобытие `deviceready`.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## УÑтановка
-
- cordova plugin add cordova-plugin-device
-
-
-## Параметры
-
-* device.cordova
-* device.model
-* device.platform
-* device.uuid
-* device.version
-
-## device.cordova
-
-Возвращает верÑию Cordova, работающую на уÑтройÑтве.
-
-### Поддерживаемые платформы
-
-* Amazon Fire OS
-* Android
-* BlackBerry 10
-* Обозреватель
-* Firefox OS
-* iOS
-* Tizen
-* Windows Phone 7 и 8
-* Windows 8
-
-## device.model
-
-СвойÑтво `device.model` возвращает Ð¸Ð¼Ñ ÑƒÑтройÑтва модели или продукта. Значение уÑтанавливаетÑÑ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´Ð¸Ñ‚ÐµÐ»ÐµÐ¼ уÑтройÑтва и могут отличатьÑÑ Ð² разных верÑиÑÑ… одного и того же продукта.
-
-### Поддерживаемые платформы
-
-* Android
-* BlackBerry 10
-* Обозреватель
-* iOS
-* Tizen
-* Windows Phone 7 и 8
-* Windows 8
-
-### Краткий пример
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
- //
- var model = device.model;
-
-
-### ОÑобенноÑти Android
-
-* Возвращает [Ð¸Ð¼Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð°][1] , а не [Ð¸Ð¼Ñ Ð¼Ð¾Ð´ÐµÐ»Ð¸][2], которое чаÑто ÑвлÑетÑÑ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´Ñтвенным кодом. Ðапример, Nexus One из них возвращает `Passion` , и Motorola Droid возвращает `voles`.
-
- [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
- [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
-
-### ОÑобенноÑти Tizen
-
-* Возвращает модель уÑтройÑтва, назначенного вендором, например,`TIZEN`
-
-### ОÑобенноÑти Windows Phone 7 и 8
-
-* Возвращает модель уÑтройÑтва, указанной заводом-изготовителем. Ðапример Samsung Focus возвращает `SGH-i917`.
-
-## device.platform
-
-Получите Ð¸Ð¼Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð¾Ð¹ ÑиÑтемы уÑтройÑтва.
-
- var string = device.platform;
-
-
-### Поддерживаемые платформы
-
-* Android
-* BlackBerry 10
-* Браузером4
-* Firefox OS
-* iOS
-* Tizen
-* Windows Phone 7 и 8
-* Windows 8
-
-### Краткий пример
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### ОÑобенноÑти Windows Phone 7
-
-Windows Phone 7 уÑтройÑтва Ñообщают платформу как `WinCE`.
-
-### ОÑобенноÑти Windows Phone 8
-
-УÑтройÑтва Windows Phone 8 Ñообщают платформу как `Win32NT`.
-
-## device.uuid
-
-Возвращает универÑальный уникального идентификатора ([UUID][3] уÑтройÑтва).
-
- [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
-
- var string = device.uuid;
-
-
-### ОпиÑание
-
-ÐŸÐ¾Ð´Ñ€Ð¾Ð±Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ том как UUID генерируетÑÑ, определÑÑŽÑ‚ÑÑ Ð¸Ð·Ð³Ð¾Ñ‚Ð¾Ð²Ð¸Ñ‚ÐµÐ»ÐµÐ¼ уÑтройÑтва и ÑвлÑÑŽÑ‚ÑÑ ÑпецифичеÑкими Ð´Ð»Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ñ‹ или модели уÑтройÑтва.
-
-### Поддерживаемые платформы
-
-* Android
-* BlackBerry 10
-* iOS
-* Tizen
-* Windows Phone 7 и 8
-* Windows 8
-
-### Краткий пример
-
- // Android: Возвращает Ñлучайное 64-разрÑдное целое чиÑло (в виде Ñтроки, опÑÑ‚ÑŒ!)
- // целое чиÑло генерируетÑÑ Ð¿Ñ€Ð¸ первой загрузке уÑтройÑтва
- //
- // BlackBerry: Возвращает номер PIN уÑтройÑтва
- // Ñто 9 значный уникальный целочиÑленный (как Ñтрока, хотÑ!)
- //
- // iPhone: (Перефразировано из документации клаÑÑа UIDevice)
- // возвращает Ñтроку Ñ…Ñш-значениÑ, Ñозданные из неÑкольких аппаратных определÑет.
- // Ðто значение гарантированно ÑвлÑетÑÑ ÑƒÐ½Ð¸ÐºÐ°Ð»ÑŒÐ½Ñ‹Ð¼ Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ уÑтройÑтва и не может быть привÑзано
- // к учетной запиÑи пользователÑ.
- // Windows Phone 7: Возвращает Ñ…Ñш уÑтройÑтво + текущего пользователÑ,
- // еÑли пользователь не определен, формируетÑÑ guid который и будет ÑохранÑÑ‚ÑŒÑÑ Ð´Ð¾ тех пор, пока приложение не удалитьÑÑ
- // Tizen: возвращает IMEI уÑтройÑтва (Международный идентификатор мобильного Ð¾Ð±Ð¾Ñ€ÑƒÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¸Ð»Ð¸ IMEI Ñто чиÑло
- // уникальное Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ мобильного телефона GSM и UMTS.
- var deviceID = device.uuid;
-
-
-### ОÑобенноÑти iOS
-
-Ðа iOS `uuid` не ÑвлÑетÑÑ ÑƒÐ½Ð¸ÐºÐ°Ð»ÑŒÐ½Ñ‹Ð¼ Ð´Ð»Ñ ÑƒÑтройÑтва, но варьируетÑÑ Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ приложениÑ, и Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ уÑтановки. Значение менÑетÑÑ, еÑли удалить и повторно уÑтановить приложение, и возможно также когда вы обновите iOS, или даже обновить приложение до Ñледующей верÑии (очевидно в iOS 5.1). Значение `uuid` не ÑвлÑетÑÑ Ð½Ð°Ð´ÐµÐ¶Ð½Ñ‹Ð¼.
-
-### ОÑобенноÑти Windows Phone 7 и 8
-
-Ð”Ð»Ñ Windows Phone 7 `uuid` требует Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ `ID_CAP_IDENTITY_DEVICE` . Microsoft Ñкорее вÑего Ñкоро Ñделает Ñто ÑвойÑтво уÑтаревшим. ЕÑли возможноÑÑ‚ÑŒ недоÑтупна, приложение Ñоздает поÑтоÑнные guid, который ÑохранÑетÑÑ Ð½Ð° вÑе Ð²Ñ€ÐµÐ¼Ñ ÑƒÑтановки Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð½Ð° уÑтройÑтве.
-
-## device.version
-
-Возвращает верÑию операционной ÑиÑтемы.
-
- var string = device.version;
-
-
-### Поддерживаемые платформы
-
-* Android 2.1 +
-* BlackBerry 10
-* Обозреватель
-* iOS
-* Tizen
-* Windows Phone 7 и 8
-* Windows 8
-
-### Краткий пример
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
diff --git a/plugins/cordova-plugin-device/doc/zh/README.md b/plugins/cordova-plugin-device/doc/zh/README.md
deleted file mode 100644
index 9a18a55..0000000
--- a/plugins/cordova-plugin-device/doc/zh/README.md
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-# cordova-plugin-device
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device)
-
-這個外掛程å¼å®šç¾©å…¨çƒ `device` 物件,æ述該è¨å‚™çš„硬體和軟體。 雖然物件是在全çƒç¯„åœå…§ï¼Œä½†ä¸æ˜¯å¯ç”¨ï¼Œç›´åˆ°å¾Œ `deviceready` 事件。
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## 安è£
-
- cordova plugin add cordova-plugin-device
-
-
-## 屬性
-
- * device.cordova
- * device.model
- * device.platform
- * device.uuid
- * device.version
-
-## device.cordova
-
-ç²å–科爾多瓦在è¨å‚™ä¸Šé‹è¡Œçš„版本。
-
-### 支æ´çš„平臺
-
- * 亞馬éœç« OS
- * Android 系統
- * 黑莓 10
- * ç€è¦½å™¨
- * ç«ç‹ç€è¦½å™¨ä½œæ¥ç³»çµ±
- * iOS
- * Tizen
- * Windows Phone 7 和 8
- * Windows 8
-
-## device.model
-
-`device.model`返回è¨å‚™çš„模型或產å“çš„å稱。值由è¨å‚™è£½é€ 商è¨ç½®å’ŒåŒä¸€ç”¢å“çš„ä¸åŒç‰ˆæœ¬å¯èƒ½ä¸åŒã€‚
-
-### 支æ´çš„平臺
-
- * Android 系統
- * 黑莓 10
- * ç€è¦½å™¨
- * iOS
- * Tizen
- * Windows Phone 7 和 8
- * Windows 8
-
-### 快速的示例
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. è«‹åƒé–± HTTP://theiphonewiki.com/wiki/index.php?title=Models / / var 模型 = device.model ï¼›
-
-
-### Android 的怪癖
-
- * ç²å–[產å“å稱](http://developer.android.com/reference/android/os/Build.html#PRODUCT)而ä¸æ˜¯[產å“型號å稱](http://developer.android.com/reference/android/os/Build.html#MODEL),這往往是生產代碼å稱。 例如,Nexus One 返回 `Passion` ,和摩托羅拉 Droid 返回`voles`.
-
-### Tizen 怪癖
-
- * 例如,返回與供應商指派的è¨å‚™æ¨¡åž‹`TIZEN`
-
-### Windows Phone 7 和 8 怪癖
-
- * è¿”å›žç”±è£½é€ å•†æŒ‡å®šçš„è¨å‚™æ¨¡åž‹ã€‚例如,三星焦點返回`SGH-i917`.
-
-## device.platform
-
-ç²å–è¨å‚™çš„作æ¥ç³»çµ±å稱。
-
- var string = device.platform;
-
-
-### 支æ´çš„平臺
-
- * Android 系統
- * 黑莓 10
- * Browser4
- * ç«ç‹ç€è¦½å™¨ä½œæ¥ç³»çµ±
- * iOS
- * Tizen
- * Windows Phone 7 和 8
- * Windows 8
-
-### 快速的示例
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 的怪癖
-
-Windows Phone 7 è¨å‚™å ±å‘Šä½œç‚ºå¹³è‡º`WinCE`.
-
-### Windows Phone 8 怪癖
-
-Windows Phone 8 è¨å‚™å ±å‘Šä½œç‚ºå¹³è‡º`Win32NT`.
-
-## device.uuid
-
-ç²å–è¨å‚™çš„通用唯一è˜åˆ¥ç¢¼ ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
-
- var string = device.uuid;
-
-
-### 說明
-
-如何生æˆä¸€å€‹ UUID 的細節由è¨å‚™è£½é€ 商和特定于è¨å‚™çš„平臺或模型。
-
-### 支æ´çš„平臺
-
- * Android 系統
- * 黑莓 10
- * iOS
- * Tizen
- * Windows Phone 7 和 8
- * Windows 8
-
-### 快速的示例
-
- / / Android: 一個隨機的 64 ä½æ•´æ•¸ (作為å—串返回,å†æ¬¡!) / / 上è¨å‚™çš„第一次啟動生æˆçš„整數 / / / / 黑莓手機: 返回è¨å‚™çš„ PIN 號碼 / / 這是ä¹å€‹æ•¸å—的唯一整數 (作為å—串,雖然!) / / / / iPhone: (從 UIDevice 類文檔解釋) / / 返回一個å—串的雜湊值創建的多個硬體標è˜ã€‚
- / / 它ä¿è‰æ˜¯å”¯ä¸€çš„æ¯å€‹è¨å‚™ä¸¦ä¸èƒ½ç¶ / / 到使用者帳戶。
- / / Windows Phone 7: 返回的雜湊代碼的è¨å‚™ + 當å‰ä½¿ç”¨è€…,/ / 如果未定義使用者,則一個 guid 生æˆçš„並且將會ä¿ç•™ç›´åˆ°å¸è¼‰è©²æ‡‰ç”¨ç¨‹å¼ / / Tizen: 返回è¨å‚™ IMEI (國際行動è£ç½®èº«ä»½æˆ– IMEI æ˜¯ä¸€å€‹æ•¸ä½ / / ç¨æœ‰çš„æ¯ä¸€å€‹ UMTS å’Œ GSM 行動電話。
- var deviceID = device.uuid;
-
-
-### iOS 怪癖
-
-`uuid`在 iOS ä¸æ˜¯å”¯ä¸€çš„一種è£ç½®ï¼Œä½†å°æ–¼æ¯å€‹æ‡‰ç”¨ç¨‹å¼ï¼Œç‚ºæ¯å€‹å®‰è£è€Œç•°ã€‚ 如果您刪除並é‡æ–°å®‰è£è©²æ‡‰ç”¨ç¨‹å¼ï¼Œå®ƒæ›´æ”¹å’Œå¯èƒ½é‚„ç•¶ä½ å‡ç´š iOS,或甚至å‡ç´šæ¯å€‹ç‰ˆæœ¬ (iOS 5.1 ä¸å˜åœ¨æ˜Žé¡¯çš„) 的應用程å¼ã€‚ `uuid`ä¸æ˜¯ä¸€å€‹å¯é 的值。
-
-### Windows Phone 7 和 8 怪癖
-
-`uuid`為 Windows Phone 7 é ˆç¶“è¨±å¯ `ID_CAP_IDENTITY_DEVICE` 。 Microsoft å¯èƒ½æœƒå¾ˆå¿«æ£„用æ¤å±¬æ€§ã€‚ 如果沒有å¯ç”¨çš„能力,應用程å¼å°‡ç”Ÿæˆè¨å‚™ä¸Šæ‡‰ç”¨ç¨‹å¼çš„安è£éŽç¨‹ä¸ä¿æŒæŒçºŒçš„ guid。
-
-## device.version
-
-ç²å–作æ¥ç³»çµ±ç‰ˆæœ¬ã€‚
-
- var string = device.version;
-
-
-### 支æ´çš„平臺
-
- * Android 2.1 +
- * 黑莓 10
- * ç€è¦½å™¨
- * iOS
- * Tizen
- * Windows Phone 7 和 8
- * Windows 8
-
-### 快速的示例
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
\ No newline at end of file
diff --git a/plugins/cordova-plugin-device/doc/zh/index.md b/plugins/cordova-plugin-device/doc/zh/index.md
deleted file mode 100644
index 5626d69..0000000
--- a/plugins/cordova-plugin-device/doc/zh/index.md
+++ /dev/null
@@ -1,206 +0,0 @@
-
-
-# cordova-plugin-device
-
-這個外掛程å¼å®šç¾©å…¨çƒ `device` 物件,æ述該è¨å‚™çš„硬體和軟體。 雖然物件是在全çƒç¯„åœå…§ï¼Œä½†ä¸æ˜¯å¯ç”¨ï¼Œç›´åˆ°å¾Œ `deviceready` 事件。
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(device.cordova);
- }
-
-
-## 安è£
-
- cordova plugin add cordova-plugin-device
-
-
-## 屬性
-
-* device.cordova
-* device.model
-* device.platform
-* device.uuid
-* device.version
-
-## device.cordova
-
-ç²å–科爾多瓦在è¨å‚™ä¸Šé‹è¡Œçš„版本。
-
-### 支æ´çš„平臺
-
-* 亞馬éœç« OS
-* Android 系統
-* 黑莓 10
-* ç€è¦½å™¨
-* ç«ç‹ç€è¦½å™¨çš„作æ¥ç³»çµ±
-* iOS
-* æ³°
-* Windows Phone 7 和 8
-* Windows 8
-
-## device.model
-
-`device.model`返回è¨å‚™çš„模型或產å“çš„å稱。值由è¨å‚™è£½é€ 商è¨ç½®å’ŒåŒä¸€ç”¢å“çš„ä¸åŒç‰ˆæœ¬å¯èƒ½ä¸åŒã€‚
-
-### 支æ´çš„平臺
-
-* Android 系統
-* 黑莓 10
-* ç€è¦½å™¨
-* iOS
-* æ³°
-* Windows Phone 7 和 8
-* Windows 8
-
-### 快速的示例
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // Browser: Google Chrome returns "Chrome"
- // Safari returns "Safari"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. è«‹åƒé–± HTTP://theiphonewiki.com/wiki/index.php?title=Models / / var 模型 = device.model ï¼›
-
-
-### Android 的怪癖
-
-* ç²å–[產å“å稱][1]而ä¸æ˜¯[產å“型號å稱][2],這往往是生產代碼å稱。 例如,Nexus One 返回 `Passion` ,和摩托羅拉 Droid 返回`voles`.
-
- [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
- [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
-
-### Tizen 怪癖
-
-* 例如,返回與供應商指派的è¨å‚™æ¨¡åž‹`TIZEN`
-
-### Windows Phone 7 和 8 怪癖
-
-* è¿”å›žç”±è£½é€ å•†æŒ‡å®šçš„è¨å‚™æ¨¡åž‹ã€‚例如,三星焦點返回`SGH-i917`.
-
-## device.platform
-
-ç²å–è¨å‚™çš„作æ¥ç³»çµ±å稱。
-
- var string = device.platform;
-
-
-### 支æ´çš„平臺
-
-* Android 系統
-* 黑莓 10
-* Browser4
-* ç«ç‹ç€è¦½å™¨çš„作æ¥ç³»çµ±
-* iOS
-* æ³°
-* Windows Phone 7 和 8
-* Windows 8
-
-### 快速的示例
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry 10"
- // - Browser: returns "MacIntel" on Mac
- // returns "Win32" on Windows
- // - "iOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-
-### Windows Phone 7 的怪癖
-
-Windows Phone 7 è¨å‚™å ±å‘Šä½œç‚ºå¹³è‡º`WinCE`.
-
-### Windows Phone 8 怪癖
-
-Windows Phone 8 è¨å‚™å ±å‘Šä½œç‚ºå¹³è‡º`Win32NT`.
-
-## device.uuid
-
-ç²å–è¨å‚™çš„通用唯一è˜åˆ¥ç¢¼ ([UUID][3]).
-
- [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
-
- var string = device.uuid;
-
-
-### 說明
-
-如何生æˆä¸€å€‹ UUID 的細節由è¨å‚™è£½é€ 商和特定于è¨å‚™çš„平臺或模型。
-
-### 支æ´çš„平臺
-
-* Android 系統
-* 黑莓 10
-* iOS
-* Tizen
-* Windows Phone 7 和 8
-* Windows 8
-
-### 快速的示例
-
- / / Android: 一個隨機的 64 ä½æ•´æ•¸ (作為å—串返回,å†æ¬¡!) / / 上è¨å‚™çš„第一次啟動生æˆçš„整數 / / / / 黑莓手機: 返回è¨å‚™çš„ PIN 號碼 / / 這是ä¹å€‹æ•¸å—的唯一整數 (作為å—串,雖然!) / / / / iPhone: (從 UIDevice 類文檔解釋) / / 返回一個å—串的雜湊值創建的多個硬體標è˜ã€‚
- / / 它ä¿è‰æ˜¯å”¯ä¸€çš„æ¯å€‹è¨å‚™ä¸¦ä¸èƒ½ç¶ / / 到使用者帳戶。
- / / Windows Phone 7: 返回的雜湊代碼的è¨å‚™ + 當å‰ä½¿ç”¨è€…,/ / 如果未定義使用者,則一個 guid 生æˆçš„並且將會ä¿ç•™ç›´åˆ°å¸è¼‰è©²æ‡‰ç”¨ç¨‹å¼ / / Tizen: 返回è¨å‚™ IMEI (國際行動è£ç½®èº«ä»½æˆ– IMEI æ˜¯ä¸€å€‹æ•¸ä½ / / ç¨æœ‰çš„æ¯ä¸€å€‹ UMTS å’Œ GSM 行動電話。
- var deviceID = device.uuid;
-
-
-### iOS 怪癖
-
-`uuid`在 iOS ä¸æ˜¯å”¯ä¸€çš„一種è£ç½®ï¼Œä½†å°æ–¼æ¯å€‹æ‡‰ç”¨ç¨‹å¼ï¼Œç‚ºæ¯å€‹å®‰è£è€Œç•°ã€‚ 如果您刪除並é‡æ–°å®‰è£è©²æ‡‰ç”¨ç¨‹å¼ï¼Œå®ƒæ›´æ”¹å’Œå¯èƒ½é‚„ç•¶ä½ å‡ç´š iOS,或甚至å‡ç´šæ¯å€‹ç‰ˆæœ¬ (iOS 5.1 ä¸å˜åœ¨æ˜Žé¡¯çš„) 的應用程å¼ã€‚ `uuid`ä¸æ˜¯ä¸€å€‹å¯é 的值。
-
-### Windows Phone 7 和 8 怪癖
-
-`uuid`為 Windows Phone 7 é ˆç¶“è¨±å¯ `ID_CAP_IDENTITY_DEVICE` 。 Microsoft å¯èƒ½æœƒå¾ˆå¿«æ£„用æ¤å±¬æ€§ã€‚ 如果沒有å¯ç”¨çš„能力,應用程å¼å°‡ç”Ÿæˆè¨å‚™ä¸Šæ‡‰ç”¨ç¨‹å¼çš„安è£éŽç¨‹ä¸ä¿æŒæŒçºŒçš„ guid。
-
-## device.version
-
-ç²å–作æ¥ç³»çµ±ç‰ˆæœ¬ã€‚
-
- var string = device.version;
-
-
-### 支æ´çš„平臺
-
-* Android 2.1 +
-* 黑莓 10
-* ç€è¦½å™¨
-* iOS
-* æ³°
-* Windows Phone 7 和 8
-* Windows 8
-
-### 快速的示例
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // Browser: Returns version number for the browser
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
diff --git a/plugins/cordova-plugin-device/package.json b/plugins/cordova-plugin-device/package.json
deleted file mode 100644
index 5c465ad..0000000
--- a/plugins/cordova-plugin-device/package.json
+++ /dev/null
@@ -1,84 +0,0 @@
-{
- "_from": "cordova-plugin-device@^2.0.2",
- "_id": "cordova-plugin-device@2.0.2",
- "_inBundle": false,
- "_integrity": "sha1-/Ajzci5n7ve2xnv8mag99q3Quro=",
- "_location": "/cordova-plugin-device",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "cordova-plugin-device@^2.0.2",
- "name": "cordova-plugin-device",
- "escapedName": "cordova-plugin-device",
- "rawSpec": "^2.0.2",
- "saveSpec": null,
- "fetchSpec": "^2.0.2"
- },
- "_requiredBy": [
- "#USER",
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/cordova-plugin-device/-/cordova-plugin-device-2.0.2.tgz",
- "_shasum": "fc08f3722e67eef7b6c67bfc99a83df6add0baba",
- "_spec": "cordova-plugin-device@^2.0.2",
- "_where": "/home/thrrgilag/workspace/cordova/Goober",
- "author": {
- "name": "Apache Software Foundation"
- },
- "bugs": {
- "url": "https://issues.apache.org/jira/browse/CB"
- },
- "bundleDependencies": false,
- "cordova": {
- "id": "cordova-plugin-device",
- "platforms": [
- "android",
- "ios",
- "windows",
- "browser",
- "osx"
- ]
- },
- "deprecated": false,
- "description": "Cordova Device Plugin",
- "devDependencies": {
- "eslint": "^3.19.0",
- "eslint-config-semistandard": "^11.0.0",
- "eslint-config-standard": "^10.2.1",
- "eslint-plugin-import": "^2.3.0",
- "eslint-plugin-node": "^5.0.0",
- "eslint-plugin-promise": "^3.5.0",
- "eslint-plugin-standard": "^3.0.1"
- },
- "engines": {
- "cordovaDependencies": {
- "3.0.0": {
- "cordova": ">100"
- }
- }
- },
- "homepage": "https://github.com/apache/cordova-plugin-device#readme",
- "keywords": [
- "cordova",
- "device",
- "ecosystem:cordova",
- "cordova-android",
- "cordova-ios",
- "cordova-windows",
- "cordova-browser",
- "cordova-osx"
- ],
- "license": "Apache-2.0",
- "name": "cordova-plugin-device",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/apache/cordova-plugin-device.git"
- },
- "scripts": {
- "eslint": "node node_modules/eslint/bin/eslint www && node node_modules/eslint/bin/eslint src && node node_modules/eslint/bin/eslint tests",
- "test": "npm run eslint"
- },
- "types": "./types/index.d.ts",
- "version": "2.0.2"
-}
diff --git a/plugins/cordova-plugin-device/plugin.xml b/plugins/cordova-plugin-device/plugin.xml
deleted file mode 100644
index 7f60024..0000000
--- a/plugins/cordova-plugin-device/plugin.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
- Device
- Cordova Device Plugin
- Apache 2.0
- cordova,device
- https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
- https://issues.apache.org/jira/browse/CB/component/12320648
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/cordova-plugin-device/src/android/Device.java b/plugins/cordova-plugin-device/src/android/Device.java
deleted file mode 100644
index e9efcb4..0000000
--- a/plugins/cordova-plugin-device/src/android/Device.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-package org.apache.cordova.device;
-
-import java.util.TimeZone;
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.CordovaInterface;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import android.provider.Settings;
-
-public class Device extends CordovaPlugin {
- public static final String TAG = "Device";
-
- public static String platform; // Device OS
- public static String uuid; // Device UUID
-
- private static final String ANDROID_PLATFORM = "Android";
- private static final String AMAZON_PLATFORM = "amazon-fireos";
- private static final String AMAZON_DEVICE = "Amazon";
-
- /**
- * Constructor.
- */
- public Device() {
- }
-
- /**
- * Sets the context of the Command. This can then be used to do things like
- * get file paths associated with the Activity.
- *
- * @param cordova The context of the main Activity.
- * @param webView The CordovaWebView Cordova is running in.
- */
- public void initialize(CordovaInterface cordova, CordovaWebView webView) {
- super.initialize(cordova, webView);
- Device.uuid = getUuid();
- }
-
- /**
- * Executes the request and returns PluginResult.
- *
- * @param action The action to execute.
- * @param args JSONArry of arguments for the plugin.
- * @param callbackContext The callback id used when calling back into JavaScript.
- * @return True if the action was valid, false if not.
- */
- public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
- if ("getDeviceInfo".equals(action)) {
- JSONObject r = new JSONObject();
- r.put("uuid", Device.uuid);
- r.put("version", this.getOSVersion());
- r.put("platform", this.getPlatform());
- r.put("model", this.getModel());
- r.put("manufacturer", this.getManufacturer());
- r.put("isVirtual", this.isVirtual());
- r.put("serial", this.getSerialNumber());
- callbackContext.success(r);
- }
- else {
- return false;
- }
- return true;
- }
-
- //--------------------------------------------------------------------------
- // LOCAL METHODS
- //--------------------------------------------------------------------------
-
- /**
- * Get the OS name.
- *
- * @return
- */
- public String getPlatform() {
- String platform;
- if (isAmazonDevice()) {
- platform = AMAZON_PLATFORM;
- } else {
- platform = ANDROID_PLATFORM;
- }
- return platform;
- }
-
- /**
- * Get the device's Universally Unique Identifier (UUID).
- *
- * @return
- */
- public String getUuid() {
- String uuid = Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
- return uuid;
- }
-
- public String getModel() {
- String model = android.os.Build.MODEL;
- return model;
- }
-
- public String getProductName() {
- String productname = android.os.Build.PRODUCT;
- return productname;
- }
-
- public String getManufacturer() {
- String manufacturer = android.os.Build.MANUFACTURER;
- return manufacturer;
- }
-
- public String getSerialNumber() {
- String serial = android.os.Build.SERIAL;
- return serial;
- }
-
- /**
- * Get the OS version.
- *
- * @return
- */
- public String getOSVersion() {
- String osversion = android.os.Build.VERSION.RELEASE;
- return osversion;
- }
-
- public String getSDKVersion() {
- @SuppressWarnings("deprecation")
- String sdkversion = android.os.Build.VERSION.SDK;
- return sdkversion;
- }
-
- public String getTimeZoneID() {
- TimeZone tz = TimeZone.getDefault();
- return (tz.getID());
- }
-
- /**
- * Function to check if the device is manufactured by Amazon
- *
- * @return
- */
- public boolean isAmazonDevice() {
- if (android.os.Build.MANUFACTURER.equals(AMAZON_DEVICE)) {
- return true;
- }
- return false;
- }
-
- public boolean isVirtual() {
- return android.os.Build.FINGERPRINT.contains("generic") ||
- android.os.Build.PRODUCT.contains("sdk");
- }
-
-}
diff --git a/plugins/cordova-plugin-device/src/browser/DeviceProxy.js b/plugins/cordova-plugin-device/src/browser/DeviceProxy.js
deleted file mode 100644
index 4dc80ec..0000000
--- a/plugins/cordova-plugin-device/src/browser/DeviceProxy.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-var browser = require('cordova/platform');
-
-function getPlatform () {
- return 'browser';
-}
-
-function getModel () {
- return getBrowserInfo(true);
-}
-
-function getVersion () {
- return getBrowserInfo(false);
-}
-
-function getBrowserInfo (getModel) {
- var userAgent = navigator.userAgent;
- var returnVal = '';
- var offset;
-
- if ((offset = userAgent.indexOf('Edge')) !== -1) {
- returnVal = (getModel) ? 'Edge' : userAgent.substring(offset + 5);
- } else if ((offset = userAgent.indexOf('Chrome')) !== -1) {
- returnVal = (getModel) ? 'Chrome' : userAgent.substring(offset + 7);
- } else if ((offset = userAgent.indexOf('Safari')) !== -1) {
- if (getModel) {
- returnVal = 'Safari';
- } else {
- returnVal = userAgent.substring(offset + 7);
-
- if ((offset = userAgent.indexOf('Version')) !== -1) {
- returnVal = userAgent.substring(offset + 8);
- }
- }
- } else if ((offset = userAgent.indexOf('Firefox')) !== -1) {
- returnVal = (getModel) ? 'Firefox' : userAgent.substring(offset + 8);
- } else if ((offset = userAgent.indexOf('MSIE')) !== -1) {
- returnVal = (getModel) ? 'MSIE' : userAgent.substring(offset + 5);
- } else if ((offset = userAgent.indexOf('Trident')) !== -1) {
- returnVal = (getModel) ? 'MSIE' : '11';
- }
-
- if ((offset = returnVal.indexOf(';')) !== -1 || (offset = returnVal.indexOf(' ')) !== -1) {
- returnVal = returnVal.substring(0, offset);
- }
-
- return returnVal;
-}
-
-module.exports = {
- getDeviceInfo: function (success, error) {
- setTimeout(function () {
- success({
- cordova: browser.cordovaVersion,
- platform: getPlatform(),
- model: getModel(),
- version: getVersion(),
- uuid: null,
- isVirtual: false
- });
- }, 0);
- }
-};
-
-require('cordova/exec/proxy').add('Device', module.exports);
diff --git a/plugins/cordova-plugin-device/src/ios/CDVDevice.h b/plugins/cordova-plugin-device/src/ios/CDVDevice.h
deleted file mode 100644
index a146d88..0000000
--- a/plugins/cordova-plugin-device/src/ios/CDVDevice.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import
-#import
-
-@interface CDVDevice : CDVPlugin
-{}
-
-+ (NSString*)cordovaVersion;
-
-- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command;
-
-@end
diff --git a/plugins/cordova-plugin-device/src/ios/CDVDevice.m b/plugins/cordova-plugin-device/src/ios/CDVDevice.m
deleted file mode 100644
index 4d75a57..0000000
--- a/plugins/cordova-plugin-device/src/ios/CDVDevice.m
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#include
-#include
-#include "TargetConditionals.h"
-
-#import
-#import "CDVDevice.h"
-
-@implementation UIDevice (ModelVersion)
-
-- (NSString*)modelVersion
-{
- size_t size;
-
- sysctlbyname("hw.machine", NULL, &size, NULL, 0);
- char* machine = malloc(size);
- sysctlbyname("hw.machine", machine, &size, NULL, 0);
- NSString* platform = [NSString stringWithUTF8String:machine];
- free(machine);
-
- return platform;
-}
-
-@end
-
-@interface CDVDevice () {}
-@end
-
-@implementation CDVDevice
-
-- (NSString*)uniqueAppInstanceIdentifier:(UIDevice*)device
-{
- NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
- static NSString* UUID_KEY = @"CDVUUID";
-
- // Check user defaults first to maintain backwards compaitibility with previous versions
- // which didn't user identifierForVendor
- NSString* app_uuid = [userDefaults stringForKey:UUID_KEY];
- if (app_uuid == nil) {
- if ([device respondsToSelector:@selector(identifierForVendor)]) {
- app_uuid = [[device identifierForVendor] UUIDString];
- } else {
- CFUUIDRef uuid = CFUUIDCreate(NULL);
- app_uuid = (__bridge_transfer NSString *)CFUUIDCreateString(NULL, uuid);
- CFRelease(uuid);
- }
-
- [userDefaults setObject:app_uuid forKey:UUID_KEY];
- [userDefaults synchronize];
- }
-
- return app_uuid;
-}
-
-- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command
-{
- NSDictionary* deviceProperties = [self deviceProperties];
- CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties];
-
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-- (NSDictionary*)deviceProperties
-{
- UIDevice* device = [UIDevice currentDevice];
-
- return @{
- @"manufacturer": @"Apple",
- @"model": [device modelVersion],
- @"platform": @"iOS",
- @"version": [device systemVersion],
- @"uuid": [self uniqueAppInstanceIdentifier:device],
- @"cordova": [[self class] cordovaVersion],
- @"isVirtual": @([self isVirtual])
- };
-}
-
-+ (NSString*)cordovaVersion
-{
- return CDV_VERSION;
-}
-
-- (BOOL)isVirtual
-{
- #if TARGET_OS_SIMULATOR
- return true;
- #elif TARGET_IPHONE_SIMULATOR
- return true;
- #else
- return false;
- #endif
-}
-
-@end
diff --git a/plugins/cordova-plugin-device/src/osx/CDVDevice.h b/plugins/cordova-plugin-device/src/osx/CDVDevice.h
deleted file mode 100644
index 9def254..0000000
--- a/plugins/cordova-plugin-device/src/osx/CDVDevice.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import
-
-@interface CDVDevice : CDVPlugin
-
-+ (NSString*) cordovaVersion;
-
-- (void) getDeviceInfo:(CDVInvokedUrlCommand*)command;
-
-@end
diff --git a/plugins/cordova-plugin-device/src/osx/CDVDevice.m b/plugins/cordova-plugin-device/src/osx/CDVDevice.m
deleted file mode 100644
index 3a63588..0000000
--- a/plugins/cordova-plugin-device/src/osx/CDVDevice.m
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#include
-
-#import "CDVDevice.h"
-
-#define SYSTEM_VERSION_PLIST @"/System/Library/CoreServices/SystemVersion.plist"
-
-@implementation CDVDevice
-
-- (NSString*) modelVersion {
- size_t size;
-
- sysctlbyname("hw.machine", NULL, &size, NULL, 0);
- char* machine = malloc(size);
- sysctlbyname("hw.machine", machine, &size, NULL, 0);
- NSString* modelVersion = [NSString stringWithUTF8String:machine];
- free(machine);
-
- return modelVersion;
-}
-
-
-- (NSString*) getSerialNr {
- NSString* serialNr;
- io_service_t platformExpert = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"));
- if (platformExpert) {
- CFTypeRef serialNumberAsCFString =
- IORegistryEntryCreateCFProperty(platformExpert,
- CFSTR(kIOPlatformSerialNumberKey),
- kCFAllocatorDefault, 0);
- if (serialNumberAsCFString) {
- serialNr = (__bridge NSString*) serialNumberAsCFString;
- }
- IOObjectRelease(platformExpert);
- }
- return serialNr;
-}
-
-- (NSString*) uniqueAppInstanceIdentifier {
- NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
- static NSString* UUID_KEY = @"CDVUUID";
-
- NSString* app_uuid = [userDefaults stringForKey:UUID_KEY];
-
- if (app_uuid == nil) {
- CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault);
- CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef);
-
- app_uuid = [NSString stringWithString:(__bridge NSString*) uuidString];
- [userDefaults setObject:app_uuid forKey:UUID_KEY];
- [userDefaults synchronize];
-
- CFRelease(uuidString);
- CFRelease(uuidRef);
- }
-
- return app_uuid;
-}
-
-- (NSString*) platform {
- return [NSDictionary dictionaryWithContentsOfFile:SYSTEM_VERSION_PLIST][@"ProductName"];
-}
-
-- (NSString*) systemVersion {
- return [NSDictionary dictionaryWithContentsOfFile:SYSTEM_VERSION_PLIST][@"ProductVersion"];
-}
-
-- (void) getDeviceInfo:(CDVInvokedUrlCommand*) command {
- NSDictionary* deviceProperties = [self deviceProperties];
- CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties];
-
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-- (NSDictionary*) deviceProperties {
- NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4];
-
- devProps[@"manufacturer"] = @"Apple";
- devProps[@"model"] = [self modelVersion];
- devProps[@"platform"] = [self platform];
- devProps[@"version"] = [self systemVersion];
- devProps[@"uuid"] = [self uniqueAppInstanceIdentifier];
- devProps[@"cordova"] = [[self class] cordovaVersion];
- devProps[@"serial"] = [self getSerialNr];
- devProps[@"isVirtual"] = @NO;
-
- NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps];
- return devReturn;
-}
-
-+ (NSString*) cordovaVersion {
- return CDV_VERSION;
-}
-
-@end
diff --git a/plugins/cordova-plugin-device/src/windows/DeviceProxy.js b/plugins/cordova-plugin-device/src/windows/DeviceProxy.js
deleted file mode 100644
index ccaaaee..0000000
--- a/plugins/cordova-plugin-device/src/windows/DeviceProxy.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-/* global Windows, createUUID */
-
-var ROOT_CONTAINER = '{00000000-0000-0000-FFFF-FFFFFFFFFFFF}';
-var DEVICE_CLASS_KEY = '{A45C254E-DF1C-4EFD-8020-67D146A850E0},10';
-var DEVICE_CLASS_KEY_NO_SEMICOLON = '{A45C254E-DF1C-4EFD-8020-67D146A850E0}10';
-var ROOT_CONTAINER_QUERY = 'System.Devices.ContainerId:="' + ROOT_CONTAINER + '"';
-var HAL_DEVICE_CLASS = '4d36e966-e325-11ce-bfc1-08002be10318';
-var DEVICE_DRIVER_VERSION_KEY = '{A8B865DD-2E3D-4094-AD97-E593A70C75D6},3';
-
-module.exports = {
-
- getDeviceInfo: function (win, fail, args) {
-
- // deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId
- var deviceId;
- // get deviceId, or create and store one
- var localSettings = Windows.Storage.ApplicationData.current.localSettings;
- if (localSettings.values.deviceId) {
- deviceId = localSettings.values.deviceId;
- } else {
- // App-specific hardware id could be used as uuid, but it changes if the hardware changes...
- try {
- var ASHWID = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null).id;
- deviceId = Windows.Storage.Streams.DataReader.fromBuffer(ASHWID).readGuid();
- } catch (e) {
- // Couldn't get the hardware UUID
- deviceId = createUUID();
- }
- // ...so cache it per-install
- localSettings.values.deviceId = deviceId;
- }
-
- var userAgent = window.clientInformation.userAgent;
- // this will report "windows" in windows8.1 and windows phone 8.1 apps
- // and "windows8" in windows 8.0 apps similar to cordova.js
- // See https://github.com/apache/cordova-js/blob/master/src/windows/platform.js#L25
- var devicePlatform = userAgent.indexOf('MSAppHost/1.0') === -1 ? 'windows' : 'windows8';
- var versionString = userAgent.match(/Windows (?:Phone |NT )?([0-9.]+)/)[1];
-
- var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
- // Running in the Windows Simulator is a remote session.
- // Running in the Windows Phone Emulator has the systemProductName set to "Virtual"
- var isVirtual = Windows.System.RemoteDesktop.InteractiveSession.isRemote || deviceInfo.systemProductName === 'Virtual';
- var manufacturer = deviceInfo.systemManufacturer;
- var model = deviceInfo.systemProductName;
-
- var Pnp = Windows.Devices.Enumeration.Pnp;
-
- Pnp.PnpObject.findAllAsync(Pnp.PnpObjectType.device,
- [DEVICE_DRIVER_VERSION_KEY, DEVICE_CLASS_KEY],
- ROOT_CONTAINER_QUERY)
- .then(function (rootDevices) {
- for (var i = 0; i < rootDevices.length; i++) {
- var rootDevice = rootDevices[i];
- if (!rootDevice.properties) continue;
- if (rootDevice.properties[DEVICE_CLASS_KEY_NO_SEMICOLON] === HAL_DEVICE_CLASS) {
- versionString = rootDevice.properties[DEVICE_DRIVER_VERSION_KEY];
- break;
- }
- }
-
- setTimeout(function () {
- win({ platform: devicePlatform,
- version: versionString,
- uuid: deviceId,
- isVirtual: isVirtual,
- model: model,
- manufacturer: manufacturer});
- }, 0);
- });
- }
-
-}; // exports
-
-require('cordova/exec/proxy').add('Device', module.exports);
diff --git a/plugins/cordova-plugin-device/tests/package.json b/plugins/cordova-plugin-device/tests/package.json
deleted file mode 100644
index 0fa9978..0000000
--- a/plugins/cordova-plugin-device/tests/package.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "cordova-plugin-device-tests",
- "version": "1.1.6-dev",
- "description": "",
- "cordova": {
- "id": "cordova-plugin-device-tests",
- "platforms": []
- },
- "keywords": [
- "ecosystem:cordova"
- ],
- "author": "",
- "license": "Apache 2.0"
-}
diff --git a/plugins/cordova-plugin-device/tests/plugin.xml b/plugins/cordova-plugin-device/tests/plugin.xml
deleted file mode 100644
index afb700b..0000000
--- a/plugins/cordova-plugin-device/tests/plugin.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- Cordova Device Plugin Tests
- Apache 2.0
-
-
-
-
diff --git a/plugins/cordova-plugin-device/tests/tests.js b/plugins/cordova-plugin-device/tests/tests.js
deleted file mode 100644
index 03e1fc7..0000000
--- a/plugins/cordova-plugin-device/tests/tests.js
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-/* eslint-env jasmine */
-
-exports.defineAutoTests = function () {
- describe('Device Information (window.device)', function () {
- it('should exist', function () {
- expect(window.device).toBeDefined();
- });
-
- it('should contain a platform specification that is a string', function () {
- expect(window.device.platform).toBeDefined();
- expect((String(window.device.platform)).length > 0).toBe(true);
- });
-
- it('should contain a version specification that is a string', function () {
- expect(window.device.version).toBeDefined();
- expect((String(window.device.version)).length > 0).toBe(true);
- });
-
- it('should contain a UUID specification that is a string or a number', function () {
- expect(window.device.uuid).toBeDefined();
- if (typeof window.device.uuid === 'string' || typeof window.device.uuid === 'object') {
- expect((String(window.device.uuid)).length > 0).toBe(true);
- } else {
- expect(window.device.uuid > 0).toBe(true);
- }
- });
-
- it('should contain a cordova specification that is a string', function () {
- expect(window.device.cordova).toBeDefined();
- expect((String(window.device.cordova)).length > 0).toBe(true);
- });
-
- it('should depend on the presence of cordova.version string', function () {
- expect(window.cordova.version).toBeDefined();
- expect((String(window.cordova.version)).length > 0).toBe(true);
- });
-
- it('should contain device.cordova equal to cordova.version', function () {
- expect(window.device.cordova).toBe(window.cordova.version);
- });
-
- it('should contain a model specification that is a string', function () {
- expect(window.device.model).toBeDefined();
- expect((String(window.device.model)).length > 0).toBe(true);
- });
-
- it('should contain a manufacturer property that is a string', function () {
- expect(window.device.manufacturer).toBeDefined();
- expect((String(window.device.manufacturer)).length > 0).toBe(true);
- });
-
- it('should contain an isVirtual property that is a boolean', function () {
- expect(window.device.isVirtual).toBeDefined();
- expect(typeof window.device.isVirtual).toBe('boolean');
- });
-
- it('should contain a serial number specification that is a string', function () {
- expect(window.device.serial).toBeDefined();
- expect((String(window.device.serial)).length > 0).toBe(true);
-
- });
-
- });
-};
-
-exports.defineManualTests = function (contentEl, createActionButton) {
- var logMessage = function (message, color) {
- var log = document.getElementById('info');
- var logLine = document.createElement('div');
- if (color) {
- logLine.style.color = color;
- }
- logLine.innerHTML = message;
- log.appendChild(logLine);
- };
-
- var clearLog = function () {
- var log = document.getElementById('info');
- log.innerHTML = '';
- };
-
- var device_tests = 'Press Dump Device button to get device information
' +
- '' +
- 'Expected result: Status box will get updated with device info. (i.e. platform, version, uuid, model, etc)';
-
- contentEl.innerHTML = '' + device_tests;
-
- createActionButton('Dump device', function () {
- clearLog();
- logMessage(JSON.stringify(window.device, null, '\t'));
- }, 'dump_device');
-};
diff --git a/plugins/cordova-plugin-device/types/index.d.ts b/plugins/cordova-plugin-device/types/index.d.ts
deleted file mode 100644
index d4450b4..0000000
--- a/plugins/cordova-plugin-device/types/index.d.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-// Type definitions for Apache Cordova Device plugin
-// Project: https://github.com/apache/cordova-plugin-device
-// Definitions by: Microsoft Open Technologies Inc
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-//
-// Copyright (c) Microsoft Open Technologies Inc
-// Licensed under the MIT license
-
-/**
- * This plugin defines a global device object, which describes the device's hardware and software.
- * Although the object is in the global scope, it is not available until after the deviceready event.
- */
-interface Device {
- /** Get the version of Cordova running on the device. */
- cordova: string;
- /** Indicates that Cordova initialize successfully. */
- available: boolean;
- /**
- * The device.model returns the name of the device's model or product. The value is set
- * by the device manufacturer and may be different across versions of the same product.
- */
- model: string;
- /** Get the device's operating system name. */
- platform: string;
- /** Get the device's Universally Unique Identifier (UUID). */
- uuid: string;
- /** Get the operating system version. */
- version: string;
- /** Get the device's manufacturer. */
- manufacturer: string;
- /** Whether the device is running on a simulator. */
- isVirtual: boolean;
- /** Get the device hardware serial number. */
- serial: string;}
-
-declare var device: Device;
\ No newline at end of file
diff --git a/plugins/cordova-plugin-file-transfer/CONTRIBUTING.md b/plugins/cordova-plugin-file-transfer/CONTRIBUTING.md
deleted file mode 100644
index 4c8e6a5..0000000
--- a/plugins/cordova-plugin-file-transfer/CONTRIBUTING.md
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-# Contributing to Apache Cordova
-
-Anyone can contribute to Cordova. And we need your contributions.
-
-There are multiple ways to contribute: report bugs, improve the docs, and
-contribute code.
-
-For instructions on this, start with the
-[contribution overview](http://cordova.apache.org/contribute/).
-
-The details are explained there, but the important items are:
- - Sign and submit an Apache ICLA (Contributor License Agreement).
- - Have a Jira issue open that corresponds to your contribution.
- - Run the tests so your patch doesn't break existing functionality.
-
-We look forward to your contributions!
diff --git a/plugins/cordova-plugin-file-transfer/LICENSE b/plugins/cordova-plugin-file-transfer/LICENSE
deleted file mode 100644
index 7a4a3ea..0000000
--- a/plugins/cordova-plugin-file-transfer/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-file-transfer/NOTICE b/plugins/cordova-plugin-file-transfer/NOTICE
deleted file mode 100644
index 46fed23..0000000
--- a/plugins/cordova-plugin-file-transfer/NOTICE
+++ /dev/null
@@ -1,8 +0,0 @@
-Apache Cordova
-Copyright 2012 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-This product includes a copy of OkHttp from:
-https://github.com/square/okhttp
diff --git a/plugins/cordova-plugin-file-transfer/README.md b/plugins/cordova-plugin-file-transfer/README.md
deleted file mode 100644
index b637446..0000000
--- a/plugins/cordova-plugin-file-transfer/README.md
+++ /dev/null
@@ -1,598 +0,0 @@
----
-title: File Transfer
-description: Upload and download files.
----
-
-
-|AppVeyor|Travis CI|
-|:-:|:-:|
-|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-file-transfer?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-file-transfer)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-file-transfer)|
-
-# 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.
-
-```js
-document.addEventListener("deviceready", onDeviceReady, false);
-function onDeviceReady() {
- console.log(FileTransfer);
-}
-```
-
-> To get a few ideas, check out the [sample](#sample) at the bottom of this page.
-
-Report issues with this plugin on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20File%20Transfer%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC)
-
-## Deprecated
-
-With the new features introduced in [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest), this plugin is not needed any more. Migrating from this plugin to using the new features of [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest), is explained in this [Cordova blog post](https://cordova.apache.org/blog/2017/10/18/from-filetransfer-to-xhr2.html).
-
-## Installation
-
-```bash
-cordova plugin add cordova-plugin-file-transfer
-```
-
-## Supported Platforms
-
-- Amazon Fire OS
-- Android
-- BlackBerry 10
-- Browser
-- Firefox OS**
-- iOS
-- Windows Phone 7 and 8*
-- Windows
-
-\* _Do not support `onprogress` nor `abort()`_
-
-\** _Do not support `onprogress`_
-
-# FileTransfer
-
-The `FileTransfer` object provides a way to upload files using an HTTP
-multi-part POST or PUT request, and to download files.
-
-## Properties
-
-- __onprogress__: Called with a `ProgressEvent` whenever a new chunk of data is transferred. _(Function)_
-
-## Methods
-
-- __upload__: Sends a file to a server.
-
-- __download__: Downloads a file from server.
-
-- __abort__: Aborts an in-progress transfer.
-
-
-## upload
-
-__Parameters__:
-
-- __fileURL__: Filesystem URL representing the file on the device or a [data URI](https://en.wikipedia.org/wiki/Data_URI_scheme). For backwards compatibility, this can also be the full path of the file on the device. (See [Backwards Compatibility Notes](#backwards-compatibility-notes) below)
-
-- __server__: URL of the server to receive the file, as encoded by `encodeURI()`.
-
-- __successCallback__: A callback that is passed a `FileUploadResult` object. _(Function)_
-
-- __errorCallback__: A callback that executes if an error occurs retrieving the `FileUploadResult`. Invoked with a `FileTransferError` object. _(Function)_
-
-- __options__: Optional parameters _(Object)_. Valid keys:
- - __fileKey__: The name of the form element. Defaults to `file`. (DOMString)
- - __fileName__: The file name to use when saving the file on the server. Defaults to `image.jpg`. (DOMString)
- - __httpMethod__: The HTTP method to use - either `PUT` or `POST`. Defaults to `POST`. (DOMString)
- - __mimeType__: The mime type of the data to upload. Defaults to `image/jpeg`. (DOMString)
- - __params__: A set of optional key/value pairs to pass in the HTTP request. (Object, key/value - DOMString)
- - __chunkedMode__: Whether to upload the data in chunked streaming mode. Defaults to `true`. (Boolean)
- - __headers__: A map of header name/header values. Use a hash to specify one or more than one value. On iOS, FireOS, and Android, if a header named Content-Type is present, multipart form data will NOT be used. (Object)
-
-- __trustAllHosts__: Optional parameter, defaults to `false`. If set to `true`, it accepts all security certificates. Not recommended for production use. Supported on iOS. _(boolean)_
-
-### Example
-
-```js
-// !! Assumes variable fileURL contains a valid URL to a text file on the device,
-// for example, cdvfile://localhost/persistent/path/to/file.txt
-
-var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
-}
-
-var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
-}
-
-var options = new FileUploadOptions();
-options.fileKey = "file";
-options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
-options.mimeType = "text/plain";
-
-var params = {};
-params.value1 = "test";
-params.value2 = "param";
-
-options.params = params;
-
-var ft = new FileTransfer();
-ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-```
-
-### Example with Upload Headers and Progress Events (Android and iOS only)
-
-```js
-function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
-}
-
-function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
-}
-
-var uri = encodeURI("http://some.server.com/upload.php");
-
-var options = new FileUploadOptions();
-options.fileKey="file";
-options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
-options.mimeType="text/plain";
-
-var headers={'headerParam':'headerValue', 'headerParam2':'headerValue2'};
-
-options.headers = headers;
-
-var ft = new FileTransfer();
-ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
-};
-ft.upload(fileURL, uri, win, fail, options);
-```
-
-## FileUploadResult
-
-A `FileUploadResult` object is passed to the success callback of the
-`FileTransfer` object's `upload()` method.
-
-### Properties
-
-- __bytesSent__: The number of bytes sent to the server as part of the upload. (long)
-
-- __responseCode__: The HTTP response code returned by the server. (long)
-
-- __response__: The HTTP response returned by the server. (DOMString)
-
-- __headers__: The HTTP response headers by the server. (Object)
- - Currently supported on iOS only.
-
-### iOS Quirks
-
-- Does not support `responseCode` or `bytesSent`.
-
-- Does not support uploads of an empty file with __chunkedMode=true__ and `multipartMode=false`.
-
-### Browser Quirks
-
-- __withCredentials__: _boolean_ that tells the browser to set the withCredentials flag on the XMLHttpRequest
-
-### Windows Quirks
-
-- An option parameter with empty/null value is excluded in the upload operation due to the Windows API design.
-
-- __chunkedMode__ is not supported and all uploads are set to non-chunked mode.
-
-## download
-
-__Parameters__:
-
-- __source__: URL of the server to download the file, as encoded by `encodeURI()`.
-
-- __target__: Filesystem url representing the file on the device. For backwards compatibility, this can also be the full path of the file on the device. (See [Backwards Compatibility Notes](#backwards-compatibility-notes) below)
-
-- __successCallback__: A callback that is passed a `FileEntry` object. _(Function)_
-
-- __errorCallback__: A callback that executes if an error occurs when retrieving the `FileEntry`. Invoked with a `FileTransferError` object. _(Function)_
-
-- __trustAllHosts__: Optional parameter, defaults to `false`. If set to `true`, it accepts all security certificates. Not recommended for production use. Supported on iOS. _(boolean)_
-
-- __options__: Optional parameters, currently only supports headers (such as Authorization (Basic Authentication), etc).
-
-### Example
-
-```js
-// !! Assumes variable fileURL contains a valid URL to a path on the device,
-// for example, cdvfile://localhost/persistent/path/to/downloads/
-
-var fileTransfer = new FileTransfer();
-var uri = encodeURI("http://some.server.com/download.php");
-
-fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("download error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
-);
-```
-
-### WP8 Quirks
-
-- Download requests is being cached by native implementation. To avoid caching, pass `if-Modified-Since` header to download method.
-
-### Browser Quirks
-
-- __withCredentials__: _boolean_ that tells the browser to set the withCredentials flag on the XMLHttpRequest
-
-## abort
-
-Aborts an in-progress transfer. The onerror callback is passed a FileTransferError object which has an error code of `FileTransferError.ABORT_ERR`.
-
-### Example
-
-```js
-// !! Assumes variable fileURL contains a valid URL to a text file on the device,
-// for example, cdvfile://localhost/persistent/path/to/file.txt
-
-var win = function(r) {
- console.log("Should not be called.");
-}
-
-var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
-}
-
-var options = new FileUploadOptions();
-options.fileKey="file";
-options.fileName="myphoto.jpg";
-options.mimeType="image/jpeg";
-
-var ft = new FileTransfer();
-ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-ft.abort();
-```
-
-## FileTransferError
-
-A `FileTransferError` object is passed to an error callback when an error occurs.
-
-### Properties
-
-- __code__: One of the predefined error codes listed below. (Number)
-
-- __source__: URL to the source. (String)
-
-- __target__: URL to the target. (String)
-
-- __http_status__: HTTP status code. This attribute is only available when a response code is received from the HTTP connection. (Number)
-
-- __body__ Response body. This attribute is only available when a response is received from the HTTP connection. (String)
-
-- __exception__: Either e.getMessage or e.toString (String)
-
-### iOS Quirks
-
-__exception__ is never defined.
-
-### Constants
-
-- 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
-- 2 = `FileTransferError.INVALID_URL_ERR`
-- 3 = `FileTransferError.CONNECTION_ERR`
-- 4 = `FileTransferError.ABORT_ERR`
-- 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## Windows Quirks
-
-- The plugin implementation is based on [BackgroundDownloader](https://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.backgroundtransfer.backgrounddownloader.aspx)/[BackgroundUploader](https://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.backgroundtransfer.backgrounduploader.aspx), which entails the latency issues on Windows devices (creation/starting of an operation can take up to a few seconds). You can use XHR or [HttpClient](https://msdn.microsoft.com/en-us/library/windows/apps/windows.web.http.httpclient.aspx) as a quicker alternative for small downloads.
-
-## Backwards Compatibility Notes
-
-Previous versions of this plugin would only accept device-absolute-file-paths as the source for uploads, or as the target for downloads. These paths would typically be of the form:
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-For backwards compatibility, these paths are still accepted, and if your application has recorded paths like these in persistent storage, then they can continue to be used.
-
-These paths were previously exposed in the `fullPath` property of `FileEntry` and `DirectoryEntry` objects returned by the File plugin. New versions of the File plugin however, no longer expose these paths to JavaScript.
-
-If you are upgrading to a new (1.0.0 or newer) version of File, and you have previously been using `entry.fullPath` as arguments to `download()` or `upload()`, then you will need to change your code to use filesystem URLs instead.
-
-`FileEntry.toURL()` and `DirectoryEntry.toURL()` return a filesystem URL of the form:
-
- cdvfile://localhost/persistent/path/to/file
-
-which can be used in place of the absolute file path in both `download()` and `upload()` methods.
-
-## Sample: Download and Upload Files
-
-Use the File-Transfer plugin to upload and download files. In these examples, we demonstrate several tasks like:
-
-* [Downloading a binary file to the application cache](#binaryFile)
-* [Uploading a file created in your application's root](#uploadFile)
-* [Downloading the uploaded file](#downloadFile)
-
-## Download a Binary File to the application cache
-
-Use the File plugin with the File-Transfer plugin to provide a target for the files that you download (the target must be a FileEntry object). Before you download the file, create a DirectoryEntry object by using `resolveLocalFileSystemURL` and calling `fs.root` in the success callback. Use the `getFile` method of DirectoryEntry to create the target file.
-
-```js
-window.requestFileSystem(window.TEMPORARY, 5 * 1024 * 1024, function (fs) {
-
- console.log('file system open: ' + fs.name);
-
- // Make sure you add the domain name to the Content-Security-Policy element.
- var url = 'http://cordova.apache.org/static/img/cordova_bot.png';
- // Parameters passed to getFile create a new file or return the file if it already exists.
- fs.root.getFile('downloaded-image.png', { create: true, exclusive: false }, function (fileEntry) {
- download(fileEntry, url, true);
-
- }, onErrorCreateFile);
-
-}, onErrorLoadFs);
-```
-
->*Note* For persistent storage, pass LocalFileSystem.PERSISTENT to requestFileSystem.
-
-When you have the FileEntry object, download the file using the `download` method of the FileTransfer object. The 3rd argument to the `download` function of FileTransfer is the success callback, which you can use to call the app's `readBinaryFile` function. In this code example, the `entry` variable is a new FileEntry object that receives the result of the download operation.
-
-```js
-function download(fileEntry, uri, readBinaryData) {
-
- var fileTransfer = new FileTransfer();
- var fileURL = fileEntry.toURL();
-
- fileTransfer.download(
- uri,
- fileURL,
- function (entry) {
- console.log("Successful download...");
- console.log("download complete: " + entry.toURL());
- if (readBinaryData) {
- // Read the file...
- readBinaryFile(entry);
- }
- else {
- // Or just display it.
- displayImageByFileURL(entry);
- }
- },
- function (error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- null, // or, pass false
- {
- //headers: {
- // "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- //}
- }
- );
-}
-```
-
-If you just need to display the image, take the FileEntry to call its toURL() function.
-
-```js
-function displayImageByFileURL(fileEntry) {
- var elem = document.getElementById('imageElement');
- elem.src = fileEntry.toURL();
-}
-```
-
-Depending on your app requirements, you may want to read the file. To support operations with binary files, FileReader supports two methods, `readAsBinaryString` and `readAsArrayBuffer`. In this example, use `readAsArrayBuffer` and pass the FileEntry object to the method. Once you read the file successfully, construct a Blob object using the result of the read.
-
-```js
-function readBinaryFile(fileEntry) {
- fileEntry.file(function (file) {
- var reader = new FileReader();
-
- reader.onloadend = function() {
-
- console.log("Successful file read: " + this.result);
- // displayFileData(fileEntry.fullPath + ": " + this.result);
-
- var blob = new Blob([new Uint8Array(this.result)], { type: "image/png" });
- displayImage(blob);
- };
-
- reader.readAsArrayBuffer(file);
-
- }, onErrorReadFile);
-}
-```
-
-Once you read the file successfully, you can create a DOM URL string using `createObjectURL`, and then display the image.
-
-```js
-function displayImage(blob) {
-
- // Note: Use window.URL.revokeObjectURL when finished with image.
- var objURL = window.URL.createObjectURL(blob);
-
- // Displays image if result is a valid DOM string for an image.
- var elem = document.getElementById('imageElement');
- elem.src = objURL;
-}
-```
-
-As you saw previously, you can call FileEntry.toURL() instead to just display the downloaded image (skip the file read).
-
-## Upload a File
-
-When you upload a File using the File-Transfer plugin, use the File plugin to provide files for upload (again, they must be FileEntry objects). Before you can upload anything, create a file for upload using the `getFile` method of DirectoryEntry. In this example, create the file in the application's cache (fs.root). Then call the app's writeFile function so you have some content to upload.
-
-```js
-function onUploadFile() {
- window.requestFileSystem(window.TEMPORARY, 5 * 1024 * 1024, function (fs) {
-
- console.log('file system open: ' + fs.name);
- var fileName = "uploadSource.txt";
- var dirEntry = fs.root;
- dirEntry.getFile(fileName, { create: true, exclusive: false }, function (fileEntry) {
-
- // Write something to the file before uploading it.
- writeFile(fileEntry);
-
- }, onErrorCreateFile);
-
- }, onErrorLoadFs);
-}
-```
-
-In this example, create some simple content, and then call the app's upload function.
-
-```js
-function writeFile(fileEntry, dataObj) {
- // Create a FileWriter object for our FileEntry (log.txt).
- fileEntry.createWriter(function (fileWriter) {
-
- fileWriter.onwriteend = function () {
- console.log("Successful file write...");
- upload(fileEntry);
- };
-
- fileWriter.onerror = function (e) {
- console.log("Failed file write: " + e.toString());
- };
-
- if (!dataObj) {
- dataObj = new Blob(['file data to upload'], { type: 'text/plain' });
- }
-
- fileWriter.write(dataObj);
- });
-}
-```
-
-Forward the FileEntry object to the upload function. To perform the actual upload, use the upload function of the FileTransfer object.
-
-```js
-function upload(fileEntry) {
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- var fileURL = fileEntry.toURL();
-
- var success = function (r) {
- console.log("Successful upload...");
- console.log("Code = " + r.responseCode);
- // displayFileData(fileEntry.fullPath + " (content uploaded to server)");
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- // SERVER must be a URL that can handle the request, like
- // http://some.server.com/upload.php
- ft.upload(fileURL, encodeURI(SERVER), success, fail, options);
-};
-```
-
-## Download the uploaded file
-
-To download the image you just uploaded, you will need a valid URL that can handle the request, for example, http://some.server.com/download.php. Again, the success handler for the FileTransfer.download method receives a FileEntry object. The main difference here from previous examples is that we call FileReader.readAsText to read the result of the download operation, because we uploaded a file with text content.
-
-```js
-function download(fileEntry, uri) {
-
- var fileTransfer = new FileTransfer();
- var fileURL = fileEntry.toURL();
-
- fileTransfer.download(
- uri,
- fileURL,
- function (entry) {
- console.log("Successful download...");
- console.log("download complete: " + entry.toURL());
- readFile(entry);
- },
- function (error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- null, // or, pass false
- {
- //headers: {
- // "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- //}
- }
- );
-}
-```
-
-In the readFile function, call the `readAsText` method of the FileReader object.
-
-```js
-function readFile(fileEntry) {
- fileEntry.file(function (file) {
- var reader = new FileReader();
-
- reader.onloadend = function () {
-
- console.log("Successful file read: " + this.result);
- // displayFileData(fileEntry.fullPath + ": " + this.result);
-
- };
-
- reader.readAsText(file);
-
- }, onErrorReadFile);
-}
-```
diff --git a/plugins/cordova-plugin-file-transfer/RELEASENOTES.md b/plugins/cordova-plugin-file-transfer/RELEASENOTES.md
deleted file mode 100644
index bcb4fce..0000000
--- a/plugins/cordova-plugin-file-transfer/RELEASENOTES.md
+++ /dev/null
@@ -1,319 +0,0 @@
-
-# Release Notes
-
-### 1.7.1 (Jan 24, 2018)
-* [CB-13749](https://issues.apache.org/jira/browse/CB-13749) Add build-tools-26.0.2 to travis
-
-### 1.7.0 (Nov 06, 2017)
-* Updated `README` with Deprecated Status
-* [CB-13472](https://issues.apache.org/jira/browse/CB-13472) (CI) Fixed Travis **Android** builds again
-* [CB-12809](https://issues.apache.org/jira/browse/CB-12809) Google Play Blocker: Unsafe SSL TrustManager Defined
-* [CB-7995](https://issues.apache.org/jira/browse/CB-7995) document that `FileTransferError.exception` on **iOS** is never defined.
-* [CB-13000](https://issues.apache.org/jira/browse/CB-13000) (CI) Speed up **Android** builds
-* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`.
-
-### 1.6.3 (Apr 27, 2017)
-* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder
-* [CB-10696](https://issues.apache.org/jira/browse/CB-10696) **iOS**: Encode target path with spaces
-
-### 1.6.2 (Feb 28, 2017)
-* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml`
-* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped`
-* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0**
-* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges
-
-### 1.6.1 (Dec 07, 2016)
-* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.6.1
-* [CB-12154](https://issues.apache.org/jira/browse/CB-12154) file-transfer progressEvent.total = -1 on iOS
-* [CB-10974](https://issues.apache.org/jira/browse/CB-10974) Cordova file transfer Content-Length header problem
-* Don't crash on low memory devices
-* [CB-12100](https://issues.apache.org/jira/browse/CB-12100) (ios) Fixed test plugin install at platform add on cordova@6.3.1
-* [CB-11959](https://issues.apache.org/jira/browse/CB-11959) Fixed the jshint issues
-* [CB-11959](https://issues.apache.org/jira/browse/CB-11959) Increased the array length for ios and winstore even more
-* [CB-11959](https://issues.apache.org/jira/browse/CB-11959) Fixed filetransfer.spec.21 test failure on iOS and Windows Store when using local server
-* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…"
-* [CB-11926](https://issues.apache.org/jira/browse/CB-11926) Tests can use local server
-* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version.
-
-### 1.6.0 (Sep 08, 2016)
-* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies
-* [CB-9022](https://issues.apache.org/jira/browse/CB-9022) Fix exception thrown by call to `remapApi` on main thread
-* Plugin uses `Android Log class` and not `Cordova LOG class`
-* [CB-9022](https://issues.apache.org/jira/browse/CB-9022) Resolve source URI on background thread
-* [CB-11316](https://issues.apache.org/jira/browse/CB-11316) **windows**: Added `content-type` for files
-* Close invalid PRs
-* [CB-11497](https://issues.apache.org/jira/browse/CB-11497) Use `cordova-vm` for testing 304 errors
-* Add badges for paramedic builds on Jenkins
-* documentation with a wrong log message in `fileTransfer.download` function
-* added link to sample
-* Add pull request template.
-* [CB-10974](https://issues.apache.org/jira/browse/CB-10974) Cordova file transfer `Content-Length` header problem
-* Add fenced code blocks to help code formatting
-* [CB-11165](https://issues.apache.org/jira/browse/CB-11165) removed peer dependency
-* [CB-11003](https://issues.apache.org/jira/browse/CB-11003) Adding sample section to documentation.
-* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md
-
-### 1.5.1 (Apr 15, 2016)
-* [CB-10536](https://issues.apache.org/jira/browse/CB-10536) Removing flaky test assertions about abort callback latency
-* Removing the expectation in `spec.34` for the transfer method to be called.
-* [CB-10978](https://issues.apache.org/jira/browse/CB-10978) Fix `file-transfer.tests` JSHint issues
-* [CB-10782](https://issues.apache.org/jira/browse/CB-10782) Occasional failure in file transfer tests causing mobilespec crash
-* [CB-10771](https://issues.apache.org/jira/browse/CB-10771) Fixing failure when empty string passed as a value for option parameter in upload function
-* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins
-
-### 1.5.0 (Jan 15, 2016)
-* [CB-10208](https://issues.apache.org/jira/browse/CB-10208) Fix `file-transfer` multipart form data upload format on **Windows**
-* [CB-9837](https://issues.apache.org/jira/browse/CB-9837) Add data `URI` support to `file-transfer` upload on **iOS**
-* [CB-9600](https://issues.apache.org/jira/browse/CB-9600) `FileUploadOptions` params not posted on **iOS**
-* [CB-9840](https://issues.apache.org/jira/browse/CB-9840) Fallback `file-transfer` `uploadResponse` encoding to `latin1` in case not encoded with `UTF-8` on **iOS**
-* [CB-9840](https://issues.apache.org/jira/browse/CB-9840) Fallback `file-transfer` upload/download response encoding to `latin1` in case not encoded with `UTF-8` on **iOS**
-* [CB-8641](https://issues.apache.org/jira/browse/CB-8641) **Windows Phone 8.1** Some `file-transfer` plugin tests occasionally fail in `mobilespec`
-* Adding linting and fixing linter warnings. Reducing timeouts to 7 seconds.
-* [CB-10100](https://issues.apache.org/jira/browse/CB-10100) updated file dependency to not grab new majors
-* [CB-7006](https://issues.apache.org/jira/browse/CB-7006) Empty file is created on file transfer if server response is 304
-* [CB-10098](https://issues.apache.org/jira/browse/CB-10098) `filetransfer.spec.33` is faulty
-* [CB-9969](https://issues.apache.org/jira/browse/CB-9969) Filetransfer upload error deletes original file
-* [CB-10088](https://issues.apache.org/jira/browse/CB-10088) `filetransfer spec.10` and `spec.11` test is faulty
-* [CB-9969](https://issues.apache.org/jira/browse/CB-9969) Filetransfer upload error deletes original file
-* [CB-10086](https://issues.apache.org/jira/browse/CB-10086) There are two `spec.31` tests for `file-transfer` tests
-* [CB-10037](https://issues.apache.org/jira/browse/CB-10037) Add progress indicator to file-transfer manual tests
-* [CB-9563](https://issues.apache.org/jira/browse/CB-9563) Mulptipart form data is used even a header named `Content-Type` is present
-* [CB-8863](https://issues.apache.org/jira/browse/CB-8863) fix block usage of self
-
-### 1.4.0 (Nov 18, 2015)
-* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest
-* [CB-9879](https://issues.apache.org/jira/browse/CB-9879) `getCookie`s can cause unhandled `NullPointerException`
-* [CB-6928](https://issues.apache.org/jira/browse/CB-6928) Wrong behaviour transferring cacheable content
-* [CB-51](https://issues.apache.org/jira/browse/CB-51) FileTransfer - Support `PUT` Method
-* [CB-9906](https://issues.apache.org/jira/browse/CB-9906) cleanup duplicate code, removed 2nd `isWP8` declaration.
-* [CB-9950](https://issues.apache.org/jira/browse/CB-9950) Unpend Filetransfer spec.27 on **wp8** as custom headers are now supported
-* [CB-9843](https://issues.apache.org/jira/browse/CB-9843) Added **wp8** quirk to test spec 12
-* Fixing contribute link.
-* [CB-8431](https://issues.apache.org/jira/browse/CB-8431) File Transfer tests crash on **Android Lolipop**
-* [CB-9790](https://issues.apache.org/jira/browse/CB-9790) Align `FileUploadOptions` `fileName` and `mimeType` default parameter values to the docs on **iOS**
-* [CB-9385](https://issues.apache.org/jira/browse/CB-9385) Return `FILE_NOT_FOUND_ERR` when receiving `404` code on **iOS**
-* [CB-9791](https://issues.apache.org/jira/browse/CB-9791) Decreased download and upload tests timeout
-
-### 1.3.0 (Sep 18, 2015)
-* Found issue where : is accepted as a valid header, this is obviously wrong
-* [CB-9562](https://issues.apache.org/jira/browse/CB-9562) Fixed incorrect headers handling on Android
-* Fixing headers so they don't accept non-ASCII
-* updated tests to use cordova apache vm
-* [CB-9493](https://issues.apache.org/jira/browse/CB-9493) Fix file paths in file-transfer manual tests
-* [CB-8816](https://issues.apache.org/jira/browse/CB-8816) Add cdvfile:// support on windows
-* [CB-9376](https://issues.apache.org/jira/browse/CB-9376) Fix FileTransfer plugin manual tests issue - 'undefined' in paths
-
-### 1.2.1 (Jul 7, 2015)
-* [CB-9275](https://issues.apache.org/jira/browse/CB-9275) [WP8] Fix build failure on WP8 by using reflection to detect presence of JSON.NET based serialization
-* Updated code per code review.
-* Updated documentation for browser
-* Added option to allow for passing cookies automatically in the browser
-
-### 1.2.0 (Jun 17, 2015)
-* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-file-transfer documentation translation: cordova-plugin-file-transfer
-* [CB-6503](https://issues.apache.org/jira/browse/CB-6503): Null pointer check for headers in upload (This closes #27)
-* [CB-6503](https://issues.apache.org/jira/browse/CB-6503): Allow payload content-types other than multipart/form-data to be used for upload
-* Fix NoSuchMethodException looking up cookies.
-* fix npm md issue
-* [CB-8951](https://issues.apache.org/jira/browse/CB-8951) (wp8) Handle exceptions in download() and upload() again
-* [wp8] Relaxed engine version requirement, using reflection to see if methods are available
-* Check for the existence of Json.net assembly to determin how we deserialize our headers.
-* relax engine requirement to allow -dev versions
-* Remove verbose console log messages
-* fix bad commit (mine) for cordova-wp8@4.0.0 engine req
-* bump required cordova-wp8 version to 4.0.0
-* This closes #80, This closes #12
-* fix failing test resulting from overlapping async calls
-* [CB-8721](https://issues.apache.org/jira/browse/CB-8721) Fixes incorrect headers and upload params parsing on wp8
-* Replace all slashes in windows path
-
-### 1.1.0 (May 06, 2015)
-* [CB-8951](https://issues.apache.org/jira/browse/CB-8951) Fixed crash related to headers parsing on **wp8**
-* [CB-8933](https://issues.apache.org/jira/browse/CB-8933) Increased download and upload test timeout
-* [CB-6313](https://issues.apache.org/jira/browse/CB-6313) **wp8**: Extra boundary in upload
-* [CB-8761](https://issues.apache.org/jira/browse/CB-8761) **wp8**: Copy cookies from WebBrowser
-
-### 1.0.0 (Apr 15, 2015)
-* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) bumped version of file dependency
-* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump
-* [CB-8641](https://issues.apache.org/jira/browse/CB-8641) Fixed tests to pass on windows and wp8
-* [CB-8583](https://issues.apache.org/jira/browse/CB-8583) Forces download to overwrite existing target file
-* [CB-8589](https://issues.apache.org/jira/browse/CB-8589) Fixes upload failure when server's response doesn't contain any data
-* [CB-8747](https://issues.apache.org/jira/browse/CB-8747) updated dependency, added peer dependency
-* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name
-* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id
-* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id
-* Use TRAVIS_BUILD_DIR, install paramedic by npm
-* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme
-* [CB-8654](https://issues.apache.org/jira/browse/CB-8654) Note WP8 download requests caching in docs
-* [CB-8590](https://issues.apache.org/jira/browse/CB-8590) (Windows) Fixed download.onprogress.lengthComputable
-* [CB-8566](https://issues.apache.org/jira/browse/CB-8566) Integrate TravisCI
-* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-file-transfer documentation translation: cordova-plugin-file-transfer
-* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file
-* [CB-8495](https://issues.apache.org/jira/browse/CB-8495) Fixed wp8 and wp81 test failures
-* [CB-7957](https://issues.apache.org/jira/browse/CB-7957) Adds support for `browser` platform
-* [CB-8429](https://issues.apache.org/jira/browse/CB-8429) Updated version and RELEASENOTES.md for release 0.5.0 (take 2)
-* Fixes typo, introduced in https://github.com/apache/cordova-plugin-file-transfer/commit/bc43b46
-* [CB-8407](https://issues.apache.org/jira/browse/CB-8407) Use File proxy to construct valid FileEntry for download success callback
-* [CB-8407](https://issues.apache.org/jira/browse/CB-8407) Removes excess path to native path conversion in download method
-* [CB-8429](https://issues.apache.org/jira/browse/CB-8429) Updated version and RELEASENOTES.md for release 0.5.0
-* [CB-7957](https://issues.apache.org/jira/browse/CB-7957) Adds support for `browser` platform
-* [CB-8095](https://issues.apache.org/jira/browse/CB-8095) Fixes JSHint and formatting issues
-* [CB-8095](https://issues.apache.org/jira/browse/CB-8095) Updates tests and documentation
-* [CB-8095](https://issues.apache.org/jira/browse/CB-8095) Rewrite upload method to support progress events properly
-* android: Fix error reporting for unknown uri type on sourceUri instead of targetUri
-
-### 0.5.0 (Feb 04, 2015)
-* [CB-8407](https://issues.apache.org/jira/browse/CB-8407) windows: Fix download of `ms-appdata:///` URIs
-* [CB-8095](https://issues.apache.org/jira/browse/CB-8095) windows: Rewrite upload method to support progress events properly
-* [CB-5059](https://issues.apache.org/jira/browse/CB-5059) android: Add a CookieManager abstraction for pluggable webviews
-* ios: Fix compile warning about implicity int conversion
-* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) ios: Use argumentForIndex rather than NSArray extension
-* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) ios: Use a local copy of DLog macro rather than CordovaLib version
-* [CB-8296](https://issues.apache.org/jira/browse/CB-8296) ios: Fix crash when upload fails and file is not yet created (close #57)
-* Document "body" property on FileTransferError
-* [CB-7912](https://issues.apache.org/jira/browse/CB-7912) ios, android: Update to work with whitelist plugins in Cordova 4.x
-* Error callback should always be called with the FileTransferError object, and not just the code
-* windows: alias appData to Windows.Storage.ApplicationData.current
-* [CB-8093](https://issues.apache.org/jira/browse/CB-8093) Fixes incorrect FileTransferError returned in case of download failure
-
-### 0.4.8 (Dec 02, 2014)
-* [CB-8021](https://issues.apache.org/jira/browse/CB-8021) - adds documentation for `httpMethod` to `doc/index.md`. However, translations still need to be addressed.
-* [CB-7223](https://issues.apache.org/jira/browse/CB-7223) spec.27 marked pending for **wp8**
-* [CB-6900](https://issues.apache.org/jira/browse/CB-6900) fixed `spec.7` for **wp8**
-* [CB-7944](https://issues.apache.org/jira/browse/CB-7944) Pended unsupported auto tests for *Windows*
-* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention `deviceready` in plugin docs
-* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-file-transfer documentation translation: cordova-plugin-file-transfer
-
-### 0.4.7 (Oct 03, 2014)
-* Construct proper FileEntry with nativeURL property set
-* [CB-7532](https://issues.apache.org/jira/browse/CB-7532) Handle non-existent download dirs properly
-* [CB-7529](https://issues.apache.org/jira/browse/CB-7529) Adds support for 'ms-appdata' URIs for windows
-
-### 0.4.6 (Sep 17, 2014)
-* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-file-transfer documentation translation
-* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-file-transfer documentation translation
-* [CB-7423](https://issues.apache.org/jira/browse/CB-7423) fix spec28,29 lastProgressEvent not visible to afterEach function
-* Amazon related changes.
-* Remove dupe file windows+windows8 both use the same one
-* [CB-7316](https://issues.apache.org/jira/browse/CB-7316) Updates docs with actual information.
-* [CB-7316](https://issues.apache.org/jira/browse/CB-7316) Adds support for Windows platform, moves \*Proxy files to proper directory.
-* [CB-7316](https://issues.apache.org/jira/browse/CB-7316) Improves current specs compatibility:
-* added documentation for new test
-* [CB-6466](https://issues.apache.org/jira/browse/CB-6466) Fix failing test due to recent url change
-* [CB-6466](https://issues.apache.org/jira/browse/CB-6466) created mobile-spec test
-* Renamed test dir, added nested plugin.xml and test
-* Fixed failing spec.19 on wp8
-* added documentation to manual tests
-* [CB-6961](https://issues.apache.org/jira/browse/CB-6961) port file-transfer tests to framework
-
-### 0.4.5 (Aug 06, 2014)
-* Upload parameters out of order
-* **FirefoxOS** initial implementation
-* [CB-6781](https://issues.apache.org/jira/browse/CB-6781): Expose FileTransferError.exception to application
-* [CB-6928](https://issues.apache.org/jira/browse/CB-6928): Add new error code to documentation
-* [CB-6928](https://issues.apache.org/jira/browse/CB-6928): Handle 304 status code
-* [CB-6928](https://issues.apache.org/jira/browse/CB-6928): Open output stream only if it's necessary.
-* [BlackBerry10] Minor doc correction
-* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs
-* [Windows8] upload uses the provided fileName or the actual fileName
-* [CB-2420](https://issues.apache.org/jira/browse/CB-2420) [Windows8] honor fileKey and param options. This closes #15
-* [CB-6781](https://issues.apache.org/jira/browse/CB-6781): Update new docs to match AlexNennker's changes in PR30
-* [CB-6781](https://issues.apache.org/jira/browse/CB-6781): Continue previous commit with one new instance (This closes #30)
-* [CB-6781](https://issues.apache.org/jira/browse/CB-6781): add the exception text to the error object
-* [CB-6890](https://issues.apache.org/jira/browse/CB-6890): Fix pluginManager access for 4.0.x branch
-
-### 0.4.4 (Jun 05, 2014)
-* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and French Translations added. Github close #21
-* ubuntu: support 'cdvfile' URI
-* [CB-6802](https://issues.apache.org/jira/browse/CB-6802) Add license
-* Upload progress now works also for second file
-* [CB-6706](https://issues.apache.org/jira/browse/CB-6706): Relax dependency on file plugin
-* [CB-3440](https://issues.apache.org/jira/browse/CB-3440) [BlackBerry10] Update implementation to use modules from file plugin
-* [CB-6378](https://issues.apache.org/jira/browse/CB-6378) Use connection.disconnect() instead of stream.close() for thread-safety
-* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md
-* [CB-6466](https://issues.apache.org/jira/browse/CB-6466) Auto-create directories in download
-* [CB-6494](https://issues.apache.org/jira/browse/CB-6494) android: Fix upload of KitKat content URIs
-* Upleveled from android port with following commits: 3c1ff16 Andrew Grieve - [CB-5762](https://issues.apache.org/jira/browse/CB-5762) android: Fix lengthComputable set wrong for gzip downloads 8374b3d Colin Mahoney - [CB-5631](https://issues.apache.org/jira/browse/CB-5631) Removed SimpleTrackingInputStream.read(byte[] buffer) 6f91ac3 Bas Bosman - [CB-4907](https://issues.apache.org/jira/browse/CB-4907) Close stream when we're finished with it 651460f Christoph Neumann - [CB-6000](https://issues.apache.org/jira/browse/CB-6000) Nginx rejects Content-Type without a space before "boundary". 35f80e4 Ian Clelland - [CB-6050](https://issues.apache.org/jira/browse/CB-6050): Use instance method on actual file plugin object to get FileEntry to return on download
-* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Updated version and RELEASENOTES.md for release 0.4.1
-
-### 0.4.3 (Apr 17, 2014)
-* [CB-6422](https://issues.apache.org/jira/browse/CB-6422) [windows8] use cordova/exec/proxy
-* iOS: Fix error where files were not removed on abort
-* [CB-5175](https://issues.apache.org/jira/browse/CB-5175): [ios] CDVFileTransfer asynchronous download (Fixes #24)
-* [ios] Cast id references to NSURL to avoid compiler warnings (Fixes: apache/cordova-plugin-file-transfer#18)
-* [CB-6212](https://issues.apache.org/jira/browse/CB-6212): [iOS] fix warnings compiled under arm64 64-bit
-* [CB-5762](https://issues.apache.org/jira/browse/CB-5762): [FireOS] android: Fix lengthComputable set wrong for gzip downloads
-* [CB-5631](https://issues.apache.org/jira/browse/CB-5631): [FireOS] Removed SimpleTrackingInputStream.read(byte[] buffer)
-* [CB-4907](https://issues.apache.org/jira/browse/CB-4907): [FireOS] Close stream when we're finished with it
-* [CB-6000](https://issues.apache.org/jira/browse/CB-6000): [FireOS] Nginx rejects Content-Type without a space before "boundary".
-* [CB-6050](https://issues.apache.org/jira/browse/CB-6050): [FireOS] Use instance method on actual file plugin object to get FileEntry to return on download
-* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers
-
-### 0.4.2 (Feb 28, 2014)
-* [CB-6106](https://issues.apache.org/jira/browse/CB-6106) Ensure that nativeURL is used by file transfer download
-* iOS: Fix default value for trustAllHosts on iOS (YES->NO)
-* [CB-6059](https://issues.apache.org/jira/browse/CB-6059) iOS: Stop FileTransfer.download doing IO on the UI thread.
-* [CB-5588](https://issues.apache.org/jira/browse/CB-5588) iOS: Add response headers to upload result
-* [CB-2190](https://issues.apache.org/jira/browse/CB-2190) iOS: Make backgroundTaskId apply to downloads as well. Move backgroundTaskId to the delegate.
-* [CB-6050](https://issues.apache.org/jira/browse/CB-6050) Android: Use instance method on actual file plugin object to get FileEntry to return on download
-* [CB-6000](https://issues.apache.org/jira/browse/CB-6000) Android: Nginx rejects Content-Type without a space before "boundary".
-* [CB-4907](https://issues.apache.org/jira/browse/CB-4907) Android: Close stream when we're finished with it
-* [CB-6022](https://issues.apache.org/jira/browse/CB-6022) Add backwards-compatibility notes to doc
-
-### 0.4.1 (Feb 05, 2014)
-* [CB-5365](https://issues.apache.org/jira/browse/CB-5365) Remove unused exception var to prevent warnings?
-* [CB-2421](https://issues.apache.org/jira/browse/CB-2421) explicitly write the bytesSent,responseCode,result to the FileUploadResult pending release of cordova-plugin-file dependency, added some sanity checks for callbacks
-* iOS: Update for new file plugin api
-* [CB-5631](https://issues.apache.org/jira/browse/CB-5631) Removed SimpleTrackingInputStream.read(byte[] buffer)
-* [CB-5762](https://issues.apache.org/jira/browse/CB-5762) android: Fix lengthComputable set wrong for gzip downloads
-* [CB-4899](https://issues.apache.org/jira/browse/CB-4899) [BlackBerry10] Improve binary file transfer download
-* Delete stale test/ directory
-* [CB-5722](https://issues.apache.org/jira/browse/CB-5722) [BlackBerry10] Update upload function to use native file object
-* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Delete stale snapshot of plugin docs
-* Remove @1 designation from file plugin dependency until pushed to npm
-* [CB-5466](https://issues.apache.org/jira/browse/CB-5466): Update to work with filesystem URLs
-
-### 0.4.0 (Dec 4, 2013)
-* [CB-5466](https://issues.apache.org/jira/browse/CB-5466): Partial revert; we're not ready yet for FS urls
-* add ubuntu platform
-* [CB-5466](https://issues.apache.org/jira/browse/CB-5466): Minor version bump
-* [CB-5466](https://issues.apache.org/jira/browse/CB-5466): Update FileTransfer plugin to accept filesystem urls
-* Added amazon-fireos platform. Change to use amazon-fireos as the platform if the user agen string contains 'cordova-amazon-fireos'
-
-### 0.3.4 (Oct 28, 2013)
-* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): added repo + issue tag to plugin.xml for file transfer plugin
-* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch.
-
-### 0.3.3 (Oct 9, 2013)
-* removed un-needed undef check
-* Fix missing headers in Windows 8 upload proxy
-* Fix missing headers in Windows 8 Proxy
-* Fix Windows 8 HTMLAnchorElement return host:80 which force Basic Auth Header to replace options Auth Header
-* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch.
-
-### 0.3.2 (Sept 25, 2013)
-* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version
-* [windows8] commandProxy was moved
-* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) updating core references
-* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.file-transfer to org.apache.cordova.file-transfer and updating dependency
-* Rename CHANGELOG.md -> RELEASENOTES.md
diff --git a/plugins/cordova-plugin-file-transfer/doc/de/README.md b/plugins/cordova-plugin-file-transfer/doc/de/README.md
deleted file mode 100644
index 03191cb..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/de/README.md
+++ /dev/null
@@ -1,311 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg)](https://travis-ci.org/apache/cordova-plugin-file-transfer)
-
-Plugin-Dokumentation:
-
-Dieses Plugin ermöglicht Ihnen zum Hochladen und Herunterladen von Dateien.
-
-Dieses Plugin wird global `FileTransfer`, `FileUploadOptions` Konstruktoren definiert.
-
-Obwohl im globalen Gültigkeitsbereich, sind sie nicht bis nach dem `deviceready`-Ereignis.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## Installation
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## Unterstützte Plattformen
-
- * Amazon Fire OS
- * Android
- * BlackBerry 10
- * Browser
- * Firefox OS **
- * iOS
- * Windows Phone 7 und 8 *
- * Windows 8
- * Windows
-
-\ * *Unterstützen keine `Onprogress` noch `abort()` *
-
-\ ** * `Onprogress` nicht unterstützt*
-
-# FileTransfer
-
-Das `FileTransfer` -Objekt stellt eine Möglichkeit zum Hochladen von Dateien, die mithilfe einer HTTP-mehrteiligen POST oder PUT-Anforderung, und auch Dateien herunterladen.
-
-## Eigenschaften
-
- * **OnProgress**: aufgerufen, wobei ein `ProgressEvent` wann wird eine neue Datenmenge übertragen. *(Funktion)*
-
-## Methoden
-
- * **Upload**: sendet eine Datei an einen Server.
-
- * **Download**: lädt eine Datei vom Server.
-
- * **abort**: Abbruch eine Ãœbertragung in Bearbeitung.
-
-## Upload
-
-**Parameter**:
-
- * **FileURL**: Dateisystem-URL, das die Datei auf dem Gerät. Für rückwärts Kompatibilität, dies kann auch der vollständige Pfad der Datei auf dem Gerät sein. (Siehe [rückwärts Kompatibilität Notes] unten)
-
- * **Server**: URL des Servers, die Datei zu empfangen, wie kodiert`encodeURI()`.
-
- * **successCallback**: ein Rückruf, der ein `FileUploadResult`-Objekt übergeben wird. *(Funktion)*
-
- * **errorCallback**: ein Rückruf, der ausgeführt wird, tritt ein Fehler beim Abrufen der `FileUploadResult`. Mit einem `FileTransferError`-Objekt aufgerufen. *(Funktion)*
-
- * **Optionen**: optionale Parameter *(Objekt)*. Gültige Schlüssel:
-
- * **FileKey**: der Name des Form-Elements. Wird standardmäßig auf `file` . (DOM-String und enthält)
- * **Dateiname**: der Dateiname beim Speichern der Datei auf dem Server verwendet. Wird standardmäßig auf `image.jpg` . (DOM-String und enthält)
- * **httpMethod**: die HTTP-Methode, die-entweder `PUT` oder `POST`. Der Standardwert ist `POST`. (DOM-String und enthält)
- * **mimeType**: den Mime-Typ der Daten hochzuladen. Standardwerte auf `Image/Jpeg`. (DOM-String und enthält)
- * **params**: eine Reihe von optionalen Schlüssel/Wert-Paaren in der HTTP-Anforderung übergeben. (Objekt)
- * **chunkedMode**: ob die Daten in "Chunked" streaming-Modus hochladen. Der Standardwert ist `true`. (Boolean)
- * **headers**: eine Karte von Header-Name-Header-Werte. Verwenden Sie ein Array, um mehr als einen Wert anzugeben. Auf iOS, FireOS und Android wenn ein Content-Type-Header vorhanden ist, werden mehrteilige Formulardaten nicht verwendet werden. (Object)
- * **httpMethod**: die HTTP-Methode zu verwenden, z.B. POST oder PUT. Der Standardwert ist `POST`. (DOM-String enthält)
-
- * **TrustAllHosts**: Optionaler Parameter, wird standardmäßig auf `false` . Wenn legen Sie auf `true` , es akzeptiert alle Sicherheitszertifikate. Dies ist nützlich, da Android selbstsignierte Zertifikate ablehnt. Nicht für den produktiven Einsatz empfohlen. Auf Android und iOS unterstützt. *(Boolean)*
-
-### Beispiel
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### Beispiel mit hochladen Kopf- und Progress-Ereignisse (Android und iOS nur)
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-Ein `FileUploadResult`-Objekt wird an den Erfolg-Rückruf des `Objekts FileTransfer`-Upload()-Methode
übergeben.
-
-### Eigenschaften
-
- * **BytesSent**: die Anzahl der Bytes, die als Teil des Uploads an den Server gesendet. (lange)
-
- * **ResponseCode**: die HTTP-Response-Code vom Server zurückgegeben. (lange)
-
- * **response**: der HTTP-Antwort vom Server zurückgegeben. (DOM-String und enthält)
-
- * **Header**: die HTTP-Response-Header vom Server. (Objekt)
-
- * Derzeit unterstützt auf iOS nur.
-
-### iOS Macken
-
- * Unterstützt keine `responseCode` oder`bytesSent`.
-
-## Download
-
-**Parameter**:
-
- * **source**: URL des Servers, um die Datei herunterzuladen, wie kodiert`encodeURI()`.
-
- * **target**: Dateisystem-Url, das die Datei auf dem Gerät. Für rückwärts Kompatibilität, dies kann auch der vollständige Pfad der Datei auf dem Gerät sein. (Siehe [rückwärts Kompatibilität Notes] unten)
-
- * **SuccessCallback**: ein Rückruf, der übergeben wird ein `FileEntry` Objekt. *(Funktion)*
-
- * **errorCallback**: ein Rückruf, der ausgeführt wird, tritt ein Fehler beim Abrufen der `FileEntry`. Mit einem `FileTransferError`-Objekt aufgerufen. *(Funktion)*
-
- * **TrustAllHosts**: Optionaler Parameter, wird standardmäßig auf `false` . Wenn legen Sie auf `true` , es akzeptiert alle Sicherheitszertifikate. Dies ist nützlich, da Android selbstsignierte Zertifikate ablehnt. Nicht für den produktiven Einsatz empfohlen. Auf Android und iOS unterstützt. *(Boolean)*
-
- * **Options**: optionale Parameter, derzeit nur unterstützt Kopfzeilen (z. B. Autorisierung (Standardauthentifizierung), etc.).
-
-### Beispiel
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-### WP8 Macken
-
- * Downloaden anfordert, wird von native Implementierung zwischengespeichert wird. Um zu vermeiden, Zwischenspeicherung, übergeben `If-Modified-Since` Header Methode herunterladen.
-
-## abort
-
-Bricht einen in-Progress-Transfer. Der Onerror-Rückruf wird ein FileTransferError-Objekt übergeben, die einen Fehlercode FileTransferError.ABORT_ERR hat.
-
-### Beispiel
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-Ein `FileTransferError`-Objekt wird an eine Fehler-Callback übergeben, wenn ein Fehler auftritt.
-
-### Eigenschaften
-
- * **Code**: einer der vordefinierten Fehlercodes aufgeführt. (Anzahl)
-
- * **Quelle**: URL der Quelle. (String)
-
- * **Ziel**: URL zum Ziel. (String)
-
- * **HTTP_STATUS**: HTTP-Statuscode. Dieses Attribut ist nur verfügbar, wenn ein Response-Code aus der HTTP-Verbindung eingeht. (Anzahl)
-
- * **body** Antworttext. Dieses Attribut ist nur verfügbar, wenn eine Antwort von der HTTP-Verbindung eingeht. (String)
-
- * **exception**: entweder e.getMessage oder e.toString (String)
-
-### Konstanten
-
- * 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
- * 2 = `FileTransferError.INVALID_URL_ERR`
- * 3 = `FileTransferError.CONNECTION_ERR`
- * 4 = `FileTransferError.ABORT_ERR`
- * 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## Hinweise rückwärts Kompatibilität
-
-Frühere Versionen des Plugins würde nur Gerät-Absolute-Dateipfade als Quelle für Uploads oder als Ziel für Downloads übernehmen. Diese Pfade wäre in der Regel der form
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-Für rückwärts Kompatibilität, diese Pfade noch akzeptiert werden, und wenn Ihre Anwendung Pfade wie diese im permanenten Speicher aufgezeichnet hat, dann sie können weiter verwendet werden.
-
-Diese Pfade waren zuvor in der Eigenschaft `fullPath` `FileEntry` und `DirectoryEntry`-Objekte, die durch das Plugin Datei zurückgegeben ausgesetzt. Neue Versionen der die Datei-Erweiterung, jedoch nicht länger werden diese Pfade zu JavaScript.
-
-Wenn Sie ein auf eine neue Upgrade (1.0.0 oder neuere) Version der Datei, und Sie haben zuvor mit `entry.fullPath` als Argumente `download()` oder `upload()`, dann ändern Sie den Code, um die Dateisystem-URLs verwenden müssen.
-
-`FileEntry.toURL()` und `DirectoryEntry.toURL()` zurück, eine Dateisystem-URL in der form
-
- cdvfile://localhost/persistent/path/to/file
-
-
-die anstelle der absoluten Dateipfad in `download()` und `upload()` Methode verwendet werden kann.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-file-transfer/doc/de/index.md b/plugins/cordova-plugin-file-transfer/doc/de/index.md
deleted file mode 100644
index 4081503..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/de/index.md
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-Dieses Plugin ermöglicht Ihnen zum Hochladen und Herunterladen von Dateien.
-
-Dieses Plugin wird global `FileTransfer`, `FileUploadOptions` Konstruktoren definiert.
-
-Obwohl im globalen Gültigkeitsbereich, sind sie nicht bis nach dem `deviceready`-Ereignis.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## Installation
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## Unterstützte Plattformen
-
-* Amazon Fire OS
-* Android
-* BlackBerry 10
-* Browser
-* Firefox OS **
-* iOS
-* Windows Phone 7 und 8 *
-* Windows 8
-* Windows
-
-* *Unterstützen keine `onprogress` noch `abort()`*
-
-* * *`onprogress` nicht unterstützt*
-
-# FileTransfer
-
-Das `FileTransfer`-Objekt bietet eine Möglichkeit zum Hochladen von Dateien, die mithilfe einer HTTP-Anforderung für mehrteiligen POST sowie Informationen zum Herunterladen von Dateien sowie.
-
-## Eigenschaften
-
-* **OnProgress**: aufgerufen, wobei ein `ProgressEvent` wann wird eine neue Datenmenge übertragen. *(Funktion)*
-
-## Methoden
-
-* **Upload**: sendet eine Datei an einen Server.
-
-* **Download**: lädt eine Datei vom Server.
-
-* **abort**: Abbruch eine Ãœbertragung in Bearbeitung.
-
-## Upload
-
-**Parameter**:
-
-* **FileURL**: Dateisystem-URL, das die Datei auf dem Gerät. Für rückwärts Kompatibilität, dies kann auch der vollständige Pfad der Datei auf dem Gerät sein. (Siehe [rückwärts Kompatibilität Notes] unten)
-
-* **Server**: URL des Servers, die Datei zu empfangen, wie kodiert`encodeURI()`.
-
-* **successCallback**: ein Rückruf, der ein `FileUploadResult`-Objekt übergeben wird. *(Funktion)*
-
-* **errorCallback**: ein Rückruf, der ausgeführt wird, tritt ein Fehler beim Abrufen der `FileUploadResult`. Mit einem `FileTransferError`-Objekt aufgerufen. *(Funktion)*
-
-* **Optionen**: optionale Parameter *(Objekt)*. Gültige Schlüssel:
-
- * **FileKey**: der Name des Form-Elements. Wird standardmäßig auf `file` . (DOM-String und enthält)
- * **Dateiname**: der Dateiname beim Speichern der Datei auf dem Server verwendet. Wird standardmäßig auf `image.jpg` . (DOM-String und enthält)
- * **httpMethod**: die HTTP-Methode, die-entweder `PUT` oder `POST`. Der Standardwert ist `POST`. (DOM-String und enthält)
- * **mimeType**: den Mime-Typ der Daten hochzuladen. Standardwerte auf `Image/Jpeg`. (DOM-String und enthält)
- * **params**: eine Reihe von optionalen Schlüssel/Wert-Paaren in der HTTP-Anforderung übergeben. (Objekt)
- * **chunkedMode**: ob die Daten in "Chunked" streaming-Modus hochladen. Der Standardwert ist `true`. (Boolean)
- * **headers**: eine Karte von Header-Name-Header-Werte. Verwenden Sie ein Array, um mehr als einen Wert anzugeben. (Objekt)
-
-* **TrustAllHosts**: Optionaler Parameter, wird standardmäßig auf `false` . Wenn legen Sie auf `true` , es akzeptiert alle Sicherheitszertifikate. Dies ist nützlich, da Android selbstsignierte Zertifikate ablehnt. Nicht für den produktiven Einsatz empfohlen. Auf Android und iOS unterstützt. *(Boolean)*
-
-### Beispiel
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### Beispiel mit hochladen Kopf- und Progress-Ereignisse (Android und iOS nur)
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-Ein `FileUploadResult`-Objekt wird an den Erfolg-Rückruf des `Objekts FileTransfer`-Upload()-Methode
übergeben.
-
-### Eigenschaften
-
-* **BytesSent**: die Anzahl der Bytes, die als Teil des Uploads an den Server gesendet. (lange)
-
-* **ResponseCode**: die HTTP-Response-Code vom Server zurückgegeben. (lange)
-
-* **response**: der HTTP-Antwort vom Server zurückgegeben. (DOM-String und enthält)
-
-* **Header**: die HTTP-Response-Header vom Server. (Objekt)
-
- * Derzeit unterstützt auf iOS nur.
-
-### iOS Macken
-
-* Unterstützt keine `responseCode` oder`bytesSent`.
-
-## Download
-
-**Parameter**:
-
-* **source**: URL des Servers, um die Datei herunterzuladen, wie kodiert`encodeURI()`.
-
-* **target**: Dateisystem-Url, das die Datei auf dem Gerät. Für rückwärts Kompatibilität, dies kann auch der vollständige Pfad der Datei auf dem Gerät sein. (Siehe [rückwärts Kompatibilität Notes] unten)
-
-* **SuccessCallback**: ein Rückruf, der übergeben wird ein `FileEntry` Objekt. *(Funktion)*
-
-* **errorCallback**: ein Rückruf, der ausgeführt wird, tritt ein Fehler beim Abrufen der `FileEntry`. Mit einem `FileTransferError`-Objekt aufgerufen. *(Funktion)*
-
-* **TrustAllHosts**: Optionaler Parameter, wird standardmäßig auf `false` . Wenn legen Sie auf `true` , es akzeptiert alle Sicherheitszertifikate. Dies ist nützlich, da Android selbstsignierte Zertifikate ablehnt. Nicht für den produktiven Einsatz empfohlen. Auf Android und iOS unterstützt. *(Boolean)*
-
-* **Options**: optionale Parameter, derzeit nur unterstützt Kopfzeilen (z. B. Autorisierung (Standardauthentifizierung), etc.).
-
-### Beispiel
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-## abort
-
-Bricht einen in-Progress-Transfer. Der Onerror-Rückruf wird ein FileTransferError-Objekt übergeben, die einen Fehlercode FileTransferError.ABORT_ERR hat.
-
-### Beispiel
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-Ein `FileTransferError`-Objekt wird an eine Fehler-Callback übergeben, wenn ein Fehler auftritt.
-
-### Eigenschaften
-
-* **Code**: einer der vordefinierten Fehlercodes aufgeführt. (Anzahl)
-
-* **Quelle**: URL der Quelle. (String)
-
-* **Ziel**: URL zum Ziel. (String)
-
-* **HTTP_STATUS**: HTTP-Statuscode. Dieses Attribut ist nur verfügbar, wenn ein Response-Code aus der HTTP-Verbindung eingeht. (Anzahl)
-
-* **body** Antworttext. Dieses Attribut ist nur verfügbar, wenn eine Antwort von der HTTP-Verbindung eingeht. (String)
-
-* **exception**: entweder e.getMessage oder e.toString (String)
-
-### Konstanten
-
-* 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
-* 2 = `FileTransferError.INVALID_URL_ERR`
-* 3 = `FileTransferError.CONNECTION_ERR`
-* 4 = `FileTransferError.ABORT_ERR`
-* 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## Hinweise rückwärts Kompatibilität
-
-Frühere Versionen des Plugins würde nur Gerät-Absolute-Dateipfade als Quelle für Uploads oder als Ziel für Downloads übernehmen. Diese Pfade wäre in der Regel der form
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-Für rückwärts Kompatibilität, diese Pfade noch akzeptiert werden, und wenn Ihre Anwendung Pfade wie diese im permanenten Speicher aufgezeichnet hat, dann sie können weiter verwendet werden.
-
-Diese Pfade waren zuvor in der Eigenschaft `fullPath` `FileEntry` und `DirectoryEntry`-Objekte, die durch das Plugin Datei zurückgegeben ausgesetzt. Neue Versionen der die Datei-Erweiterung, jedoch nicht länger werden diese Pfade zu JavaScript.
-
-Wenn Sie ein auf eine neue Upgrade (1.0.0 oder neuere) Version der Datei, und Sie haben zuvor mit `entry.fullPath` als Argumente `download()` oder `upload()`, dann ändern Sie den Code, um die Dateisystem-URLs verwenden müssen.
-
-`FileEntry.toURL()` und `DirectoryEntry.toURL()` zurück, eine Dateisystem-URL in der form
-
- cdvfile://localhost/persistent/path/to/file
-
-
-die anstelle der absoluten Dateipfad in `download()` und `upload()` Methode verwendet werden kann.
diff --git a/plugins/cordova-plugin-file-transfer/doc/es/README.md b/plugins/cordova-plugin-file-transfer/doc/es/README.md
deleted file mode 100644
index 1c8ee3f..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/es/README.md
+++ /dev/null
@@ -1,311 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg)](https://travis-ci.org/apache/cordova-plugin-file-transfer)
-
-Documentación del plugin:
-
-Este plugin te permite cargar y descargar archivos.
-
-Este plugin define global `FileTransfer` , `FileUploadOptions` constructores.
-
-Aunque en el ámbito global, no están disponibles hasta después de la `deviceready` evento.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## Instalación
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## Plataformas soportadas
-
- * Amazon fire OS
- * Android
- * BlackBerry 10
- * Explorador
- * Firefox OS **
- * iOS
- * Windows Phone 7 y 8 *
- * Windows 8
- * Windows
-
-\ * *No soporta `onprogress` ni `abort()` *
-
-\ ** *No soporta `onprogress` *
-
-# FileTransfer
-
-El objeto `FileTransfer` proporciona una manera para subir archivos utilizando una varias parte solicitud HTTP POST o PUT y descargar archivos, asÃ.
-
-## Propiedades
-
- * **OnProgress**: llama con un `ProgressEvent` cuando se transfiere un nuevo paquete de datos. *(Función)*
-
-## Métodos
-
- * **cargar**: envÃa un archivo a un servidor.
-
- * **Descargar**: descarga un archivo del servidor.
-
- * **abortar**: aborta una transferencia en curso.
-
-## subir
-
-**Parámetros**:
-
- * **fileURL**: URL de Filesystem que representa el archivo en el dispositivo. Para atrás compatibilidad, esto también puede ser la ruta de acceso completa del archivo en el dispositivo. (Ver [hacia atrás compatibilidad notas] debajo)
-
- * **servidor**: dirección URL del servidor para recibir el archivo, como codificada por`encodeURI()`.
-
- * **successCallback**: una devolución de llamada que se pasa un `FileUploadResult` objeto. *(Función)*
-
- * **errorCallback**: una devolución de llamada que se ejecuta si se produce un error recuperar la `FileUploadResult` . Invocado con un `FileTransferError` objeto. *(Función)*
-
- * **Opciones**: parámetros opcionales *(objeto)*. Teclas válidas:
-
- * **fileKey**: el nombre del elemento de formulario. Por defecto es `file` . (DOMString)
- * **nombre de archivo**: el nombre del archivo a utilizar al guardar el archivo en el servidor. Por defecto es `image.jpg` . (DOMString)
- * **httpMethod**: método HTTP el utilizar - o `PUT` o `POST` . Por defecto es `POST` . (DOMString)
- * **mimeType**: el tipo mime de los datos para cargar. Por defecto es `image/jpeg` . (DOMString)
- * **params**: un conjunto de pares clave/valor opcional para pasar en la petición HTTP. (Objeto)
- * **chunkedMode**: Si desea cargar los datos en modo de transmisión fragmentado. Por defecto es `true` . (Boolean)
- * **headers**: un mapa de nombre de encabezado/valores de encabezado Utilice una matriz para especificar más de un valor. En iOS FireOS y Android, si existe un encabezado llamado Content-Type, datos de un formulario multipart no se utilizará. (Object)
- * **httpMethod**: HTTP el método a utilizar por ejemplo POST o poner. Por defecto `el POST`. (DOMString)
-
- * **trustAllHosts**: parámetro opcional, por defecto es `false` . Si establece en `true` , acepta todos los certificados de seguridad. Esto es útil ya que Android rechaza certificados autofirmados seguridad. No se recomienda para uso productivo. Compatible con iOS y Android. *(boolean)*
-
-### Ejemplo
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### Ejemplo con cabeceras de subir y eventos de progreso (Android y iOS solamente)
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-A `FileUploadResult` objeto se pasa a la devolución del éxito de la `FileTransfer` del objeto `upload()` método.
-
-### Propiedades
-
- * **bytesSent**: el número de bytes enviados al servidor como parte de la carga. (largo)
-
- * **responseCode**: código de respuesta HTTP el devuelto por el servidor. (largo)
-
- * **respuesta**: respuesta el HTTP devuelto por el servidor. (DOMString)
-
- * **cabeceras**: cabeceras de respuesta HTTP el por el servidor. (Objeto)
-
- * Actualmente compatible con iOS solamente.
-
-### iOS rarezas
-
- * No es compatible con `responseCode` o`bytesSent`.
-
-## descargar
-
-**Parámetros**:
-
- * **fuente**: dirección URL del servidor para descargar el archivo, como codificada por`encodeURI()`.
-
- * **objetivo**: Filesystem url que representa el archivo en el dispositivo. Para atrás compatibilidad, esto también puede ser la ruta de acceso completa del archivo en el dispositivo. (Ver [hacia atrás compatibilidad notas] debajo)
-
- * **successCallback**: una devolución de llamada que se pasa un `FileEntry` objeto. *(Función)*
-
- * **errorCallback**: una devolución de llamada que se ejecuta si se produce un error al recuperar los `FileEntry` . Invocado con un `FileTransferError` objeto. *(Función)*
-
- * **trustAllHosts**: parámetro opcional, por defecto es `false` . Si establece en `true` , acepta todos los certificados de seguridad. Esto es útil porque Android rechaza certificados autofirmados seguridad. No se recomienda para uso productivo. Compatible con iOS y Android. *(boolean)*
-
- * **Opciones**: parámetros opcionales, actualmente sólo soporta cabeceras (como autorización (autenticación básica), etc.).
-
-### Ejemplo
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-### Rarezas de WP8
-
- * Descargar pide se almacena en caché por aplicación nativa. Para evitar el almacenamiento en caché, pasar `if-Modified-Since` encabezado para descargar el método.
-
-## abortar
-
-Aborta a una transferencia en curso. El callback onerror se pasa un objeto FileTransferError que tiene un código de error de FileTransferError.ABORT_ERR.
-
-### Ejemplo
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-A `FileTransferError` objeto se pasa a un callback de error cuando se produce un error.
-
-### Propiedades
-
- * **código**: uno de los códigos de error predefinido enumerados a continuación. (Número)
-
- * **fuente**: URL a la fuente. (String)
-
- * **objetivo**: URL a la meta. (String)
-
- * **HTTP_STATUS**: código de estado HTTP. Este atributo sólo está disponible cuando se recibe un código de respuesta de la conexión HTTP. (Número)
-
- * **cuerpo** Cuerpo de la respuesta. Este atributo sólo está disponible cuando se recibe una respuesta de la conexión HTTP. (String)
-
- * **excepción**: cualquier e.getMessage o e.toString (String)
-
-### Constantes
-
- * 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
- * 2 = `FileTransferError.INVALID_URL_ERR`
- * 3 = `FileTransferError.CONNECTION_ERR`
- * 4 = `FileTransferError.ABORT_ERR`
- * 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## Al revés notas de compatibilidad
-
-Versiones anteriores de este plugin sólo aceptarÃa dispositivo-absoluto-archivo-rutas como la fuente de carga, o como destino para las descargas. Estos caminos normalmente serÃa de la forma
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-Para atrás compatibilidad, estos caminos son aceptados todavÃa, y si su solicitud ha grabado caminos como éstos en almacenamiento persistente, entonces pueden seguir utilizarse.
-
-Estos caminos fueron expuestos anteriormente en el `fullPath` propiedad de `FileEntry` y `DirectoryEntry` objetos devueltos por el plugin de archivo. Las nuevas versiones del archivo plugin, sin embargo, ya no exponen estos caminos a JavaScript.
-
-Si va a actualizar a una nueva (1.0.0 o más reciente) versión del archivo y previamente han estado utilizando `entry.fullPath` como argumentos para `download()` o `upload()` , entonces tendrá que cambiar su código para usar URLs de sistema de archivos en su lugar.
-
-`FileEntry.toURL()`y `DirectoryEntry.toURL()` devolver un filesystem dirección URL de la forma
-
- cdvfile://localhost/persistent/path/to/file
-
-
-que puede ser utilizado en lugar de la ruta del archivo absoluta tanto en `download()` y `upload()` los métodos.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-file-transfer/doc/es/index.md b/plugins/cordova-plugin-file-transfer/doc/es/index.md
deleted file mode 100644
index 981c991..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/es/index.md
+++ /dev/null
@@ -1,262 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-Este plugin te permite cargar y descargar archivos.
-
-Este plugin define global `FileTransfer` , `FileUploadOptions` constructores.
-
-Aunque en el ámbito global, no están disponibles hasta después de la `deviceready` evento.
-
- document.addEventListener ("deviceready", onDeviceReady, false);
- function onDeviceReady() {console.log(FileTransfer)};
-
-
-## Instalación
-
- Cordova plugin añade cordova-plugin-file-transferencia
-
-
-## Plataformas soportadas
-
-* Amazon fire OS
-* Android
-* BlackBerry 10
-* Explorador
-* Firefox OS **
-* iOS
-* Windows Phone 7 y 8 *
-* Windows 8
-* Windows
-
-* *No son compatibles con `onprogress` ni `abort()` *
-
-** *No son compatibles con `onprogress` *
-
-# FileTransfer
-
-El `FileTransfer` objeto proporciona una manera de subir archivos mediante una solicitud HTTP de POST varias parte y para descargar archivos.
-
-## Propiedades
-
-* **OnProgress**: llama con un `ProgressEvent` cuando se transfiere un nuevo paquete de datos. *(Función)*
-
-## Métodos
-
-* **cargar**: envÃa un archivo a un servidor.
-
-* **Descargar**: descarga un archivo del servidor.
-
-* **abortar**: aborta una transferencia en curso.
-
-## subir
-
-**Parámetros**:
-
-* **fileURL**: URL de Filesystem que representa el archivo en el dispositivo. Para atrás compatibilidad, esto también puede ser la ruta de acceso completa del archivo en el dispositivo. (Ver [hacia atrás compatibilidad notas] debajo)
-
-* **servidor**: dirección URL del servidor para recibir el archivo, como codificada por`encodeURI()`.
-
-* **successCallback**: una devolución de llamada que se pasa un `FileUploadResult` objeto. *(Función)*
-
-* **errorCallback**: una devolución de llamada que se ejecuta si se produce un error recuperar la `FileUploadResult` . Invocado con un `FileTransferError` objeto. *(Función)*
-
-* **Opciones**: parámetros opcionales *(objeto)*. Teclas válidas:
-
- * **fileKey**: el nombre del elemento de formulario. Por defecto es `file` . (DOMString)
- * **nombre de archivo**: el nombre del archivo a utilizar al guardar el archivo en el servidor. Por defecto es `image.jpg` . (DOMString)
- * **httpMethod**: método HTTP el utilizar - o `PUT` o `POST` . Por defecto es `POST` . (DOMString)
- * **mimeType**: el tipo mime de los datos para cargar. Por defecto es `image/jpeg` . (DOMString)
- * **params**: un conjunto de pares clave/valor opcional para pasar en la petición HTTP. (Objeto)
- * **chunkedMode**: Si desea cargar los datos en modo de transmisión fragmentado. Por defecto es `true` . (Boolean)
- * **cabeceras**: un mapa de valores de encabezado nombre/cabecera. Utilice una matriz para especificar más de un valor. (Objeto)
-
-* **trustAllHosts**: parámetro opcional, por defecto es `false` . Si establece en `true` , acepta todos los certificados de seguridad. Esto es útil ya que Android rechaza certificados autofirmados seguridad. No se recomienda para uso productivo. Compatible con iOS y Android. *(boolean)*
-
-### Ejemplo
-
- // !! Asume fileURL variable contiene una dirección URL válida a un archivo de texto en el dispositivo, / / por ejemplo, ganar var cdvfile://localhost/persistent/path/to/file.txt = function (r) {console.log ("código =" + r.responseCode);
- Console.log ("respuesta =" + r.response);
- Console.log ("Sent =" + r.bytesSent);}
-
- var fallar = function (error) {alert ("ha ocurrido un error: código =" + error.code);
- Console.log ("error al cargar el origen" + error.source);
- Console.log ("upload error objetivo" + error.target);}
-
- var opciones = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "prueba";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- Ft.upload (fileURL, encodeURI ("http://some.server.com/upload.php"), win, fail, opciones);
-
-
-### Ejemplo con cabeceras de subir y eventos de progreso (Android y iOS solamente)
-
- function win(r) {console.log ("código =" + r.responseCode);
- Console.log ("respuesta =" + r.response);
- Console.log ("Sent =" + r.bytesSent);}
-
- function fail(error) {alert ("ha ocurrido un error: código =" + error.code);
- Console.log ("error al cargar el origen" + error.source);
- Console.log ("upload error objetivo" + error.target);}
-
- var uri = encodeURI ("http://some.server.com/upload.php");
-
- var opciones = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- cabeceras de var ={'headerParam':'headerValue'};
-
- options.headers = encabezados;
-
- var ft = new FileTransfer();
- Ft.OnProgress = function(progressEvent) {si (progressEvent.lengthComputable) {loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } {loadingStatus.increment() más;
- }
- };
- Ft.upload (fileURL, uri, win, fail, opciones);
-
-
-## FileUploadResult
-
-A `FileUploadResult` objeto se pasa a la devolución del éxito de la `FileTransfer` del objeto `upload()` método.
-
-### Propiedades
-
-* **bytesSent**: el número de bytes enviados al servidor como parte de la carga. (largo)
-
-* **responseCode**: código de respuesta HTTP el devuelto por el servidor. (largo)
-
-* **respuesta**: respuesta el HTTP devuelto por el servidor. (DOMString)
-
-* **cabeceras**: cabeceras de respuesta HTTP el por el servidor. (Objeto)
-
- * Actualmente compatible con iOS solamente.
-
-### iOS rarezas
-
-* No es compatible con `responseCode` o`bytesSent`.
-
-## descargar
-
-**Parámetros**:
-
-* **fuente**: dirección URL del servidor para descargar el archivo, como codificada por`encodeURI()`.
-
-* **objetivo**: Filesystem url que representa el archivo en el dispositivo. Para atrás compatibilidad, esto también puede ser la ruta de acceso completa del archivo en el dispositivo. (Ver [hacia atrás compatibilidad notas] debajo)
-
-* **successCallback**: una devolución de llamada que se pasa un `FileEntry` objeto. *(Función)*
-
-* **errorCallback**: una devolución de llamada que se ejecuta si se produce un error al recuperar los `FileEntry` . Invocado con un `FileTransferError` objeto. *(Función)*
-
-* **trustAllHosts**: parámetro opcional, por defecto es `false` . Si establece en `true` , acepta todos los certificados de seguridad. Esto es útil porque Android rechaza certificados autofirmados seguridad. No se recomienda para uso productivo. Compatible con iOS y Android. *(boolean)*
-
-* **Opciones**: parámetros opcionales, actualmente sólo soporta cabeceras (como autorización (autenticación básica), etc.).
-
-### Ejemplo
-
- // !! Asume fileURL variable contiene una dirección URL válida a un camino en el dispositivo, / / por ejemplo, File Transfer var cdvfile://localhost/persistent/path/to/downloads/ = new FileTransfer();
- var uri = encodeURI ("http://some.server.com/download.php");
-
- fileTransfer.download (uri, fileURL, function(entry) {console.log ("descarga completa:" + entry.toURL());
- }, function(error) {console.log ("error al descargar el origen" + error.source);
- Console.log ("descargar error objetivo" + error.target);
- Console.log ("código de error de carga" + error.code);
- }, falso, {encabezados: {"Autorización": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA =="}});
-
-
-## abortar
-
-Aborta a una transferencia en curso. El callback onerror se pasa un objeto FileTransferError que tiene un código de error de FileTransferError.ABORT_ERR.
-
-### Ejemplo
-
- // !! Asume fileURL variable contiene una dirección URL válida a un archivo de texto en el dispositivo, / / por ejemplo, ganar cdvfile://localhost/persistent/path/to/file.txt var function(r) = {console.log ("no se debe llamar.");}
-
- var fallar = function(error) {/ / error.code == FileTransferError.ABORT_ERR alert ("ha ocurrido un error: código =" + error.code);
- Console.log ("error al cargar el origen" + error.source);
- Console.log ("upload error objetivo" + error.target);}
-
- var opciones = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- Ft.upload (fileURL, encodeURI ("http://some.server.com/upload.php"), win, fail, opciones);
- Ft.Abort();
-
-
-## FileTransferError
-
-A `FileTransferError` objeto se pasa a un callback de error cuando se produce un error.
-
-### Propiedades
-
-* **código**: uno de los códigos de error predefinido enumerados a continuación. (Número)
-
-* **fuente**: URL a la fuente. (String)
-
-* **objetivo**: URL a la meta. (String)
-
-* **HTTP_STATUS**: código de estado HTTP. Este atributo sólo está disponible cuando se recibe un código de respuesta de la conexión HTTP. (Número)
-
-* **cuerpo** Cuerpo de la respuesta. Este atributo sólo está disponible cuando se recibe una respuesta de la conexión HTTP. (String)
-
-* **excepción**: cualquier e.getMessage o e.toString (String)
-
-### Constantes
-
-* 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
-* 2 = `FileTransferError.INVALID_URL_ERR`
-* 3 = `FileTransferError.CONNECTION_ERR`
-* 4 = `FileTransferError.ABORT_ERR`
-* 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## Al revés notas de compatibilidad
-
-Versiones anteriores de este plugin sólo aceptarÃa dispositivo-absoluto-archivo-rutas como la fuente de carga, o como destino para las descargas. Estos caminos normalmente serÃa de la forma
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-Para atrás compatibilidad, estos caminos son aceptados todavÃa, y si su solicitud ha grabado caminos como éstos en almacenamiento persistente, entonces pueden seguir utilizarse.
-
-Estos caminos fueron expuestos anteriormente en el `fullPath` propiedad de `FileEntry` y `DirectoryEntry` objetos devueltos por el plugin de archivo. Las nuevas versiones del archivo plugin, sin embargo, ya no exponen estos caminos a JavaScript.
-
-Si va a actualizar a una nueva (1.0.0 o más reciente) versión del archivo y previamente han estado utilizando `entry.fullPath` como argumentos para `download()` o `upload()` , entonces tendrá que cambiar su código para usar URLs de sistema de archivos en su lugar.
-
-`FileEntry.toURL()`y `DirectoryEntry.toURL()` devolver un filesystem dirección URL de la forma
-
- cdvfile://localhost/persistent/path/to/file
-
-
-que puede ser utilizado en lugar de la ruta del archivo absoluta tanto en `download()` y `upload()` los métodos.
diff --git a/plugins/cordova-plugin-file-transfer/doc/fr/README.md b/plugins/cordova-plugin-file-transfer/doc/fr/README.md
deleted file mode 100644
index ca3e18a..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/fr/README.md
+++ /dev/null
@@ -1,270 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg)](https://travis-ci.org/apache/cordova-plugin-file-transfer)
-
-Documentation du plugin :
-
-Ce plugin vous permet de télécharger des fichiers.
-
-Ce plugin définit global `FileTransfer` , `FileUploadOptions` constructeurs.
-
-Bien que dans la portée globale, ils ne sont pas disponibles jusqu'après la `deviceready` événement.
-
- document.addEventListener (« deviceready », onDeviceReady, false) ;
- function onDeviceReady() {console.log(FileTransfer);}
-
-
-## Installation
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## Plates-formes supportées
-
- * Amazon Fire OS
- * Android
- * BlackBerry 10
- * Navigateur
- * Firefox OS **
- * iOS
- * Windows Phone 7 et 8 *
- * Windows 8
- * Windows
-
-\ * *Ne supportent pas `onprogress` ni `abort()` *
-
-\ ** *Ne prennent pas en charge les `onprogress` *
-
-# Transfert de fichiers
-
-L'objet de `FileTransfer` fournit un moyen de télécharger des fichiers à l'aide d'une requête HTTP multi-part POST ou PUT et pour télécharger des fichiers.
-
-## Propriétés
-
- * **onprogress** : fonction appelée avec un `ProgressEvent` à chaque fois qu'un nouveau segment de données est transféré. *(Function)*
-
-## Méthodes
-
- * **upload** : envoie un fichier à un serveur.
-
- * **download** : télécharge un fichier depuis un serveur.
-
- * **abort** : annule le transfert en cours.
-
-## upload
-
-**Paramètres**:
-
- * **fileURL** : système de fichiers URL représentant le fichier sur le périphérique. Pour la compatibilité ascendante, cela peut aussi être le chemin complet du fichier sur le périphérique. (Voir [Backwards Compatibility Notes] ci-dessous)
-
- * **server** : l'URL du serveur destiné à recevoir le fichier, encodée via `encodeURI()`.
-
- * **successCallback**: un rappel passé un `FileUploadResult` objet. *(Fonction)*
-
- * **errorCallback**: un rappel qui s'exécute si une erreur survient récupérer la `FileUploadResult` . Appelée avec un `FileTransferError` objet. *(Fonction)*
-
- * **options**: paramètres facultatifs *(objet)*. Clés valides :
-
- * **fileKey**: le nom de l'élément form. Valeur par défaut est `file` . (DOMString)
- * **fileName**: le nom de fichier à utiliser lorsque vous enregistrez le fichier sur le serveur. Valeur par défaut est `image.jpg` . (DOMString)
- * **httpMethod**: méthode de The HTTP à utiliser - soit `PUT` ou `POST` . Valeur par défaut est `POST` . (DOMString)
- * **type MIME**: le type mime des données à télécharger. Valeur par défaut est `image/jpeg` . (DOMString)
- * **params**: un ensemble de paires clé/valeur facultative pour passer dans la requête HTTP. (Objet)
- * **chunkedMode**: s'il faut télécharger les données en mode streaming mémorisé en bloc. Valeur par défaut est `true` . (Boolean)
- * **headers**: une carte des valeurs d'en-tête en-tête/nom. Un tableau permet de spécifier plusieurs valeurs. Sur iOS, FireOS et Android, si un en-tête nommé Content-Type n'est présent, les données de formulaire multipart servira pas. (Object)
- * **httpMethod**: The HTTP méthode à utiliser par exemple poster ou mis. Par défaut, `message`. (DOMString)
-
- * **trustAllHosts**: paramètre facultatif, valeur par défaut est `false` . Si la valeur est `true` , il accepte tous les certificats de sécurité. Ceci est utile car Android rejette des certificats auto-signés. N'est pas recommandé pour une utilisation en production. Supporté sur Android et iOS. *(booléen)*
-
-### Exemple
-
- // !! Suppose fileURL variable contient une URL valide dans un fichier texte sur le périphérique, / / par exemple, cdvfile://localhost/persistent/path/to/file.txt var win = function (r) {console.log ("Code =" + r.responseCode) ;
- Console.log ("réponse =" + r.response) ;
- Console.log ("envoyés =" + r.bytesSent);}
-
- échouer var = function (erreur) {alert ("une erreur est survenue : Code =" + error.code) ;
- Console.log (« source de l'erreur de téléchargement » + error.source) ;
- Console.log ("erreur de téléchargement cible" + error.target);}
-
- options de var = new FileUploadOptions() ;
- options.fileKey = « fichier » ;
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1) ;
- options.mimeType = « text/plain » ;
-
- var params = {} ;
- params.value1 = « test » ;
- params.Value2 = « param » ;
-
- options.params = params ;
-
- ft var = new FileTransfer() ;
- ft.upload (fileURL, encodeURI ("http://some.server.com/upload.php"), win, fail, options) ;
-
-
-### Exemple avec téléchargement du Header et des Progress Events (Android et iOS uniquement)
-
- function win(r) {console.log ("Code =" + r.responseCode) ;
- Console.log ("réponse =" + r.response) ;
- Console.log ("envoyés =" + r.bytesSent);}
-
- function fail(error) {alert ("une erreur est survenue : Code =" + error.code) ;
- Console.log (« source de l'erreur de téléchargement » + error.source) ;
- Console.log ("erreur de téléchargement cible" + error.target);}
-
- var uri = encodeURI ("http://some.server.com/upload.php") ;
-
- options de var = new FileUploadOptions() ;
- options.fileKey="file" ;
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1) ;
- options.mimeType="text/plain" ;
-
- en-têtes var ={'headerParam':'headerValue'} ;
-
- options.Headers = en-têtes ;
-
- ft var = new FileTransfer() ;
- ft.OnProgress = function(progressEvent) {si (progressEvent.lengthComputable) {loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total) ;
- } else {loadingStatus.increment() ;
- }
- };
- ft.upload (fileURL, uri, win, fail, options) ;
-
-
-## FileUploadResult
-
-A `FileUploadResult` objet est passé au rappel de succès la `FileTransfer` de l'objet `upload()` méthode.
-
-### Propriétés
-
- * **bytesSent** : le nombre d'octets envoyés au serveur dans le cadre du téléchargement. (long)
-
- * **responseCode** : le code de réponse HTTP retourné par le serveur. (long)
-
- * **response** : la réponse HTTP renvoyée par le serveur. (DOMString)
-
- * **en-têtes** : en-têtes de réponse HTTP par le serveur. (Objet)
-
- * Actuellement pris en charge sur iOS seulement.
-
-### Notes au sujet d'iOS
-
- * Ne prend pas en charge les propriétés `responseCode` et `bytesSent`.
-
-## download
-
-**Paramètres**:
-
- * **source** : l'URL du serveur depuis lequel télécharger le fichier, encodée via `encodeURI()`.
-
- * **target** : système de fichiers url représentant le fichier sur le périphérique. Pour la compatibilité ascendante, cela peut aussi être le chemin complet du fichier sur le périphérique. (Voir [Backwards Compatibility Notes] ci-dessous)
-
- * **successCallback** : une callback de succès à laquelle est passée un objet `FileEntry`. *(Function)*
-
- * **errorCallback**: un rappel qui s'exécute si une erreur se produit lors de la récupération du `FileEntry` . Appelée avec un `FileTransferError` objet. *(Fonction)*
-
- * **trustAllHosts**: paramètre facultatif, valeur par défaut est `false` . Si la valeur est `true` , il accepte tous les certificats de sécurité. Ceci peut être utile car Android rejette les certificats auto-signés. N'est pas recommandé pour une utilisation en production. Supporté sur Android et iOS. *(booléen)*
-
- * **options** : paramètres facultatifs, seules les en-têtes sont actuellement supportées (par exemple l'autorisation (authentification basique), etc.).
-
-### Exemple
-
- // !! Suppose fileURL variable contient une URL valide vers un chemin d'accès sur le périphérique, / / par exemple, transfert de fichiers var cdvfile://localhost/persistent/path/to/downloads/ = new FileTransfer() ;
- var uri = encodeURI ("http://some.server.com/download.php") ;
-
- fileTransfer.download (uri, fileURL, function(entry) {console.log ("téléchargement complet:" + entry.toURL()) ;
- }, function(error) {console.log (« source de l'erreur de téléchargement » + error.source) ;
- Console.log (« erreur de téléchargement cible » + error.target) ;
- Console.log (« code d'erreur de téléchargement » + error.code) ;
- }, faux, {en-têtes: {« Autorisation »: « dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA base == "}}) ;
-
-
-### Quirks wp8
-
- * Télécharger demande est mis en cache par l'implémentation native. Pour éviter la mise en cache, pass `if-Modified-Since` en-tête Télécharger méthode.
-
-## abort
-
-Abandonne un transfert en cours. Le rappel onerror est passé à un objet FileTransferError qui a un code d'erreur de FileTransferError.ABORT_ERR.
-
-### Exemple
-
- // !! Suppose fileURL variable contient une URL valide dans un fichier texte sur le périphérique, / / par exemple, cdvfile://localhost/persistent/path/to/file.txt var win = function(r) {console.log ("ne devrait pas être appelée.");}
-
- var fail = function(error) {/ / error.code == FileTransferError.ABORT_ERR alert ("une erreur est survenue : Code =" + error.code) ;
- Console.log (« source de l'erreur de téléchargement » + error.source) ;
- Console.log ("erreur de téléchargement cible" + error.target);}
-
- options de var = new FileUploadOptions() ;
- options.fileKey="file" ;
- options.fileName="myphoto.jpg" ;
- options.mimeType="image/jpeg" ;
-
- ft var = new FileTransfer() ;
- ft.upload (fileURL, encodeURI ("http://some.server.com/upload.php"), win, fail, options) ;
- ft.Abort() ;
-
-
-## FileTransferError
-
-A `FileTransferError` objet est passé à un rappel d'erreur lorsqu'une erreur survient.
-
-### Propriétés
-
- * **code** : l'un des codes d'erreur prédéfinis énumérés ci-dessous. (Number)
-
- * **source** : l'URI de la source. (String)
-
- * **target**: l'URI de la destination. (String)
-
- * **http_status** : code d'état HTTP. Cet attribut n'est disponible que lorsqu'un code de réponse est fourni via la connexion HTTP. (Number)
-
- * **corps** Corps de réponse. Cet attribut n'est disponible que lorsqu'une réponse est reçue de la connexion HTTP. (String)
-
- * **exception**: soit e.getMessage ou e.toString (String)
-
-### Constantes
-
- * 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
- * 2 = `FileTransferError.INVALID_URL_ERR`
- * 3 = `FileTransferError.CONNECTION_ERR`
- * 4 = `FileTransferError.ABORT_ERR`
- * 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## Backwards Compatibility Notes
-
-Les versions précédentes de ce plugin n'accepterait périphérique--fichier-chemins d'accès absolus comme source pour les téléchargements, ou comme cible pour les téléchargements. Ces chemins seraient généralement de la forme
-
- / var/mobile/Applications/< application UUID >/Documents/chemin/vers/fichier (iOS), /storage/emulated/0/path/to/file (Android)
-
-
-Pour vers l'arrière la compatibilité, ces chemins sont toujours acceptés, et si votre application a enregistré des chemins comme celles-ci dans un stockage persistant, alors ils peuvent continuer à être utilisé.
-
-Ces chemins ont été précédemment exposés dans le `fullPath` propriété de `FileEntry` et `DirectoryEntry` les objets retournés par le fichier plugin. Nouvelles versions du fichier plugin, cependant, ne plus exposent ces chemins à JavaScript.
-
-Si vous migrez vers une nouvelle (1.0.0 ou plus récent) version de fichier et vous avez précédemment utilisé `entry.fullPath` comme arguments à `download()` ou `upload()` , alors vous aurez besoin de modifier votre code pour utiliser le système de fichiers URL au lieu de cela.
-
-`FileEntry.toURL()`et `DirectoryEntry.toURL()` retournent une URL de système de fichiers du formulaire
-
- cdvfile://localhost/persistent/path/to/file
-
-
-qui peut être utilisé à la place le chemin d'accès absolu au fichier dans les deux `download()` et `upload()` méthodes.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-file-transfer/doc/fr/index.md b/plugins/cordova-plugin-file-transfer/doc/fr/index.md
deleted file mode 100644
index 6b2bce0..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/fr/index.md
+++ /dev/null
@@ -1,261 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-Ce plugin vous permet de télécharger des fichiers.
-
-Ce plugin définit global `FileTransfer` , `FileUploadOptions` constructeurs.
-
-Bien que dans la portée globale, ils ne sont pas disponibles jusqu'après la `deviceready` événement.
-
- document.addEventListener (« deviceready », onDeviceReady, false) ;
- function onDeviceReady() {console.log(FileTransfer);}
-
-
-## Installation
-
- Cordova plugin ajouter cordova-plugin-file-transfert
-
-
-## Plates-formes prises en charge
-
-* Amazon Fire OS
-* Android
-* BlackBerry 10
-* Navigateur
-* Firefox OS **
-* iOS
-* Windows Phone 7 et 8 *
-* Windows 8
-* Windows
-
-* *Ne supportent pas `onprogress` ni `abort()` *
-
-** *Ne prennent pas en charge `onprogress` *
-
-# Transfert de fichiers
-
-Le `FileTransfer` objet fournit un moyen de télécharger des fichiers à l'aide d'une requête HTTP de la poste plusieurs partie et pour télécharger des fichiers aussi bien.
-
-## Propriétés
-
-* **onprogress** : fonction appelée avec un `ProgressEvent` à chaque fois qu'un nouveau segment de données est transféré. *(Function)*
-
-## Méthodes
-
-* **upload** : envoie un fichier à un serveur.
-
-* **download** : télécharge un fichier depuis un serveur.
-
-* **abort** : annule le transfert en cours.
-
-## upload
-
-**Paramètres**:
-
-* **fileURL** : système de fichiers URL représentant le fichier sur le périphérique. Pour la compatibilité ascendante, cela peut aussi être le chemin complet du fichier sur le périphérique. (Voir [Backwards Compatibility Notes] ci-dessous)
-
-* **server** : l'URL du serveur destiné à recevoir le fichier, encodée via `encodeURI()`.
-
-* **successCallback**: un rappel passé un `FileUploadResult` objet. *(Fonction)*
-
-* **errorCallback**: un rappel qui s'exécute si une erreur survient récupérer la `FileUploadResult` . Appelée avec un `FileTransferError` objet. *(Fonction)*
-
-* **options**: paramètres facultatifs *(objet)*. Clés valides :
-
- * **fileKey**: le nom de l'élément form. Valeur par défaut est `file` . (DOMString)
- * **fileName**: le nom de fichier à utiliser lorsque vous enregistrez le fichier sur le serveur. Valeur par défaut est `image.jpg` . (DOMString)
- * **httpMethod**: méthode de The HTTP à utiliser - soit `PUT` ou `POST` . Valeur par défaut est `POST` . (DOMString)
- * **type MIME**: le type mime des données à télécharger. Valeur par défaut est `image/jpeg` . (DOMString)
- * **params**: un ensemble de paires clé/valeur facultative pour passer dans la requête HTTP. (Objet)
- * **chunkedMode**: s'il faut télécharger les données en mode streaming mémorisé en bloc. Valeur par défaut est `true` . (Boolean)
- * **en-têtes**: une carte des valeurs d'en-tête en-tête/nom. Un tableau permet de spécifier plusieurs valeurs. (Objet)
-
-* **trustAllHosts**: paramètre facultatif, valeur par défaut est `false` . Si la valeur `true` , il accepte tous les certificats de sécurité. Ceci est utile car Android rejette des certificats auto-signés. Non recommandé pour une utilisation de production. Supporté sur Android et iOS. *(boolean)*
-
-### Exemple
-
- // !! Suppose fileURL variable contient une URL valide dans un fichier texte sur le périphérique, / / par exemple, cdvfile://localhost/persistent/path/to/file.txt var win = function (r) {console.log ("Code =" + r.responseCode) ;
- Console.log ("réponse =" + r.response) ;
- Console.log ("envoyés =" + r.bytesSent);}
-
- échouer var = function (erreur) {alert ("une erreur est survenue : Code =" + error.code) ;
- Console.log (« source de l'erreur de téléchargement » + error.source) ;
- Console.log ("erreur de téléchargement cible" + error.target);}
-
- options de var = new FileUploadOptions() ;
- options.fileKey = « fichier » ;
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1) ;
- options.mimeType = « text/plain » ;
-
- var params = {} ;
- params.value1 = « test » ;
- params.Value2 = « param » ;
-
- options.params = params ;
-
- ft var = new FileTransfer() ;
- ft.upload (fileURL, encodeURI ("http://some.server.com/upload.php"), win, fail, options) ;
-
-
-### Exemple avec téléchargement du Header et des Progress Events (Android et iOS uniquement)
-
- function win(r) {console.log ("Code =" + r.responseCode) ;
- Console.log ("réponse =" + r.response) ;
- Console.log ("envoyés =" + r.bytesSent);}
-
- function fail(error) {alert ("une erreur est survenue : Code =" + error.code) ;
- Console.log (« source de l'erreur de téléchargement » + error.source) ;
- Console.log ("erreur de téléchargement cible" + error.target);}
-
- var uri = encodeURI ("http://some.server.com/upload.php") ;
-
- options de var = new FileUploadOptions() ;
- options.fileKey="file" ;
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1) ;
- options.mimeType="text/plain" ;
-
- en-têtes var ={'headerParam':'headerValue'} ;
-
- options.Headers = en-têtes ;
-
- ft var = new FileTransfer() ;
- ft.OnProgress = function(progressEvent) {si (progressEvent.lengthComputable) {loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total) ;
- } else {loadingStatus.increment() ;
- }
- };
- ft.upload (fileURL, uri, win, fail, options) ;
-
-
-## FileUploadResult
-
-A `FileUploadResult` objet est passé au rappel de succès la `FileTransfer` de l'objet `upload()` méthode.
-
-### Propriétés
-
-* **bytesSent** : le nombre d'octets envoyés au serveur dans le cadre du téléchargement. (long)
-
-* **responseCode** : le code de réponse HTTP retourné par le serveur. (long)
-
-* **response** : la réponse HTTP renvoyée par le serveur. (DOMString)
-
-* **en-têtes** : en-têtes de réponse HTTP par le serveur. (Objet)
-
- * Actuellement pris en charge sur iOS seulement.
-
-### iOS Remarques
-
-* Ne prend pas en charge les propriétés `responseCode` et `bytesSent`.
-
-## download
-
-**Paramètres**:
-
-* **source** : l'URL du serveur depuis lequel télécharger le fichier, encodée via `encodeURI()`.
-
-* **target** : système de fichiers url représentant le fichier sur le périphérique. Pour vers l'arrière la compatibilité, cela peut aussi être le chemin d'accès complet du fichier sur le périphérique. (Voir [vers l'arrière compatibilité note] ci-dessous)
-
-* **successCallback** : une callback de succès à laquelle est passée un objet `FileEntry`. *(Function)*
-
-* **errorCallback**: un rappel qui s'exécute si une erreur se produit lors de la récupération du `FileEntry` . Appelée avec un `FileTransferError` objet. *(Fonction)*
-
-* **trustAllHosts**: paramètre facultatif, valeur par défaut est `false` . Si la valeur est `true` , il accepte tous les certificats de sécurité. Ceci peut être utile car Android rejette les certificats auto-signés. N'est pas recommandé pour une utilisation en production. Supporté sur Android et iOS. *(booléen)*
-
-* **options** : paramètres facultatifs, seules les en-têtes sont actuellement supportées (par exemple l'autorisation (authentification basique), etc.).
-
-### Exemple
-
- // !! Suppose fileURL variable contient une URL valide vers un chemin d'accès sur le périphérique, / / par exemple, transfert de fichiers var cdvfile://localhost/persistent/path/to/downloads/ = new FileTransfer() ;
- var uri = encodeURI ("http://some.server.com/download.php") ;
-
- fileTransfer.download (uri, fileURL, function(entry) {console.log ("téléchargement complet:" + entry.toURL()) ;
- }, function(error) {console.log (« source de l'erreur de téléchargement » + error.source) ;
- Console.log (« erreur de téléchargement cible » + error.target) ;
- Console.log (« code d'erreur de téléchargement » + error.code) ;
- }, faux, {en-têtes: {« Autorisation »: « dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA base == "}}) ;
-
-
-## abort
-
-Abandonne un transfert en cours. Le rappel onerror est passé à un objet FileTransferError qui a un code d'erreur de FileTransferError.ABORT_ERR.
-
-### Exemple
-
- // !! Suppose fileURL variable contient une URL valide dans un fichier texte sur le périphérique, / / par exemple, cdvfile://localhost/persistent/path/to/file.txt var win = function(r) {console.log ("ne devrait pas être appelée.");}
-
- var fail = function(error) {/ / error.code == FileTransferError.ABORT_ERR alert ("une erreur est survenue : Code =" + error.code) ;
- Console.log (« source de l'erreur de téléchargement » + error.source) ;
- Console.log ("erreur de téléchargement cible" + error.target);}
-
- options de var = new FileUploadOptions() ;
- options.fileKey="file" ;
- options.fileName="myphoto.jpg" ;
- options.mimeType="image/jpeg" ;
-
- ft var = new FileTransfer() ;
- ft.upload (fileURL, encodeURI ("http://some.server.com/upload.php"), win, fail, options) ;
- ft.Abort() ;
-
-
-## FileTransferError
-
-A `FileTransferError` objet est passé à un rappel d'erreur lorsqu'une erreur survient.
-
-### Propriétés
-
-* **code** : l'un des codes d'erreur prédéfinis énumérés ci-dessous. (Number)
-
-* **source** : l'URI de la source. (String)
-
-* **target**: l'URI de la destination. (String)
-
-* **http_status** : code d'état HTTP. Cet attribut n'est disponible que lorsqu'un code de réponse est fourni via la connexion HTTP. (Number)
-
-* **corps** Corps de réponse. Cet attribut n'est disponible que lorsqu'une réponse est reçue de la connexion HTTP. (String)
-
-* **exception**: soit e.getMessage ou e.toString (String)
-
-### Constantes
-
-* 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
-* 2 = `FileTransferError.INVALID_URL_ERR`
-* 3 = `FileTransferError.CONNECTION_ERR`
-* 4 = `FileTransferError.ABORT_ERR`
-* 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## Backwards Compatibility Notes
-
-Les versions précédentes de ce plugin n'accepterait périphérique--fichier-chemins d'accès absolus comme source pour les téléchargements, ou comme cible pour les téléchargements. Ces chemins seraient généralement de la forme
-
- / var/mobile/Applications/< application UUID >/Documents/chemin/vers/fichier (iOS), /storage/emulated/0/path/to/file (Android)
-
-
-Pour vers l'arrière la compatibilité, ces chemins sont toujours acceptés, et si votre application a enregistré des chemins comme celles-ci dans un stockage persistant, alors ils peuvent continuer à être utilisé.
-
-Ces chemins ont été précédemment exposés dans le `fullPath` propriété de `FileEntry` et `DirectoryEntry` les objets retournés par le fichier plugin. Nouvelles versions du fichier plugin, cependant, ne plus exposent ces chemins à JavaScript.
-
-Si vous migrez vers une nouvelle (1.0.0 ou plus récent) version de fichier et vous avez précédemment utilisé `entry.fullPath` comme arguments à `download()` ou `upload()` , alors vous aurez besoin de modifier votre code pour utiliser le système de fichiers URL au lieu de cela.
-
-`FileEntry.toURL()`et `DirectoryEntry.toURL()` retournent une URL de système de fichiers du formulaire
-
- cdvfile://localhost/persistent/path/to/file
-
-
-qui peut être utilisé à la place le chemin d'accès absolu au fichier dans les deux `download()` et `upload()` méthodes.
diff --git a/plugins/cordova-plugin-file-transfer/doc/it/README.md b/plugins/cordova-plugin-file-transfer/doc/it/README.md
deleted file mode 100644
index 74d4ef5..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/it/README.md
+++ /dev/null
@@ -1,311 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg)](https://travis-ci.org/apache/cordova-plugin-file-transfer)
-
-Documentazione plugin:
-
-Questo plugin permette di caricare e scaricare file.
-
-Questo plugin definisce globale `FileTransfer`, costruttori di `FileUploadOptions`.
-
-Anche se in ambito globale, non sono disponibili fino a dopo l'evento `deviceready`.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## Installazione
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## Piattaforme supportate
-
- * Amazon fuoco OS
- * Android
- * BlackBerry 10
- * Browser
- * Firefox OS**
- * iOS
- * Windows Phone 7 e 8 *
- * Windows 8
- * Windows
-
-\ * *Non supportano `onprogress` né `abort()` *
-
-\ * * *Non supportano `onprogress` *
-
-# FileTransfer
-
-L'oggetto `FileTransfer` fornisce un modo per caricare i file utilizzando una richiesta HTTP multiparte POST o PUT e scaricare file pure.
-
-## ProprietÃ
-
- * **OnProgress**: chiamata con un `ProgressEvent` ogni volta che un nuovo blocco di dati viene trasferito. *(Funzione)*
-
-## Metodi
-
- * **caricare**: invia un file a un server.
-
- * **Scarica**: Scarica un file dal server.
-
- * **Abort**: interrompe un trasferimento in corso.
-
-## upload
-
-**Parametri**:
-
- * **fileURL**: Filesystem URL che rappresenta il file nel dispositivo. Per indietro la compatibilità , questo può anche essere il percorso completo del file sul dispositivo. (Vedere [indietro compatibilità rileva] qui sotto)
-
- * **server**: URL del server per ricevere il file, come codificato dal`encodeURI()`.
-
- * **successCallback**: un callback che viene passato un oggetto `FileUploadResult`. *(Funzione)*
-
- * **errorCallback**: un callback che viene eseguito se si verifica un errore di recupero `FileUploadResult`. Richiamato con un oggetto `FileTransferError`. *(Funzione)*
-
- * **opzioni**: parametri facoltativi *(oggetto)*. Chiavi valide:
-
- * **fileKey**: il nome dell'elemento form. Valore predefinito è `file` . (DOMString)
- * **nome file**: il nome del file da utilizzare quando si salva il file sul server. Valore predefinito è `image.jpg` . (DOMString)
- * **httpMethod**: metodo HTTP da utilizzare - `PUT` o `POST`. Impostazioni predefinite per `POST`. (DOMString)
- * **mimeType**: il tipo mime dei dati da caricare. Impostazioni predefinite su `image/jpeg`. (DOMString)
- * **params**: un insieme di coppie chiave/valore opzionale per passare nella richiesta HTTP. (Object)
- * **chunkedMode**: se a caricare i dati in modalità streaming chunked. Impostazione predefinita è `true`. (Boolean)
- * **headers**: una mappa di valori di intestazione e nome dell'intestazione. Utilizzare una matrice per specificare più di un valore. Su iOS, FireOS e Android, se è presente, un'intestazione Content-Type il nome dati form multipart non verranno utilizzati. (Object)
- * **httpMethod**: metodo HTTP da utilizzare per esempio POST o PUT. Il valore predefinito è `POST`. (DOMString)
-
- * **trustAllHosts**: parametro opzionale, valore predefinito è `false` . Se impostata su `true` , accetta tutti i certificati di sicurezza. Questo è utile poiché Android respinge i certificati autofirmati sicurezza. Non raccomandato per uso in produzione. Supportato su Android e iOS. *(boolean)*
-
-### Esempio
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### Esempio con intestazioni di caricare ed eventi Progress (Android e iOS solo)
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-Un oggetto `FileUploadResult` viene passato al metodo di callback del metodo `upload()` dell'oggetto `FileTransfer` successo.
-
-### ProprietÃ
-
- * **bytesSent**: il numero di byte inviati al server come parte dell'upload. (lungo)
-
- * **responseCode**: codice di risposta HTTP restituito dal server. (lungo)
-
- * **risposta**: risposta HTTP restituito dal server. (DOMString)
-
- * **intestazioni**: intestazioni di risposta HTTP dal server. (Oggetto)
-
- * Attualmente supportato solo iOS.
-
-### iOS stranezze
-
- * Non supporta `responseCode` o`bytesSent`.
-
-## Scarica
-
-**Parametri**:
-
- * **fonte**: URL del server per scaricare il file, come codificato dal`encodeURI()`.
-
- * **destinazione**: Filesystem url che rappresenta il file nel dispositivo. Per indietro la compatibilità , questo può anche essere il percorso completo del file sul dispositivo. (Vedere [indietro compatibilità rileva] qui sotto)
-
- * **successCallback**: un callback passato un `FileEntry` oggetto. *(Funzione)*
-
- * **errorCallback**: un callback che viene eseguito se si verifica un errore durante il recupero `FileEntry`. Richiamato con un oggetto `FileTransferError`. *(Function)*
-
- * **trustAllHosts**: parametro opzionale, valore predefinito è `false` . Se impostata su `true` , accetta tutti i certificati di sicurezza. Questo è utile perché Android respinge i certificati autofirmati sicurezza. Non raccomandato per uso in produzione. Supportato su Android e iOS. *(boolean)*
-
- * **opzioni**: parametri facoltativi, attualmente solo supporti intestazioni (ad esempio autorizzazione (autenticazione di base), ecc.).
-
-### Esempio
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-### WP8 stranezze
-
- * Il download richiede è nella cache di implementazione nativa. Per evitare la memorizzazione nella cache, passare `if-Modified-Since` intestazione per metodo di download.
-
-## Abort
-
-Interrompe un trasferimento in corso. Il callback onerror viene passato un oggetto FileTransferError che presenta un codice di errore di FileTransferError.ABORT_ERR.
-
-### Esempio
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-Un oggetto `FileTransferError` viene passato a un callback di errore quando si verifica un errore.
-
-### ProprietÃ
-
- * **codice**: uno dei codici di errore predefiniti elencati di seguito. (Numero)
-
- * **fonte**: URL all'origine. (String)
-
- * **destinazione**: URL di destinazione. (String)
-
- * **http_status**: codice di stato HTTP. Questo attributo è disponibile solo quando viene ricevuto un codice di risposta della connessione HTTP. (Numero)
-
- * **body** Corpo della risposta. Questo attributo è disponibile solo quando viene ricevuta una risposta dalla connessione HTTP. (String)
-
- * **exception**: O e.getMessage o e.toString (String)
-
-### Costanti
-
- * 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
- * 2 = `FileTransferError.INVALID_URL_ERR`
- * 3 = `FileTransferError.CONNECTION_ERR`
- * 4 = `FileTransferError.ABORT_ERR`
- * 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## Note di compatibilità all'indietro
-
-Versioni precedenti di questo plugin accetterebbe solo dispositivo-assoluto-percorsi di file come origine per upload, o come destinazione per il download. Questi percorsi si sarebbero generalmente di forma
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-Per indietro compatibilità , questi percorsi sono ancora accettati, e se l'applicazione ha registrato percorsi come questi in un archivio permanente, quindi possono continuare a essere utilizzato.
-
-Questi percorsi sono stati precedentemente esposti nella proprietà `fullPath` di `FileEntry` e oggetti `DirectoryEntry` restituiti dal File plugin. Nuove versioni del File plugin, tuttavia, non è più espongono questi percorsi a JavaScript.
-
-Se si esegue l'aggiornamento a una nuova (1.0.0 o più recente) versione del File e si hanno precedentemente utilizzato `entry.fullPath` come argomenti per `download()` o `upload()`, quindi sarà necessario cambiare il codice per utilizzare gli URL filesystem invece.
-
-`FileEntry.toURL()` e `DirectoryEntry.toURL()` restituiscono un filesystem URL del modulo
-
- cdvfile://localhost/persistent/path/to/file
-
-
-che può essere utilizzato al posto del percorso assoluto nei metodi sia `download()` e `upload()`.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-file-transfer/doc/it/index.md b/plugins/cordova-plugin-file-transfer/doc/it/index.md
deleted file mode 100644
index e1b74e3..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/it/index.md
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-Questo plugin permette di caricare e scaricare file.
-
-Questo plugin definisce globale `FileTransfer`, costruttori di `FileUploadOptions`.
-
-Anche se in ambito globale, non sono disponibili fino a dopo l'evento `deviceready`.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## Installazione
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## Piattaforme supportate
-
-* Amazon fuoco OS
-* Android
-* BlackBerry 10
-* Browser
-* Firefox OS**
-* iOS
-* Windows Phone 7 e 8 *
-* Windows 8
-* Windows
-
-* *Supporto `onprogress` né `abort()`*
-
-** *Non supportano `onprogress`*
-
-# FileTransfer
-
-L'oggetto `FileTransfer` fornisce un modo per caricare i file utilizzando una richiesta HTTP di POST più parte e scaricare file pure.
-
-## ProprietÃ
-
-* **OnProgress**: chiamata con un `ProgressEvent` ogni volta che un nuovo blocco di dati viene trasferito. *(Funzione)*
-
-## Metodi
-
-* **caricare**: invia un file a un server.
-
-* **Scarica**: Scarica un file dal server.
-
-* **Abort**: interrompe un trasferimento in corso.
-
-## caricare
-
-**Parametri**:
-
-* **fileURL**: Filesystem URL che rappresenta il file nel dispositivo. Per indietro la compatibilità , questo può anche essere il percorso completo del file sul dispositivo. (Vedere [indietro compatibilità rileva] qui sotto)
-
-* **server**: URL del server per ricevere il file, come codificato dal`encodeURI()`.
-
-* **successCallback**: un callback che viene passato un oggetto `FileUploadResult`. *(Funzione)*
-
-* **errorCallback**: un callback che viene eseguito se si verifica un errore di recupero `FileUploadResult`. Richiamato con un oggetto `FileTransferError`. *(Funzione)*
-
-* **opzioni**: parametri facoltativi *(oggetto)*. Chiavi valide:
-
- * **fileKey**: il nome dell'elemento form. Valore predefinito è `file` . (DOMString)
- * **nome file**: il nome del file da utilizzare quando si salva il file sul server. Valore predefinito è `image.jpg` . (DOMString)
- * **httpMethod**: metodo HTTP da utilizzare - `PUT` o `POST`. Impostazioni predefinite per `POST`. (DOMString)
- * **mimeType**: il tipo mime dei dati da caricare. Impostazioni predefinite su `image/jpeg`. (DOMString)
- * **params**: un insieme di coppie chiave/valore opzionale per passare nella richiesta HTTP. (Object)
- * **chunkedMode**: se a caricare i dati in modalità streaming chunked. Impostazione predefinita è `true`. (Boolean)
- * **headers**: mappa di valori nome/intestazione intestazione. Utilizzare una matrice per specificare più valori. (Object)
-
-* **trustAllHosts**: parametro opzionale, valore predefinito è `false` . Se impostata su `true` , accetta tutti i certificati di sicurezza. Questo è utile poiché Android respinge i certificati autofirmati sicurezza. Non raccomandato per uso in produzione. Supportato su Android e iOS. *(boolean)*
-
-### Esempio
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### Esempio con intestazioni di caricare ed eventi Progress (Android e iOS solo)
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-Un oggetto `FileUploadResult` viene passato al metodo di callback del metodo `upload()` dell'oggetto `FileTransfer` successo.
-
-### ProprietÃ
-
-* **bytesSent**: il numero di byte inviati al server come parte dell'upload. (lungo)
-
-* **responseCode**: codice di risposta HTTP restituito dal server. (lungo)
-
-* **risposta**: risposta HTTP restituito dal server. (DOMString)
-
-* **intestazioni**: intestazioni di risposta HTTP dal server. (Oggetto)
-
- * Attualmente supportato solo iOS.
-
-### iOS stranezze
-
-* Non supporta `responseCode` o`bytesSent`.
-
-## Scarica
-
-**Parametri**:
-
-* **fonte**: URL del server per scaricare il file, come codificato dal`encodeURI()`.
-
-* **destinazione**: Filesystem url che rappresenta il file nel dispositivo. Per indietro la compatibilità , questo può anche essere il percorso completo del file sul dispositivo. (Vedere [indietro compatibilità rileva] qui sotto)
-
-* **successCallback**: un callback passato un `FileEntry` oggetto. *(Funzione)*
-
-* **errorCallback**: un callback che viene eseguito se si verifica un errore durante il recupero `FileEntry`. Richiamato con un oggetto `FileTransferError`. *(Function)*
-
-* **trustAllHosts**: parametro opzionale, valore predefinito è `false` . Se impostata su `true` , accetta tutti i certificati di sicurezza. Questo è utile perché Android respinge i certificati autofirmati sicurezza. Non raccomandato per uso in produzione. Supportato su Android e iOS. *(boolean)*
-
-* **opzioni**: parametri facoltativi, attualmente solo supporti intestazioni (ad esempio autorizzazione (autenticazione di base), ecc.).
-
-### Esempio
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-## Abort
-
-Interrompe un trasferimento in corso. Il callback onerror viene passato un oggetto FileTransferError che presenta un codice di errore di FileTransferError.ABORT_ERR.
-
-### Esempio
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-Un oggetto `FileTransferError` viene passato a un callback di errore quando si verifica un errore.
-
-### ProprietÃ
-
-* **codice**: uno dei codici di errore predefiniti elencati di seguito. (Numero)
-
-* **fonte**: URL all'origine. (String)
-
-* **destinazione**: URL di destinazione. (String)
-
-* **http_status**: codice di stato HTTP. Questo attributo è disponibile solo quando viene ricevuto un codice di risposta della connessione HTTP. (Numero)
-
-* **body** Corpo della risposta. Questo attributo è disponibile solo quando viene ricevuta una risposta dalla connessione HTTP. (String)
-
-* **exception**: O e.getMessage o e.toString (String)
-
-### Costanti
-
-* 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
-* 2 = `FileTransferError.INVALID_URL_ERR`
-* 3 = `FileTransferError.CONNECTION_ERR`
-* 4 = `FileTransferError.ABORT_ERR`
-* 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## Note di compatibilità all'indietro
-
-Versioni precedenti di questo plugin accetterebbe solo dispositivo-assoluto-percorsi di file come origine per upload, o come destinazione per il download. Questi percorsi si sarebbero generalmente di forma
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-Per indietro compatibilità , questi percorsi sono ancora accettati, e se l'applicazione ha registrato percorsi come questi in un archivio permanente, quindi possono continuare a essere utilizzato.
-
-Questi percorsi sono stati precedentemente esposti nella proprietà `fullPath` di `FileEntry` e oggetti `DirectoryEntry` restituiti dal File plugin. Nuove versioni del File plugin, tuttavia, non è più espongono questi percorsi a JavaScript.
-
-Se si esegue l'aggiornamento a una nuova (1.0.0 o più recente) versione del File e si hanno precedentemente utilizzato `entry.fullPath` come argomenti per `download()` o `upload()`, quindi sarà necessario cambiare il codice per utilizzare gli URL filesystem invece.
-
-`FileEntry.toURL()` e `DirectoryEntry.toURL()` restituiscono un filesystem URL del modulo
-
- cdvfile://localhost/persistent/path/to/file
-
-
-che può essere utilizzato al posto del percorso assoluto nei metodi sia `download()` e `upload()`.
diff --git a/plugins/cordova-plugin-file-transfer/doc/ja/README.md b/plugins/cordova-plugin-file-transfer/doc/ja/README.md
deleted file mode 100644
index a8156a2..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/ja/README.md
+++ /dev/null
@@ -1,311 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg)](https://travis-ci.org/apache/cordova-plugin-file-transfer)
-
-プラグインã®ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«:
-
-ã“ã®ãƒ—ラグインã¯ã€ã‚¢ãƒƒãƒ—ãƒãƒ¼ãƒ‰ã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンãƒãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
-
-ã“ã®ãƒ—ラグインã§ã¯ã€ã‚°ãƒãƒ¼ãƒãƒ« `FileTransfer`ã€`FileUploadOptions` コンス トラクターを定義ã—ã¾ã™ã€‚
-
-ã‚°ãƒãƒ¼ãƒãƒ« スコープã§ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“ã¾ã§ `deviceready` イベントã®å¾Œã§ã™ã€‚
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## インストール
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプラットフォーãƒ
-
- * ã‚¢ãƒžã‚¾ãƒ³ç« OS
- * アンドãƒã‚¤ãƒ‰
- * ブラックベリー 10
- * ブラウザー
- * Firefox ã® OS * *
- * iOS
- * Windows Phone 7 㨠8 *
- * Windows 8
- * Windows
-
-\ * * `Onprogress`ã‚‚`abort()`をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。*
-
-\ * * * `Onprogress`をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。*
-
-# 出色
-
-`出色`オブジェクトã¯ã€HTTP マルãƒãƒ‘ート POST ã¾ãŸã¯ PUT è¦æ±‚を使用ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã‚’アップãƒãƒ¼ãƒ‰ã—ã€åŒæ§˜ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンãƒãƒ¼ãƒ‰ã™ã‚‹æ–¹æ³•ã‚’æä¾›ã—ã¾ã™ã€‚
-
-## プãƒãƒ‘ティ
-
- * **onprogress**: ã¨å‘¼ã°ã‚Œã‚‹ã€ `ProgressEvent` データã®æ–°ã—ã„ãƒãƒ£ãƒ³ã‚¯ãŒè»¢é€ã•ã‚Œã‚‹ãŸã³ã«ã€‚*(機能)*
-
-## メソッド
-
- * **アップãƒãƒ¼ãƒ‰**: サーãƒãƒ¼ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é€ä¿¡ã—ã¾ã™ã€‚
-
- * **ダウンãƒãƒ¼ãƒ‰**: サーãƒãƒ¼ã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¾ã™ã€‚
-
- * **ä¸æ¢**: 進行ä¸ã®è»¢é€ã‚’ä¸æ¢ã—ã¾ã™ã€‚
-
-## upload
-
-**パラメーター**:
-
- * **fileURL**: デãƒã‚¤ã‚¹ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’表ã™ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ URL。 下ä½äº’æ›æ€§ã¯ã€ã“ã®ã“ã¨ã‚‚ã€ãƒ‡ãƒã‚¤ã‚¹ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã®å®Œå…¨ãƒ‘スã§ã‚ã‚Šã¾ã™ã€‚ (å‚ç…§ã—ã¦ãã ã•ã„ [後方互æ›æ€§ãƒ¡ãƒ¢] ã®ä¸‹)
-
- * **サーãƒãƒ¼**: ã«ã‚ˆã£ã¦ç¬¦å·åŒ–ã•ã‚Œã‚‹ã‚ˆã†ã«ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å—ä¿¡ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã® URL`encodeURI()`.
-
- * **successCallback**: `FileUploadResult` オブジェクトãŒæ¸¡ã•ã‚Œã‚‹ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã€‚*(機能)*
-
- * **errorCallback**: エラー `FileUploadResult` ã‚’å–å¾—ã™ã‚‹ãŒç™ºç”Ÿã—ãŸå ´åˆã«å®Ÿè¡Œã•ã‚Œã‚‹ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã€‚`FileTransferError` オブジェクトを使ã£ã¦å‘¼ã³å‡ºã•ã‚Œã¾ã™ã€‚*(機能)*
-
- * **オプション**: çœç•¥å¯èƒ½ãªãƒ‘ラメーター *(オブジェクト)*。有効ãªã‚ー:
-
- * **fileKey**: フォームè¦ç´ ã®åå‰ã€‚既定値㯠`file` ã§ã™ã€‚(,)
- * **ファイルå**: ファイルåã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä¿å˜ã™ã‚‹ã¨ãã«ä½¿ç”¨ã—ã¾ã™ã€‚既定値㯠`image.jpg` ã§ã™ã€‚(,)
- * **httpMethod**: - `ã‚’ç½®ã` ã¾ãŸã¯ `POST` ã®ã„ãšã‚Œã‹ã‚’使用ã™ã‚‹ HTTP メソッド。デフォルト `ã®ãƒã‚¹ãƒˆ` ã§ã™ã€‚(,)
- * **mimeType**: アップãƒãƒ¼ãƒ‰ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã® mime タイプ。`イメージ/jpeg` ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã™ã€‚(,)
- * **params**: HTTP リクエストã«æ¸¡ã™ãŸã‚ã«ä»»æ„ã®ã‚ー/値ペアã®ã‚»ãƒƒãƒˆã€‚(オブジェクト)
- * **chunkedMode**: ãƒãƒ£ãƒ³ã‚¯ ストリーミング モードã§ãƒ‡ãƒ¼ã‚¿ã‚’アップãƒãƒ¼ãƒ‰ã™ã‚‹ã‹ã©ã†ã‹ã€‚デフォルト㯠`true` ã§ã™ã€‚(ブール値)
- * **headers**: ヘッダーå/ヘッダー値ã®ãƒžãƒƒãƒ—。 é…列を使用ã—ã¦ã€1 ã¤ä»¥ä¸Šã®å€¤ã‚’指定ã—ã¾ã™ã€‚ IOSã€FireOSã€ã‚¢ãƒ³ãƒ‰ãƒã‚¤ãƒ‰ã§ã¯ã¨ã„ã†åå‰ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ タイプ ヘッダーãŒå˜åœ¨ã™ã‚‹å ´åˆã€ãƒžãƒ«ãƒãƒ‘ート フォームデータã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。 (Object)
- * **httpMethod**: 例ãˆã°ã‚’使用ã™ã‚‹ HTTP メソッドを POST ã¾ãŸã¯ PUT ã§ã™ã€‚ デフォルト`ã®ãƒã‚¹ãƒˆ`ã§ã™ã€‚(DOMString)
-
- * **trustAllHosts**: çœç•¥å¯èƒ½ãªãƒ‘ラメーターã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ `false` 。 å ´åˆè¨å®š `true` ã€ã‚»ã‚ュリティ証明書をã™ã¹ã¦å—ã‘付ã‘ã¾ã™ã€‚ ã“れ㯠Android ã®è‡ªå·±ç½²å入りセã‚ュリティ証明書を拒å¦ã™ã‚‹ã®ã§ä¾¿åˆ©ã§ã™ã€‚ é‹ç”¨ç’°å¢ƒã§ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。 Android 㨠iOS ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ *(ブール値)*
-
-### 例
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### サンプルã®ã‚¢ãƒƒãƒ—ãƒãƒ¼ãƒ‰ ヘッダーã¨é€²è¡ŒçŠ¶æ³ã®ã‚¤ãƒ™ãƒ³ãƒˆ (Android 㨠iOS ã®ã¿ï¼‰
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-`FileUploadResult` オブジェクト㯠`FileTransfer` オブジェクト `upload()` メソッドã®æˆåŠŸæ™‚ã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã«æ¸¡ã•ã‚Œã¾ã™ã€‚
-
-### プãƒãƒ‘ティ
-
- * **bytesSent**: アップãƒãƒ¼ãƒ‰ã®ä¸€éƒ¨ã¨ã—ã¦ã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚(ãƒãƒ³ã‚°ï¼‰
-
- * **記述**: サーãƒãƒ¼ã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹ HTTP å¿œç”コード。(ãƒãƒ³ã‚°ï¼‰
-
- * **å¿œç”**: サーãƒãƒ¼ã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹ HTTP å¿œç”。(,)
-
- * **ヘッダー**: HTTP å¿œç”ヘッダー サーãƒãƒ¼ã«ã‚ˆã£ã¦ã€‚(オブジェクト)
-
- * ç¾åœ¨ iOS ã®ã¿ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚
-
-### iOS ã®ç™–
-
- * サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ `responseCode` ã¾ãŸã¯`bytesSent`.
-
-## download
-
-**パラメーター**:
-
- * **ソース**: ã«ã‚ˆã£ã¦ç¬¦å·åŒ–ã•ã‚Œã‚‹ã‚ˆã†ã«ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンãƒãƒ¼ãƒ‰ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã® URL`encodeURI()`.
-
- * **ターゲット**: デãƒã‚¤ã‚¹ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’表ã™ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ url。 下ä½äº’æ›æ€§ã¯ã€ã“ã®ã“ã¨ã‚‚ã€ãƒ‡ãƒã‚¤ã‚¹ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã®å®Œå…¨ãƒ‘スã§ã‚ã‚Šã¾ã™ã€‚ (å‚ç…§ã—ã¦ãã ã•ã„ [後方互æ›æ€§ãƒ¡ãƒ¢] ã®ä¸‹)
-
- * **successCallback**: 渡ã•ã‚ŒãŸã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’ `FileEntry` オブジェクト。*(機能)*
-
- * **errorCallback**: `FileEntry` ã‚’å–å¾—ã™ã‚‹ã¨ãã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã«å®Ÿè¡Œã•ã‚Œã‚‹ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã€‚`FileTransferError` オブジェクトを使ã£ã¦å‘¼ã³å‡ºã•ã‚Œã¾ã™ã€‚*(機能)*
-
- * **trustAllHosts**: çœç•¥å¯èƒ½ãªãƒ‘ラメーターã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ `false` 。 å ´åˆè¨å®š `true` ã€ã‚»ã‚ュリティ証明書をã™ã¹ã¦å—ã‘付ã‘ã¾ã™ã€‚ Android ã¯ã€è‡ªå·±ç½²å入りセã‚ュリティ証明書を拒å¦ã—ã¾ã™ã®ã§ä¾¿åˆ©ã§ã™ã€‚ é‹ç”¨ç’°å¢ƒã§ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。 Android 㨠iOS ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ *(ブール値)*
-
- * **オプション**: çœç•¥å¯èƒ½ãªãƒ‘ラメーターã¯ã€ç¾åœ¨ã‚µãƒãƒ¼ãƒˆã™ã‚‹ãƒ˜ãƒƒãƒ€ãƒ¼ã®ã¿ (èªè¨¼ (基本èªè¨¼) ãªã©)。
-
-### 例
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-### WP8 ç™–
-
- * ダウンãƒãƒ¼ãƒ‰è¦æ±‚ã™ã‚‹ãƒã‚¤ãƒ†ã‚£ãƒ–実装ã«ã‚ˆã£ã¦ã‚ャッシュã«æ ¼ç´ã•ã‚Œã¦ã„ã¾ã™ã€‚ã‚ャッシュã•ã‚Œãªã„よã†ã«ã€æ¸¡ã™`以æ¥å¤‰æ›´ã•ã‚ŒãŸ if`ヘッダー メソッドをダウンãƒãƒ¼ãƒ‰ã—ã¾ã™ã€‚
-
-## abort
-
-進行ä¸ã®è»¢é€ã‚’ä¸æ¢ã—ã¾ã™ã€‚Onerror コールãƒãƒƒã‚¯ãŒ FileTransferError.ABORT_ERR ã®ã‚¨ãƒ©ãƒ¼ コードをæŒã£ã¦ã„ã‚‹ FileTransferError オブジェクトã«æ¸¡ã•ã‚Œã¾ã™ã€‚
-
-### 例
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-`FileTransferError` オブジェクトã¯ã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸã¨ãã«ã‚¨ãƒ©ãƒ¼ コールãƒãƒƒã‚¯ã«æ¸¡ã•ã‚Œã¾ã™ã€‚
-
-### プãƒãƒ‘ティ
-
- * **コード**: 次ã®ã„ãšã‚Œã‹ã®å®šç¾©æ¸ˆã¿ã®ã‚¨ãƒ©ãƒ¼ コード。(æ•°)
-
- * **ソース**: ソース㮠URL。(æ–‡å—列)
-
- * **ターゲット**: 先㮠URL。(æ–‡å—列)
-
- * **http_status**: HTTP ステータス コード。ã“ã®å±žæ€§ã¯ã€HTTP 接続ã‹ã‚‰å¿œç”コードをå—ä¿¡ã—ãŸã¨ãã«ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚(æ•°)
-
- * **body**å¿œç”本体。ã“ã®å±žæ€§ã¯ã€HTTP 接続ã‹ã‚‰å¿œç”ã‚’å—ä¿¡ã—ãŸã¨ãã«ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚(æ–‡å—列)
-
- * **exception**: ã©ã¡ã‚‰ã‹ e.getMessage ã¾ãŸã¯ e.toString (æ–‡å—列)
-
-### 定数
-
- * 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
- * 2 = `FileTransferError.INVALID_URL_ERR`
- * 3 = `FileTransferError.CONNECTION_ERR`
- * 4 = `FileTransferError.ABORT_ERR`
- * 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## 後方互æ›æ€§ã‚’ノートã—ã¾ã™ã€‚
-
-ã“ã®ãƒ—ラグインã®ä»¥å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¾ãŸã¯ãƒ€ã‚¦ãƒ³ãƒãƒ¼ãƒ‰ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã¨ã—ã¦ã€ã‚¢ãƒƒãƒ—ãƒãƒ¼ãƒ‰ã®ã‚½ãƒ¼ã‚¹ã¨ã—ã¦ã®ã¿ãƒ‡ãƒã‚¤ã‚¹çµ¶å¯¾ãƒ•ã‚¡ã‚¤ãƒ« パスをå—ã‘入れるã§ã—ょã†ã€‚ã“れらã®ãƒ‘スã®å½¢å¼ã¯ã€é€šå¸¸
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-下ä½äº’æ›æ€§ã€ã“れらã®ãƒ‘スを使用ã—ã¦ã‚‚ã€ã‚¢ãƒ—リケーションã¯ã€æ°¸ç¶šçš„ãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã§ã“ã®ã‚ˆã†ãªãƒ‘スを記録ã—ã¦ã„ã‚‹å ´åˆã€ã—彼らãŒå¼•ã続ã使用ã•ã‚Œã¾ã™ã€‚
-
-ã“れらã®ãƒ‘ス㮠`FileEntry` やファイル プラグインã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹ `DirectoryEntry` オブジェクト㮠`fullPath` プãƒãƒ‘ティã§å…¬é–‹ã•ã‚Œã¦ã„ãªã‹ã£ãŸã€‚ æ–°ã—ã„プラグインã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€ãƒ•ã‚¡ã‚¤ãƒ«ã€ãŸã ã—ã€ã‚‚ã¯ã‚„ java スクリプトã®è¨å®šã‚’ã“れらã®ãƒ‘スを公開ã—ã¾ã™ã€‚
-
-æ–°ã—ã„ã«ã‚¢ãƒƒãƒ—グレードã™ã‚‹å ´åˆ (1.0.0 以é™) ファイルã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ä»¥å‰ã‚’使用ã—ã¦ã„ã‚‹ `entry.fullPath` `download()` ã¾ãŸã¯ `upload()` ã¸ã®å¼•æ•°ã¨ã—ã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã® Url を代ã‚ã‚Šã«ä½¿ç”¨ã™ã‚‹ã‚³ãƒ¼ãƒ‰ã‚’変更ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚
-
-`FileEntry.toURL()` 㨠`DirectoryEntry.toURL()` ファイルシステム㮠URL ã‚’è¿”ã™ãƒ•ã‚©ãƒ¼ãƒ
-
- cdvfile://localhost/persistent/path/to/file
-
-
-`download()`ã€`upload()` メソッドã®çµ¶å¯¾ãƒ•ã‚¡ã‚¤ãƒ« パスã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã§ãã¾ã™ã€‚
\ No newline at end of file
diff --git a/plugins/cordova-plugin-file-transfer/doc/ja/index.md b/plugins/cordova-plugin-file-transfer/doc/ja/index.md
deleted file mode 100644
index f885b3c..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/ja/index.md
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-ã“ã®ãƒ—ラグインã¯ã€ã‚¢ãƒƒãƒ—ãƒãƒ¼ãƒ‰ã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンãƒãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
-
-ã“ã®ãƒ—ラグインã§ã¯ã€ã‚°ãƒãƒ¼ãƒãƒ« `FileTransfer`ã€`FileUploadOptions` コンス トラクターを定義ã—ã¾ã™ã€‚
-
-ã‚°ãƒãƒ¼ãƒãƒ« スコープã§ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“ã¾ã§ `deviceready` イベントã®å¾Œã§ã™ã€‚
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## インストール
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプラットフォーãƒ
-
-* ã‚¢ãƒžã‚¾ãƒ³ç« OS
-* アンドãƒã‚¤ãƒ‰
-* ブラックベリー 10
-* ブラウザー
-* Firefox ã® OS * *
-* iOS
-* Windows Phone 7 㨠8 *
-* Windows 8
-* Windows
-
-* *`onprogress` ã‚‚ `abort()` をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“*
-
-* * *`onprogress` をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“*
-
-# FileTransfer
-
-`FileTransfer` オブジェクトã¯ãƒžãƒ«ãƒãƒ‘ートã®ãƒã‚¹ãƒˆã€HTTP è¦æ±‚を使用ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã‚’アップãƒãƒ¼ãƒ‰ã—ã¦åŒæ§˜ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンãƒãƒ¼ãƒ‰ã™ã‚‹æ–¹æ³•ã‚’æä¾›ã—ã¾ã™ã€‚
-
-## プãƒãƒ‘ティ
-
-* **onprogress**: ã¨å‘¼ã°ã‚Œã‚‹ã€ `ProgressEvent` データã®æ–°ã—ã„ãƒãƒ£ãƒ³ã‚¯ãŒè»¢é€ã•ã‚Œã‚‹ãŸã³ã«ã€‚*(機能)*
-
-## メソッド
-
-* **アップãƒãƒ¼ãƒ‰**: サーãƒãƒ¼ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é€ä¿¡ã—ã¾ã™ã€‚
-
-* **ダウンãƒãƒ¼ãƒ‰**: サーãƒãƒ¼ã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¾ã™ã€‚
-
-* **ä¸æ¢**: 進行ä¸ã®è»¢é€ã‚’ä¸æ¢ã—ã¾ã™ã€‚
-
-## upload
-
-**パラメーター**:
-
-* **fileURL**: デãƒã‚¤ã‚¹ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’表ã™ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ URL。 下ä½äº’æ›æ€§ã¯ã€ã“ã®ã“ã¨ã‚‚ã€ãƒ‡ãƒã‚¤ã‚¹ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã®å®Œå…¨ãƒ‘スã§ã‚ã‚Šã¾ã™ã€‚ (å‚ç…§ã—ã¦ãã ã•ã„ [後方互æ›æ€§ãƒ¡ãƒ¢] ã®ä¸‹)
-
-* **サーãƒãƒ¼**: ã«ã‚ˆã£ã¦ç¬¦å·åŒ–ã•ã‚Œã‚‹ã‚ˆã†ã«ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å—ä¿¡ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã® URL`encodeURI()`.
-
-* **successCallback**: `FileUploadResult` オブジェクトãŒæ¸¡ã•ã‚Œã‚‹ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã€‚*(機能)*
-
-* **errorCallback**: エラー `FileUploadResult` ã‚’å–å¾—ã™ã‚‹ãŒç™ºç”Ÿã—ãŸå ´åˆã«å®Ÿè¡Œã•ã‚Œã‚‹ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã€‚`FileTransferError` オブジェクトを使ã£ã¦å‘¼ã³å‡ºã•ã‚Œã¾ã™ã€‚*(機能)*
-
-* **オプション**: çœç•¥å¯èƒ½ãªãƒ‘ラメーター *(オブジェクト)*。有効ãªã‚ー:
-
- * **fileKey**: フォームè¦ç´ ã®åå‰ã€‚既定値㯠`file` ã§ã™ã€‚(,)
- * **ファイルå**: ファイルåã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä¿å˜ã™ã‚‹ã¨ãã«ä½¿ç”¨ã—ã¾ã™ã€‚既定値㯠`image.jpg` ã§ã™ã€‚(,)
- * **httpMethod**: - `ã‚’ç½®ã` ã¾ãŸã¯ `POST` ã®ã„ãšã‚Œã‹ã‚’使用ã™ã‚‹ HTTP メソッド。デフォルト `ã®ãƒã‚¹ãƒˆ` ã§ã™ã€‚(,)
- * **mimeType**: アップãƒãƒ¼ãƒ‰ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã® mime タイプ。`イメージ/jpeg` ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã™ã€‚(,)
- * **params**: HTTP リクエストã«æ¸¡ã™ãŸã‚ã«ä»»æ„ã®ã‚ー/値ペアã®ã‚»ãƒƒãƒˆã€‚(オブジェクト)
- * **chunkedMode**: ãƒãƒ£ãƒ³ã‚¯ ストリーミング モードã§ãƒ‡ãƒ¼ã‚¿ã‚’アップãƒãƒ¼ãƒ‰ã™ã‚‹ã‹ã©ã†ã‹ã€‚デフォルト㯠`true` ã§ã™ã€‚(ブール値)
- * **headers**: ヘッダーã®åå‰/ヘッダー値ã®ãƒžãƒƒãƒ—。1 ã¤ä»¥ä¸Šã®å€¤ã‚’指定ã™ã‚‹ã«ã¯ã€é…列を使用ã—ã¾ã™ã€‚(オブジェクト)
-
-* **trustAllHosts**: çœç•¥å¯èƒ½ãªãƒ‘ラメーターã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ `false` 。 å ´åˆè¨å®š `true` ã€ã‚»ã‚ュリティ証明書をã™ã¹ã¦å—ã‘付ã‘ã¾ã™ã€‚ ã“れ㯠Android ã®è‡ªå·±ç½²å入りセã‚ュリティ証明書を拒å¦ã™ã‚‹ã®ã§ä¾¿åˆ©ã§ã™ã€‚ é‹ç”¨ç’°å¢ƒã§ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。 Android 㨠iOS ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ *(ブール値)*
-
-### 例
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### サンプルã®ã‚¢ãƒƒãƒ—ãƒãƒ¼ãƒ‰ ヘッダーã¨é€²è¡ŒçŠ¶æ³ã®ã‚¤ãƒ™ãƒ³ãƒˆ (Android 㨠iOS ã®ã¿ï¼‰
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-`FileUploadResult` オブジェクト㯠`FileTransfer` オブジェクト `upload()` メソッドã®æˆåŠŸæ™‚ã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã«æ¸¡ã•ã‚Œã¾ã™ã€‚
-
-### プãƒãƒ‘ティ
-
-* **bytesSent**: アップãƒãƒ¼ãƒ‰ã®ä¸€éƒ¨ã¨ã—ã¦ã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚(ãƒãƒ³ã‚°ï¼‰
-
-* **記述**: サーãƒãƒ¼ã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹ HTTP å¿œç”コード。(ãƒãƒ³ã‚°ï¼‰
-
-* **å¿œç”**: サーãƒãƒ¼ã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹ HTTP å¿œç”。(,)
-
-* **ヘッダー**: HTTP å¿œç”ヘッダー サーãƒãƒ¼ã«ã‚ˆã£ã¦ã€‚(オブジェクト)
-
- * ç¾åœ¨ iOS ã®ã¿ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚
-
-### iOS ã®ç™–
-
-* サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ `responseCode` ã¾ãŸã¯`bytesSent`.
-
-## download
-
-**パラメーター**:
-
-* **ソース**: ã«ã‚ˆã£ã¦ç¬¦å·åŒ–ã•ã‚Œã‚‹ã‚ˆã†ã«ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンãƒãƒ¼ãƒ‰ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã® URL`encodeURI()`.
-
-* **ターゲット**: デãƒã‚¤ã‚¹ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’表ã™ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ url。 下ä½äº’æ›æ€§ã¯ã€ã“ã®ã“ã¨ã‚‚ã€ãƒ‡ãƒã‚¤ã‚¹ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã®å®Œå…¨ãƒ‘スã§ã‚ã‚Šã¾ã™ã€‚ (å‚ç…§ã—ã¦ãã ã•ã„ [後方互æ›æ€§ãƒ¡ãƒ¢] ã®ä¸‹)
-
-* **successCallback**: 渡ã•ã‚ŒãŸã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’ `FileEntry` オブジェクト。*(機能)*
-
-* **errorCallback**: `FileEntry` ã‚’å–å¾—ã™ã‚‹ã¨ãã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã«å®Ÿè¡Œã•ã‚Œã‚‹ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã€‚`FileTransferError` オブジェクトを使ã£ã¦å‘¼ã³å‡ºã•ã‚Œã¾ã™ã€‚*(機能)*
-
-* **trustAllHosts**: çœç•¥å¯èƒ½ãªãƒ‘ラメーターã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ `false` 。 å ´åˆè¨å®š `true` ã€ã‚»ã‚ュリティ証明書をã™ã¹ã¦å—ã‘付ã‘ã¾ã™ã€‚ Android ã¯ã€è‡ªå·±ç½²å入りセã‚ュリティ証明書を拒å¦ã—ã¾ã™ã®ã§ä¾¿åˆ©ã§ã™ã€‚ é‹ç”¨ç’°å¢ƒã§ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。 Android 㨠iOS ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ *(ブール値)*
-
-* **オプション**: çœç•¥å¯èƒ½ãªãƒ‘ラメーターã¯ã€ç¾åœ¨ã‚µãƒãƒ¼ãƒˆã™ã‚‹ãƒ˜ãƒƒãƒ€ãƒ¼ã®ã¿ (èªè¨¼ (基本èªè¨¼) ãªã©)。
-
-### 例
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-## abort
-
-進行ä¸ã®è»¢é€ã‚’ä¸æ¢ã—ã¾ã™ã€‚Onerror コールãƒãƒƒã‚¯ãŒ FileTransferError.ABORT_ERR ã®ã‚¨ãƒ©ãƒ¼ コードをæŒã£ã¦ã„ã‚‹ FileTransferError オブジェクトã«æ¸¡ã•ã‚Œã¾ã™ã€‚
-
-### 例
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-`FileTransferError` オブジェクトã¯ã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸã¨ãã«ã‚¨ãƒ©ãƒ¼ コールãƒãƒƒã‚¯ã«æ¸¡ã•ã‚Œã¾ã™ã€‚
-
-### プãƒãƒ‘ティ
-
-* **コード**: 次ã®ã„ãšã‚Œã‹ã®å®šç¾©æ¸ˆã¿ã®ã‚¨ãƒ©ãƒ¼ コード。(æ•°)
-
-* **ソース**: ソース㮠URL。(æ–‡å—列)
-
-* **ターゲット**: 先㮠URL。(æ–‡å—列)
-
-* **http_status**: HTTP ステータス コード。ã“ã®å±žæ€§ã¯ã€HTTP 接続ã‹ã‚‰å¿œç”コードをå—ä¿¡ã—ãŸã¨ãã«ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚(æ•°)
-
-* **body**å¿œç”本体。ã“ã®å±žæ€§ã¯ã€HTTP 接続ã‹ã‚‰å¿œç”ã‚’å—ä¿¡ã—ãŸã¨ãã«ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚(æ–‡å—列)
-
-* **exception**: ã©ã¡ã‚‰ã‹ e.getMessage ã¾ãŸã¯ e.toString (æ–‡å—列)
-
-### 定数
-
-* 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
-* 2 = `FileTransferError.INVALID_URL_ERR`
-* 3 = `FileTransferError.CONNECTION_ERR`
-* 4 = `FileTransferError.ABORT_ERR`
-* 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## 後方互æ›æ€§ã‚’ノートã—ã¾ã™ã€‚
-
-ã“ã®ãƒ—ラグインã®ä»¥å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¾ãŸã¯ãƒ€ã‚¦ãƒ³ãƒãƒ¼ãƒ‰ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã¨ã—ã¦ã€ã‚¢ãƒƒãƒ—ãƒãƒ¼ãƒ‰ã®ã‚½ãƒ¼ã‚¹ã¨ã—ã¦ã®ã¿ãƒ‡ãƒã‚¤ã‚¹çµ¶å¯¾ãƒ•ã‚¡ã‚¤ãƒ« パスをå—ã‘入れるã§ã—ょã†ã€‚ã“れらã®ãƒ‘スã®å½¢å¼ã¯ã€é€šå¸¸
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-下ä½äº’æ›æ€§ã€ã“れらã®ãƒ‘スを使用ã—ã¦ã‚‚ã€ã‚¢ãƒ—リケーションã¯ã€æ°¸ç¶šçš„ãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã§ã“ã®ã‚ˆã†ãªãƒ‘スを記録ã—ã¦ã„ã‚‹å ´åˆã€ã—彼らãŒå¼•ã続ã使用ã•ã‚Œã¾ã™ã€‚
-
-ã“れらã®ãƒ‘ス㮠`FileEntry` やファイル プラグインã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹ `DirectoryEntry` オブジェクト㮠`fullPath` プãƒãƒ‘ティã§å…¬é–‹ã•ã‚Œã¦ã„ãªã‹ã£ãŸã€‚ æ–°ã—ã„プラグインã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€ãƒ•ã‚¡ã‚¤ãƒ«ã€ãŸã ã—ã€ã‚‚ã¯ã‚„ java スクリプトã®è¨å®šã‚’ã“れらã®ãƒ‘スを公開ã—ã¾ã™ã€‚
-
-æ–°ã—ã„ã«ã‚¢ãƒƒãƒ—グレードã™ã‚‹å ´åˆ (1.0.0 以é™) ファイルã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ä»¥å‰ã‚’使用ã—ã¦ã„ã‚‹ `entry.fullPath` `download()` ã¾ãŸã¯ `upload()` ã¸ã®å¼•æ•°ã¨ã—ã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã® Url を代ã‚ã‚Šã«ä½¿ç”¨ã™ã‚‹ã‚³ãƒ¼ãƒ‰ã‚’変更ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚
-
-`FileEntry.toURL()` 㨠`DirectoryEntry.toURL()` ファイルシステム㮠URL ã‚’è¿”ã™ãƒ•ã‚©ãƒ¼ãƒ
-
- cdvfile://localhost/persistent/path/to/file
-
-
-`download()`ã€`upload()` メソッドã®çµ¶å¯¾ãƒ•ã‚¡ã‚¤ãƒ« パスã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã§ãã¾ã™ã€‚
diff --git a/plugins/cordova-plugin-file-transfer/doc/ko/README.md b/plugins/cordova-plugin-file-transfer/doc/ko/README.md
deleted file mode 100644
index f91e8a2..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/ko/README.md
+++ /dev/null
@@ -1,311 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg)](https://travis-ci.org/apache/cordova-plugin-file-transfer)
-
-í”ŒëŸ¬ê·¸ì¸ ë¬¸ì„œ:
-
-ì´ í”ŒëŸ¬ê·¸ì¸ì„ 사용 하면 업로드 ë° ë‹¤ìš´ë¡œë“œ íŒŒì¼ ìˆ˜ 있습니다.
-
-ì´ í”ŒëŸ¬ê·¸ì¸ ê¸€ë¡œë²Œ `FileTransfer`, `FileUploadOptions` ìƒì„±ìžë¥¼ ì •ì˜í•©ë‹ˆë‹¤.
-
-ì „ì— ë²”ìœ„ì—ì„œ ê·¸ë“¤ì€ ì œê³µ ë˜ì§€ 않습니다 때까지 `deviceready` ì´ë²¤íŠ¸ 후.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## 설치
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## ì§€ì› ë˜ëŠ” 플랫í¼
-
- * 아마존 화재 ìš´ì˜ ì²´ì œ
- * 안 ë“œ ë¡œì´ë“œ
- * ë¸”ëž™ë² ë¦¬ 10
- * 브ë¼ìš°ì €
- * 파ì´ì–´ í스 OS * *
- * iOS
- * Windows Phone 7ê³¼ 8 *
- * 윈ë„ìš° 8
- * 윈ë„ìš°
-
-\** `Onprogress` ë„ `abort()` 를 ì§€ì› í•˜ì§€ 않습니다*
-
-\*** `Onprogress` 를 ì§€ì› í•˜ì§€ 않습니다*
-
-# FileTransfer
-
-`FileTransfer` 개체는 HTTP 다중 파트 POST ë˜ëŠ” PUT ìš”ì²ì„ 사용 하 ì—¬ 파ì¼ì„ 업로드 하 ê³ ë˜í•œ 파ì¼ì„ 다운로드 하는 ë°©ë²•ì„ ì œê³µ 합니다.
-
-## ì†ì„±
-
- * **onprogress**:ë¡œ 불리는 `ProgressEvent` 새로운 ì–‘ì˜ ë°ì´í„°ë¥¼ ì „ì†¡ 하는 때마다. *(기능)*
-
-## 메서드
-
- * **업로드**: 파ì¼ì„ ì„œë²„ì— ë³´ëƒ…ë‹ˆë‹¤.
-
- * **다운로드**: 서버ì—ì„œ 파ì¼ì„ 다운로드 합니다.
-
- * **중단**: 진행 ì¤‘ì¸ ì „ì†¡ 중단.
-
-## 업로드
-
-**매개 변수**:
-
- * **fileURL**: ìž¥ì¹˜ì— íŒŒì¼ì„ 나타내는 íŒŒì¼ ì‹œìŠ¤í…œ URL. ì— ëŒ€ í•œ ì´ì „ ë²„ì „ê³¼ 호환성ì„ì´ ìˆ˜ë„ ìž¥ì¹˜ì— ìžˆëŠ” 파ì¼ì˜ ì „ì²´ 경로 수. (참조 [거꾸로 호환성 노트] 아래)
-
- * **서버**: ì¸ì½”딩 íŒŒì¼ ìˆ˜ì‹ ì„œë²„ì˜ URL`encodeURI()`.
-
- * **successCallback**: `FileUploadResult` 개체를 ì „ë‹¬ 하는 콜백. *(기능)*
-
- * **errorCallback**: `FileUploadResult` ê²€ìƒ‰ì— ì˜¤ë¥˜ê°€ ë°œìƒ í•˜ë©´ 실행 ë˜ëŠ” 콜백. `FileTransferError` 개체와 함께 호출 ë©ë‹ˆë‹¤. *(기능)*
-
- * **옵션**: ì„ íƒì 매개 변수 *(개체)*. ìœ íš¨í•œ 키:
-
- * **fileKey**: form ìš”ì†Œì˜ ì´ë¦„. ê¸°ë³¸ê°’ì€ `file` . (DOMString)
- * **íŒŒì¼ ì´ë¦„**: íŒŒì¼ ì´ë¦„ì„ ì„œë²„ì— íŒŒì¼ì„ ì €ìž¥í• ë•Œ 사용 합니다. ê¸°ë³¸ê°’ì€ `image.jpg` . (DOMString)
- * **httpMethod**: `넣어` ë˜ëŠ” `게시물`-사용 하ë„ë¡ HTTP 메서드. `게시물` 기본값입니다. (DOMString)
- * **mimeType**: 업로드 ë°ì´í„°ì˜ mime 형ì‹ì„. `ì´ë¯¸ì§€/jpeg`ì˜ ê¸°ë³¸ê°’ìž…ë‹ˆë‹¤. (DOMString)
- * **params**: HTTP ìš”ì²ì— ì „ë‹¬í• ì„ íƒì 키/ê°’ ìŒì˜ 집합. (개체)
- * **chunkedMode**: ì²í¬ ìŠ¤íŠ¸ë¦¬ë° ëª¨ë“œì—ì„œ ë°ì´í„° 업로드를 합니다. ê¸°ë³¸ê°’ì€ `true`입니다. (부울)
- * **headers**: í—¤ë” ì´ë¦„ ë° í—¤ë” ê°’ì˜ ì§€ë„. ë°°ì—´ì„ ì‚¬ìš© 하 ì—¬ 하나 ì´ìƒì˜ ê°’ì„ ì§€ì •. IOS, FireOS, 안 ë“œ ë¡œì´ë“œì— 있으면 ë¼ëŠ” 콘í…ì¸ í˜•ì‹ í—¤ë”, 다중 ì–‘ì‹ ë°ì´í„°ëŠ” ì‚¬ìš©í• ìˆ˜ 없습니다. (Object)
- * **httpMethod**: HTTP 메서드 예를 사용 하 여 게시 하거나 넣어. `게시물`기본값입니다. (DOMString)
-
- * **trustAllHosts**: ì„ íƒì 매개 변수는 기본ì 으로 `false` . 만약 ì„¤ì • `true` , ê·¸ê²ƒì€ ëª¨ë“ ë³´ì•ˆ ì¸ì¦ì„œë¥¼ 허용 합니다. ì´ ì•ˆ ë“œ ë¡œì´ë“œ ìžì²´ 서명 ëœ ë³´ì•ˆ ì¸ì¦ì„œë¥¼ 거부 하기 ë•Œë¬¸ì— ìœ ìš© 합니다. 프로ë•ì…˜ 환경ì—ì„œ 사용 권장 ë˜ì§€ 않습니다. 안 ë“œ ë¡œì´ë“œì™€ iOSì—ì„œ 지ì›. *(부울)*
-
-### 예를 들어
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### 예를 들어 í—¤ë” ì—…ë¡œë“œ ë° ì§„í–‰ ì´ë²¤íŠ¸ (안 ë“œ ë¡œì´ë“œì™€ iOS만)
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-`FileUploadResult` 개체 `FileTransfer` ê°œì²´ì˜ `ì›ëž˜` ë°©ë²•ì˜ ì„±ê³µ ì½œë°±ì— ì „ë‹¬ ë©ë‹ˆë‹¤.
-
-### ì†ì„±
-
- * **bytesSent**: ì—…ë¡œë“œì˜ ì¼ë¶€ë¡œ ì„œë²„ì— ë³´ë‚¸ ë°”ì´íŠ¸ 수. (긴)
-
- * **responseCode**: 서버ì—ì„œ 반환 ëœ HTTP ì‘답 코드. (긴)
-
- * **response**: 서버ì—ì„œ 반환 ë˜ëŠ” HTTP ì‘답. (DOMString)
-
- * **headers**: 서버ì—ì„œ HTTP ì‘답 í—¤ë”. (개체)
-
- * 현재 ios만 ì§€ì› í•©ë‹ˆë‹¤.
-
-### iOS 단ì
-
- * ì§€ì› í•˜ì§€ 않는 `responseCode` ë˜ëŠ”`bytesSent`.
-
-## download
-
-**매개 변수**:
-
- * **source**: URLë¡œ ì¸ì½”ë”©ëœ íŒŒì¼, 다운로드 서버`encodeURI()`.
-
- * **target**: ìž¥ì¹˜ì— íŒŒì¼ì„ 나타내는 íŒŒì¼ ì‹œìŠ¤í…œ url. ì— ëŒ€ í•œ ì´ì „ ë²„ì „ê³¼ 호환성ì„ì´ ìˆ˜ë„ ìž¥ì¹˜ì— ìžˆëŠ” 파ì¼ì˜ ì „ì²´ 경로 수. (참조 [거꾸로 호환성 노트] 아래)
-
- * **successCallback**: 콜백 ì „ë‹¬ ë˜ëŠ” `FileEntry` 개체. *(기능)*
-
- * **errorCallback**: `FileEntry`를 ê²€ìƒ‰í• ë•Œ 오류가 ë°œìƒ í•˜ë©´ 실행 ë˜ëŠ” 콜백. `FileTransferError` 개체와 함께 호출 ë©ë‹ˆë‹¤. *(기능)*
-
- * **trustAllHosts**: ì„ íƒì 매개 변수는 기본ì 으로 `false` . 만약 ì„¤ì • `true` , ê·¸ê²ƒì€ ëª¨ë“ ë³´ì•ˆ ì¸ì¦ì„œë¥¼ 허용 합니다. 안 ë“œ ë¡œì´ë“œ ìžì²´ 서명 ëœ ë³´ì•ˆ ì¸ì¦ì„œë¥¼ 거부 하기 ë•Œë¬¸ì— ìœ ìš© 합니다. 프로ë•ì…˜ 환경ì—ì„œ 사용 권장 ë˜ì§€ 않습니다. 안 ë“œ ë¡œì´ë“œì™€ iOSì—ì„œ 지ì›. *(부울)*
-
- * **options**: ì„ íƒì 매개 변수를 현재 지 ì›í•˜ëŠ” 머리글만 (예: ì¸ì¦ (기본 ì¸ì¦), 등).
-
-### 예를 들어
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-### WP8 특수
-
- * 다운로드 ìš”ì² ê¸°ë³¸ êµ¬í˜„ì— ì˜í•´ ìºì‹œ ë˜ ê³ . ìºì‹±ì„ 방지 í•˜ë ¤ë©´ ì „ë‹¬ `if-ìˆ˜ì •-ì´í›„` í—¤ë”를 다운로드 하는 방법.
-
-## abort
-
-진행 ì¤‘ì¸ ì „ì†¡ì„ ì¤‘ë‹¨í•©ë‹ˆë‹¤. onerror 콜백 FileTransferError.ABORT_ERRì˜ ì˜¤ë¥˜ 코드는 FileTransferError 개체를 ì „ë‹¬ 합니다.
-
-### 예를 들어
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-`FileTransferError` 개체 오류가 ë°œìƒ í•˜ë©´ 오류 ì½œë°±ì— ì „ë‹¬ ë©ë‹ˆë‹¤.
-
-### ì†ì„±
-
- * **code**: 미리 ì •ì˜ ëœ ì˜¤ë¥˜ 코드 중 하나가 ì•„ëž˜ì— ë‚˜ì—´ ëœ. (수)
-
- * **source**: 소스 URL. (문ìžì—´)
-
- * **target**: ëŒ€ìƒ URL. (문ìžì—´)
-
- * **http_status**: HTTP ìƒíƒœ 코드. ì´ íŠ¹ì„±ì€ ì‘답 코드를 HTTP ì—°ê²°ì—ì„œ ìˆ˜ì‹ ì— ì‚¬ìš©í• ìˆ˜ 있습니다. (수)
-
- * **body** ì‘답 본문입니다. ì´ íŠ¹ì„±ì€ HTTP ì—°ê²°ì—ì„œ ì‘ë‹µì„ ë°›ì„ ë•Œì— ì‚¬ìš©í• ìˆ˜ 있습니다. (문ìžì—´)
-
- * **exception**: ì–´ëŠ e.getMessage ë˜ëŠ” e.toString (문ìžì—´)
-
-### ìƒìˆ˜
-
- * 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
- * 2 = `FileTransferError.INVALID_URL_ERR`
- * 3 = `FileTransferError.CONNECTION_ERR`
- * 4 = `FileTransferError.ABORT_ERR`
- * 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## ì´ì „ ë²„ì „ê³¼ 호환성 노트
-
-ì´ í”ŒëŸ¬ê·¸ì¸ì˜ ì´ì „ ë²„ì „ë§Œ ì—…ë¡œë“œì— ëŒ€ í•œ 소스 ë˜ëŠ” ë‹¤ìš´ë¡œë“œì— ëŒ€ í•œ ëŒ€ìƒ ìž¥ì¹˜ ì ˆëŒ€ íŒŒì¼ ê²½ë¡œ ë°›ì•„ë“¤ì¼ ê²ƒ ì´ë‹¤. ì´ëŸ¬í•œ 경로 ì¼ë°˜ì 으로 í¼ì˜ 것
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-대 í•œ ë’¤ 호환성, ì´ëŸ¬í•œ 경로 ì—¬ì „ížˆ 허용, ê·¸ë¦¬ê³ ì‘ìš© í”„ë¡œê·¸ëž¨ì´ ì˜êµ¬ ì €ìž¥ì†Œì—ì„œ ì´ì™€ ê°™ì€ ê²½ë¡œ ê¸°ë¡ í–ˆë‹¤, 그때 ê·¸ë“¤ì€ ê³„ì†í• 수 있다면 ì‚¬ìš©í• ìˆ˜.
-
-ì´ëŸ¬í•œ 경로 `FileEntry` ë° íŒŒì¼ í”ŒëŸ¬ê·¸ì¸ì— ì˜í•´ 반환 ëœ `DirectoryEntry` ê°œì²´ì˜ `fullPath` ì†ì„±ì— 노출 ë˜ì—ˆë˜. 그러나 íŒŒì¼ í”ŒëŸ¬ê·¸ì¸ì˜,, ë” ì´ìƒ 새로운 ë²„ì „ ìžë°” 스í¬ë¦½íŠ¸ì´ 경로 노출.
-
-새로 ì—…ê·¸ë ˆì´ë“œ 하는 경우 (1.0.0 ì´ìƒ) ë²„ì „ì˜ íŒŒì¼, ë° ì´ì „ 사용 하 ê³ `entry.fullPath` `download()` ë˜ëŠ” `upload()` ì¸ìˆ˜ë¡œ ë‹¤ìŒ ëŒ€ì‹ íŒŒì¼ ì‹œìŠ¤í…œ Urlì„ ì‚¬ìš© 하 ì—¬ 코드를 변경 해야 합니다.
-
-í¼ì˜ íŒŒì¼ URLì„ ë°˜í™˜ 하는 `FileEntry.toURL()` ë° `DirectoryEntry.toURL()`
-
- cdvfile://localhost/persistent/path/to/file
-
-
-ì–´ë–¤ `download()` ë° `upload()` 방법ì—ì„œ ì ˆëŒ€ íŒŒì¼ ê²½ë¡œ ëŒ€ì‹ ì‚¬ìš©í• ìˆ˜ 있습니다.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-file-transfer/doc/ko/index.md b/plugins/cordova-plugin-file-transfer/doc/ko/index.md
deleted file mode 100644
index a6e39c0..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/ko/index.md
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-ì´ í”ŒëŸ¬ê·¸ì¸ì„ 사용 하면 업로드 ë° ë‹¤ìš´ë¡œë“œ íŒŒì¼ ìˆ˜ 있습니다.
-
-ì´ í”ŒëŸ¬ê·¸ì¸ ê¸€ë¡œë²Œ `FileTransfer`, `FileUploadOptions` ìƒì„±ìžë¥¼ ì •ì˜í•©ë‹ˆë‹¤.
-
-ì „ì— ë²”ìœ„ì—ì„œ ê·¸ë“¤ì€ ì œê³µ ë˜ì§€ 않습니다 때까지 `deviceready` ì´ë²¤íŠ¸ 후.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## 설치
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## ì§€ì› ë˜ëŠ” 플랫í¼
-
-* 아마존 화재 ìš´ì˜ ì²´ì œ
-* 안 ë“œ ë¡œì´ë“œ
-* ë¸”ëž™ë² ë¦¬ 10
-* 브ë¼ìš°ì €
-* 파ì´ì–´ í스 OS * *
-* iOS
-* Windows Phone 7ê³¼ 8 *
-* 윈ë„ìš° 8
-* 윈ë„ìš°
-
-* *`onprogress`ë„ `abort()`를 ì§€ì› í•˜ì§€ 않습니다*
-
-* * *`onprogress`를 ì§€ì› í•˜ì§€ 않습니다*
-
-# FileTransfer
-
-`FileTransfer` 개체는 HTTP 다중 파트 POST ìš”ì²ì„ 사용 하 ì—¬ íŒŒì¼ ì—…ë¡œë“œ ë¿ë§Œ ì•„ë‹ˆë¼ íŒŒì¼ì„ 다운로드 하는 ë°©ë²•ì„ ì œê³µ 합니다.
-
-## ì†ì„±
-
-* **onprogress**:ë¡œ 불리는 `ProgressEvent` 새로운 ì–‘ì˜ ë°ì´í„°ë¥¼ ì „ì†¡ 하는 때마다. *(기능)*
-
-## 메서드
-
-* **업로드**: 파ì¼ì„ ì„œë²„ì— ë³´ëƒ…ë‹ˆë‹¤.
-
-* **다운로드**: 서버ì—ì„œ 파ì¼ì„ 다운로드 합니다.
-
-* **중단**: 진행 ì¤‘ì¸ ì „ì†¡ 중단.
-
-## 업로드
-
-**매개 변수**:
-
-* **fileURL**: ìž¥ì¹˜ì— íŒŒì¼ì„ 나타내는 íŒŒì¼ ì‹œìŠ¤í…œ URL. ì— ëŒ€ í•œ ì´ì „ ë²„ì „ê³¼ 호환성ì„ì´ ìˆ˜ë„ ìž¥ì¹˜ì— ìžˆëŠ” 파ì¼ì˜ ì „ì²´ 경로 수. (참조 [거꾸로 호환성 노트] 아래)
-
-* **서버**: ì¸ì½”딩 íŒŒì¼ ìˆ˜ì‹ ì„œë²„ì˜ URL`encodeURI()`.
-
-* **successCallback**: `FileUploadResult` 개체를 ì „ë‹¬ 하는 콜백. *(기능)*
-
-* **errorCallback**: `FileUploadResult` ê²€ìƒ‰ì— ì˜¤ë¥˜ê°€ ë°œìƒ í•˜ë©´ 실행 ë˜ëŠ” 콜백. `FileTransferError` 개체와 함께 호출 ë©ë‹ˆë‹¤. *(기능)*
-
-* **옵션**: ì„ íƒì 매개 변수 *(개체)*. ìœ íš¨í•œ 키:
-
- * **fileKey**: form ìš”ì†Œì˜ ì´ë¦„. ê¸°ë³¸ê°’ì€ `file` . (DOMString)
- * **íŒŒì¼ ì´ë¦„**: íŒŒì¼ ì´ë¦„ì„ ì„œë²„ì— íŒŒì¼ì„ ì €ìž¥í• ë•Œ 사용 합니다. ê¸°ë³¸ê°’ì€ `image.jpg` . (DOMString)
- * **httpMethod**: `넣어` ë˜ëŠ” `게시물`-사용 하ë„ë¡ HTTP 메서드. `게시물` 기본값입니다. (DOMString)
- * **mimeType**: 업로드 ë°ì´í„°ì˜ mime 형ì‹ì„. `ì´ë¯¸ì§€/jpeg`ì˜ ê¸°ë³¸ê°’ìž…ë‹ˆë‹¤. (DOMString)
- * **params**: HTTP ìš”ì²ì— ì „ë‹¬í• ì„ íƒì 키/ê°’ ìŒì˜ 집합. (개체)
- * **chunkedMode**: ì²í¬ ìŠ¤íŠ¸ë¦¬ë° ëª¨ë“œì—ì„œ ë°ì´í„° 업로드를 합니다. ê¸°ë³¸ê°’ì€ `true`입니다. (부울)
- * **headers**: í—¤ë” ì´ë¦„/í—¤ë” ê°’ì˜ ì§€ë„. ë°°ì—´ì„ ì‚¬ìš© 하 ì—¬ 하나 ì´ìƒì˜ ê°’ì„ ì§€ì • 합니다. (개체)
-
-* **trustAllHosts**: ì„ íƒì 매개 변수는 기본ì 으로 `false` . 만약 ì„¤ì • `true` , ê·¸ê²ƒì€ ëª¨ë“ ë³´ì•ˆ ì¸ì¦ì„œë¥¼ 허용 합니다. ì´ ì•ˆ ë“œ ë¡œì´ë“œ ìžì²´ 서명 ëœ ë³´ì•ˆ ì¸ì¦ì„œë¥¼ 거부 하기 ë•Œë¬¸ì— ìœ ìš© 합니다. 프로ë•ì…˜ 환경ì—ì„œ 사용 권장 ë˜ì§€ 않습니다. 안 ë“œ ë¡œì´ë“œì™€ iOSì—ì„œ 지ì›. *(부울)*
-
-### 예를 들어
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### 예를 들어 í—¤ë” ì—…ë¡œë“œ ë° ì§„í–‰ ì´ë²¤íŠ¸ (안 ë“œ ë¡œì´ë“œì™€ iOS만)
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-`FileUploadResult` 개체 `FileTransfer` ê°œì²´ì˜ `ì›ëž˜` ë°©ë²•ì˜ ì„±ê³µ ì½œë°±ì— ì „ë‹¬ ë©ë‹ˆë‹¤.
-
-### ì†ì„±
-
-* **bytesSent**: ì—…ë¡œë“œì˜ ì¼ë¶€ë¡œ ì„œë²„ì— ë³´ë‚¸ ë°”ì´íŠ¸ 수. (긴)
-
-* **responseCode**: 서버ì—ì„œ 반환 ëœ HTTP ì‘답 코드. (긴)
-
-* **response**: 서버ì—ì„œ 반환 ë˜ëŠ” HTTP ì‘답. (DOMString)
-
-* **headers**: 서버ì—ì„œ HTTP ì‘답 í—¤ë”. (개체)
-
- * 현재 ios만 ì§€ì› í•©ë‹ˆë‹¤.
-
-### iOS 단ì
-
-* ì§€ì› í•˜ì§€ 않는 `responseCode` ë˜ëŠ”`bytesSent`.
-
-## download
-
-**매개 변수**:
-
-* **source**: URLë¡œ ì¸ì½”ë”©ëœ íŒŒì¼, 다운로드 서버`encodeURI()`.
-
-* **target**: ìž¥ì¹˜ì— íŒŒì¼ì„ 나타내는 íŒŒì¼ ì‹œìŠ¤í…œ url. ì— ëŒ€ í•œ ì´ì „ ë²„ì „ê³¼ 호환성ì„ì´ ìˆ˜ë„ ìž¥ì¹˜ì— ìžˆëŠ” 파ì¼ì˜ ì „ì²´ 경로 수. (참조 [거꾸로 호환성 노트] 아래)
-
-* **successCallback**: 콜백 ì „ë‹¬ ë˜ëŠ” `FileEntry` 개체. *(기능)*
-
-* **errorCallback**: `FileEntry`를 ê²€ìƒ‰í• ë•Œ 오류가 ë°œìƒ í•˜ë©´ 실행 ë˜ëŠ” 콜백. `FileTransferError` 개체와 함께 호출 ë©ë‹ˆë‹¤. *(기능)*
-
-* **trustAllHosts**: ì„ íƒì 매개 변수는 기본ì 으로 `false` . 만약 ì„¤ì • `true` , ê·¸ê²ƒì€ ëª¨ë“ ë³´ì•ˆ ì¸ì¦ì„œë¥¼ 허용 합니다. 안 ë“œ ë¡œì´ë“œ ìžì²´ 서명 ëœ ë³´ì•ˆ ì¸ì¦ì„œë¥¼ 거부 하기 ë•Œë¬¸ì— ìœ ìš© 합니다. 프로ë•ì…˜ 환경ì—ì„œ 사용 권장 ë˜ì§€ 않습니다. 안 ë“œ ë¡œì´ë“œì™€ iOSì—ì„œ 지ì›. *(부울)*
-
-* **options**: ì„ íƒì 매개 변수를 현재 지 ì›í•˜ëŠ” 머리글만 (예: ì¸ì¦ (기본 ì¸ì¦), 등).
-
-### 예를 들어
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-## abort
-
-진행 ì¤‘ì¸ ì „ì†¡ì„ ì¤‘ë‹¨í•©ë‹ˆë‹¤. onerror 콜백 FileTransferError.ABORT_ERRì˜ ì˜¤ë¥˜ 코드는 FileTransferError 개체를 ì „ë‹¬ 합니다.
-
-### 예를 들어
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-`FileTransferError` 개체 오류가 ë°œìƒ í•˜ë©´ 오류 ì½œë°±ì— ì „ë‹¬ ë©ë‹ˆë‹¤.
-
-### ì†ì„±
-
-* **code**: 미리 ì •ì˜ ëœ ì˜¤ë¥˜ 코드 중 하나가 ì•„ëž˜ì— ë‚˜ì—´ ëœ. (수)
-
-* **source**: 소스 URL. (문ìžì—´)
-
-* **target**: ëŒ€ìƒ URL. (문ìžì—´)
-
-* **http_status**: HTTP ìƒíƒœ 코드. ì´ íŠ¹ì„±ì€ ì‘답 코드를 HTTP ì—°ê²°ì—ì„œ ìˆ˜ì‹ ì— ì‚¬ìš©í• ìˆ˜ 있습니다. (수)
-
-* **body** ì‘답 본문입니다. ì´ íŠ¹ì„±ì€ HTTP ì—°ê²°ì—ì„œ ì‘ë‹µì„ ë°›ì„ ë•Œì— ì‚¬ìš©í• ìˆ˜ 있습니다. (문ìžì—´)
-
-* **exception**: ì–´ëŠ e.getMessage ë˜ëŠ” e.toString (문ìžì—´)
-
-### ìƒìˆ˜
-
-* 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
-* 2 = `FileTransferError.INVALID_URL_ERR`
-* 3 = `FileTransferError.CONNECTION_ERR`
-* 4 = `FileTransferError.ABORT_ERR`
-* 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## ì´ì „ ë²„ì „ê³¼ 호환성 노트
-
-ì´ í”ŒëŸ¬ê·¸ì¸ì˜ ì´ì „ ë²„ì „ë§Œ ì—…ë¡œë“œì— ëŒ€ í•œ 소스 ë˜ëŠ” ë‹¤ìš´ë¡œë“œì— ëŒ€ í•œ ëŒ€ìƒ ìž¥ì¹˜ ì ˆëŒ€ íŒŒì¼ ê²½ë¡œ ë°›ì•„ë“¤ì¼ ê²ƒ ì´ë‹¤. ì´ëŸ¬í•œ 경로 ì¼ë°˜ì 으로 í¼ì˜ 것
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-대 í•œ ë’¤ 호환성, ì´ëŸ¬í•œ 경로 ì—¬ì „ížˆ 허용, ê·¸ë¦¬ê³ ì‘ìš© í”„ë¡œê·¸ëž¨ì´ ì˜êµ¬ ì €ìž¥ì†Œì—ì„œ ì´ì™€ ê°™ì€ ê²½ë¡œ ê¸°ë¡ í–ˆë‹¤, 그때 ê·¸ë“¤ì€ ê³„ì†í• 수 있다면 ì‚¬ìš©í• ìˆ˜.
-
-ì´ëŸ¬í•œ 경로 `FileEntry` ë° íŒŒì¼ í”ŒëŸ¬ê·¸ì¸ì— ì˜í•´ 반환 ëœ `DirectoryEntry` ê°œì²´ì˜ `fullPath` ì†ì„±ì— 노출 ë˜ì—ˆë˜. 그러나 íŒŒì¼ í”ŒëŸ¬ê·¸ì¸ì˜,, ë” ì´ìƒ 새로운 ë²„ì „ ìžë°” 스í¬ë¦½íŠ¸ì´ 경로 노출.
-
-새로 ì—…ê·¸ë ˆì´ë“œ 하는 경우 (1.0.0 ì´ìƒ) ë²„ì „ì˜ íŒŒì¼, ë° ì´ì „ 사용 하 ê³ `entry.fullPath` `download()` ë˜ëŠ” `upload()` ì¸ìˆ˜ë¡œ ë‹¤ìŒ ëŒ€ì‹ íŒŒì¼ ì‹œìŠ¤í…œ Urlì„ ì‚¬ìš© 하 ì—¬ 코드를 변경 해야 합니다.
-
-í¼ì˜ íŒŒì¼ URLì„ ë°˜í™˜ 하는 `FileEntry.toURL()` ë° `DirectoryEntry.toURL()`
-
- cdvfile://localhost/persistent/path/to/file
-
-
-ì–´ë–¤ `download()` ë° `upload()` 방법ì—ì„œ ì ˆëŒ€ íŒŒì¼ ê²½ë¡œ ëŒ€ì‹ ì‚¬ìš©í• ìˆ˜ 있습니다.
diff --git a/plugins/cordova-plugin-file-transfer/doc/pl/README.md b/plugins/cordova-plugin-file-transfer/doc/pl/README.md
deleted file mode 100644
index c430979..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/pl/README.md
+++ /dev/null
@@ -1,311 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg)](https://travis-ci.org/apache/cordova-plugin-file-transfer)
-
-Plugin dokumentacja:
-
-Plugin pozwala na przesyłanie i pobieranie plików.
-
-Ten plugin określa globalne `FileTransfer`, `FileUploadOptions` konstruktorów.
-
-Chociaż w globalnym zasięgu, są nie dostępne dopiero po `deviceready` imprezie.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## Instalacja
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## Obsługiwane platformy
-
- * Amazon Fire OS
- * Android
- * BlackBerry 10
- * PrzeglÄ…darka
- * Firefox OS **
- * iOS
- * Windows Phone 7 i 8 *
- * Windows 8
- * Windows
-
-\ * *Nie obsługują `onprogress` ani `abort()` *
-
-\ ** *Nie obsługują `onprogress` *
-
-# FileTransfer
-
-Obiekt `FileTransfer` zapewnia sposób wgrać pliki za pomocą Multi-część POST lub PUT żądania HTTP i pobierania plików, jak również.
-
-## Właściwości
-
- * **OnProgress**: o nazwie `ProgressEvent` gdy nowy kawałek danych jest przenoszona. *(Funkcja)*
-
-## Metody
-
- * **wgraj**: wysyła plik na serwer.
-
- * **do pobrania**: pliki do pobrania pliku z serwera.
-
- * **przerwać**: przerywa w toku transferu.
-
-## upload
-
-**Parametry**:
-
- * **fileURL**: URL plików reprezentujących pliku na urządzenie. Dla wstecznej kompatybilności, to może również być pełną ścieżkę pliku na urządzenie. (Zobacz [wstecz zgodności zauważa] poniżej)
-
- * **serwer**: adres URL serwera, aby otrzymać plik, jak kodowane przez`encodeURI()`.
-
- * **successCallback**: wywołania zwrotnego, który jest przekazywany obiekt `FileUploadResult`. *(Funkcja)*
-
- * **errorCallback**: wywołanie zwrotne, które wykonuje, jeżeli wystąpi błąd pobierania `FileUploadResult`. Wywoływany z obiektu `FileTransferError`. *(Funkcja)*
-
- * **Opcje**: parametry opcjonalne *(obiektu)*. Ważne klucze:
-
- * **fileKey**: nazwa elementu form. Domyślnie `file` . (DOMString)
- * **Nazwa pliku**: nazwy pliku, aby użyć podczas zapisywania pliku na serwerze. Domyślnie `image.jpg` . (DOMString)
- * **element httpMethod**: Metoda HTTP do użycia - `umieścić` lub `POST`. Domyślnie `POST`. (DOMString)
- * **mimeType**: Typ mime danych do przesłania. Domyślnie do `image/jpeg`. (DOMString)
- * **params**: zestaw par opcjonalny klucz/wartość w żądaniu HTTP. (Obiekt)
- * **chunkedMode**: czy przekazać dane w trybie pakietowego przesyłania strumieniowego. Wartością domyślną jest `true`. (Wartość logiczna)
- * **headers**: Mapa wartości Nazwa/nagłówka nagłówek. Aby określić więcej niż jedną wartość, należy użyć tablicę. Na iOS, FireOS i Android jeśli nagłówek o nazwie Content-Type jest obecny, wieloczęściowa forma nie danych. (Object)
- * **element httpMethod**: Metoda HTTP np. POST lub PUT. Ustawienia domyślne do `POST`. (DOMString)
-
- * **trustAllHosts**: parametr opcjonalny, domyślnie `false` . Jeśli zestaw `true` , to akceptuje wszystkie certyfikaty bezpieczeństwa. Jest to przydatne, ponieważ Android odrzuca Certyfikaty samopodpisane. Nie zaleca się do użytku produkcyjnego. Obsługiwane na Androida i iOS. *(wartość logiczna)*
-
-### Przykład
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### Przykład z Prześlij nagłówki i zdarzeń postępu (Android i iOS tylko)
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-Obiekt `FileUploadResult` jest przekazywana do sukcesu wywołania zwrotnego metody `upload() służącą` obiektu `FileTransfer`.
-
-### Właściwości
-
- * **bytesSent**: liczba bajtów wysłanych do serwera jako część upload. (długie)
-
- * **responseCode**: kod odpowiedzi HTTP, zwracane przez serwer. (długie)
-
- * **odpowiedź**: HTTP odpowiedzi zwracane przez serwer. (DOMString)
-
- * **nagłówki**: nagłówki HTTP odpowiedzi przez serwer. (Obiekt)
-
- * Obecnie obsługiwane na iOS tylko.
-
-### Dziwactwa iOS
-
- * Nie obsługuje `responseCode` lub`bytesSent`.
-
-## download
-
-**Parametry**:
-
- * **Źródło**: adres URL serwera, aby pobrać plik, jak kodowane przez`encodeURI()`.
-
- * **cel**: url plików reprezentujących pliku na urządzenie. Dla wstecznej kompatybilności, to może również być pełną ścieżkę pliku na urządzenie. (Zobacz [wstecz zgodności zauważa] poniżej)
-
- * **successCallback**: wywołania zwrotnego, który jest przekazywany `FileEntry` obiektu. *(Funkcja)*
-
- * **errorCallback**: wywołanie zwrotne, które wykonuje, jeśli wystąpi błąd podczas pobierania `FileEntry`. Wywoływany z obiektu `FileTransferError`. *(Funkcja)*
-
- * **trustAllHosts**: parametr opcjonalny, domyślnie `false` . Jeśli zestaw `true` , to akceptuje wszystkie certyfikaty bezpieczeństwa. Jest to przydatne, ponieważ Android odrzuca Certyfikaty samopodpisane. Nie zaleca się do użytku produkcyjnego. Obsługiwane na Androida i iOS. *(wartość logiczna)*
-
- * **Opcje**: parametry opcjonalne, obecnie tylko obsługuje nagłówki (takie jak autoryzacja (uwierzytelnianie podstawowe), itp.).
-
-### Przykład
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-### WP8 dziwactwa
-
- * Pobierz wnioski są buforowane przez rodzimych realizacji. Aby uniknąć, buforowanie, przekazać `if-Modified-Since` nagłówka do pobrania Metoda.
-
-## abort
-
-Przerywa w toku transferu. Onerror callback jest przekazywany obiekt FileTransferError, który kod błędu z FileTransferError.ABORT_ERR.
-
-### Przykład
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-Obiekt `FileTransferError` jest przekazywana do błąd wywołania zwrotnego, gdy wystąpi błąd.
-
-### Właściwości
-
- * **Kod**: jeden z kodów błędów wstępnie zdefiniowanych poniżej. (Liczba)
-
- * **Źródło**: URL do źródła. (String)
-
- * **cel**: adres URL do docelowego. (String)
-
- * **HTTP_STATUS**: kod stanu HTTP. Ten atrybut jest dostępna tylko po otrzymaniu kodu odpowiedzi z połączenia HTTP. (Liczba)
-
- * **body** Treść odpowiedzi. Ten atrybut jest dostępna tylko wtedy, gdy odpowiedź jest otrzymanych od połączenia HTTP. (String)
-
- * **exception**: albo e.getMessage lub e.toString (String)
-
-### Stałe
-
- * 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
- * 2 = `FileTransferError.INVALID_URL_ERR`
- * 3 = `FileTransferError.CONNECTION_ERR`
- * 4 = `FileTransferError.ABORT_ERR`
- * 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## Do tyłu zgodności stwierdza
-
-Poprzednie wersje tego pluginu tylko zaakceptować urządzenia bezwzględnych ścieżek jako źródło dla przekazywania, lub w celu pobrania. Te ścieżki będzie zazwyczaj formy
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-Do tyłu zgodności, akceptowane są jeszcze te ścieżki, i jeśli aplikacja nagrał ścieżki, jak te w trwałej pamięci, następnie można nadal stosować.
-
-Te ścieżki były narażone wcześniej we właściwości `fullPath` `FileEntry` i `DirectoryEntry` obiektów zwróconych przez wtyczki pliku. Nowe wersje pliku plugin, jednak już wystawiać te ścieżki do JavaScript.
-
-Jeśli uaktualniasz nowy (1.0.0 lub nowsza) wersja pliku i mieć wcześniej przy `entry.fullPath` jako argumenty `download()` lub `upload() służącą`, a następnie trzeba będzie zmienić kod aby używać adresów URL plików zamiast.
-
-`FileEntry.toURL()` i `DirectoryEntry.toURL()` zwraca adres URL plików formularza
-
- cdvfile://localhost/persistent/path/to/file
-
-
-które mogą być używane zamiast bezwzględna ścieżka zarówno `download()` i `metody upload()` metody.
\ No newline at end of file
diff --git a/plugins/cordova-plugin-file-transfer/doc/pl/index.md b/plugins/cordova-plugin-file-transfer/doc/pl/index.md
deleted file mode 100644
index ff9b557..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/pl/index.md
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-Plugin pozwala na przesyłanie i pobieranie plików.
-
-Ten plugin określa globalne `FileTransfer`, `FileUploadOptions` konstruktorów.
-
-Chociaż w globalnym zasięgu, są nie dostępne dopiero po `deviceready` imprezie.
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## Instalacja
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## Obsługiwane platformy
-
-* Amazon Fire OS
-* Android
-* BlackBerry 10
-* PrzeglÄ…darka
-* Firefox OS **
-* iOS
-* Windows Phone 7 i 8 *
-* Windows 8
-* Windows
-
-* *Nie obsługują `onprogress` ani `abort()`*
-
-* * *Nie obsługują `onprogress`*
-
-# FileTransfer
-
-Obiekt `FileTransfer` zapewnia sposób wgrać pliki przy użyciu żądania HTTP wieloczęściowe POST i pobierania plików, jak również.
-
-## Właściwości
-
-* **OnProgress**: o nazwie `ProgressEvent` gdy nowy kawałek danych jest przenoszona. *(Funkcja)*
-
-## Metody
-
-* **wgraj**: wysyła plik na serwer.
-
-* **do pobrania**: pliki do pobrania pliku z serwera.
-
-* **przerwać**: przerywa w toku transferu.
-
-## upload
-
-**Parametry**:
-
-* **fileURL**: URL plików reprezentujących pliku na urządzenie. Dla wstecznej kompatybilności, to może również być pełną ścieżkę pliku na urządzenie. (Zobacz [wstecz zgodności zauważa] poniżej)
-
-* **serwer**: adres URL serwera, aby otrzymać plik, jak kodowane przez`encodeURI()`.
-
-* **successCallback**: wywołania zwrotnego, który jest przekazywany obiekt `FileUploadResult`. *(Funkcja)*
-
-* **errorCallback**: wywołanie zwrotne, które wykonuje, jeżeli wystąpi błąd pobierania `FileUploadResult`. Wywoływany z obiektu `FileTransferError`. *(Funkcja)*
-
-* **Opcje**: parametry opcjonalne *(obiektu)*. Ważne klucze:
-
- * **fileKey**: nazwa elementu form. Domyślnie `file` . (DOMString)
- * **Nazwa pliku**: nazwy pliku, aby użyć podczas zapisywania pliku na serwerze. Domyślnie `image.jpg` . (DOMString)
- * **element httpMethod**: Metoda HTTP do użycia - `umieścić` lub `POST`. Domyślnie `POST`. (DOMString)
- * **mimeType**: Typ mime danych do przesłania. Domyślnie do `image/jpeg`. (DOMString)
- * **params**: zestaw par opcjonalny klucz/wartość w żądaniu HTTP. (Obiekt)
- * **chunkedMode**: czy przekazać dane w trybie pakietowego przesyłania strumieniowego. Wartością domyślną jest `true`. (Wartość logiczna)
- * **headers**: Mapa wartości Nazwa/nagłówka nagłówek. Aby określić więcej niż jedną wartość, należy użyć tablicę. (Obiekt)
-
-* **trustAllHosts**: parametr opcjonalny, domyślnie `false` . Jeśli zestaw `true` , to akceptuje wszystkie certyfikaty bezpieczeństwa. Jest to przydatne, ponieważ Android odrzuca Certyfikaty samopodpisane. Nie zaleca się do użytku produkcyjnego. Obsługiwane na Androida i iOS. *(wartość logiczna)*
-
-### Przykład
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### Przykład z Prześlij nagłówki i zdarzeń postępu (Android i iOS tylko)
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-Obiekt `FileUploadResult` jest przekazywana do sukcesu wywołania zwrotnego metody `upload() służącą` obiektu `FileTransfer`.
-
-### Właściwości
-
-* **bytesSent**: liczba bajtów wysłanych do serwera jako część upload. (długie)
-
-* **responseCode**: kod odpowiedzi HTTP, zwracane przez serwer. (długie)
-
-* **odpowiedź**: HTTP odpowiedzi zwracane przez serwer. (DOMString)
-
-* **nagłówki**: nagłówki HTTP odpowiedzi przez serwer. (Obiekt)
-
- * Obecnie obsługiwane na iOS tylko.
-
-### Dziwactwa iOS
-
-* Nie obsługuje `responseCode` lub`bytesSent`.
-
-## download
-
-**Parametry**:
-
-* **Źródło**: adres URL serwera, aby pobrać plik, jak kodowane przez`encodeURI()`.
-
-* **cel**: url plików reprezentujących pliku na urządzenie. Dla wstecznej kompatybilności, to może również być pełną ścieżkę pliku na urządzenie. (Zobacz [wstecz zgodności zauważa] poniżej)
-
-* **successCallback**: wywołania zwrotnego, który jest przekazywany `FileEntry` obiektu. *(Funkcja)*
-
-* **errorCallback**: wywołanie zwrotne, które wykonuje, jeśli wystąpi błąd podczas pobierania `FileEntry`. Wywoływany z obiektu `FileTransferError`. *(Funkcja)*
-
-* **trustAllHosts**: parametr opcjonalny, domyślnie `false` . Jeśli zestaw `true` , to akceptuje wszystkie certyfikaty bezpieczeństwa. Jest to przydatne, ponieważ Android odrzuca Certyfikaty samopodpisane. Nie zaleca się do użytku produkcyjnego. Obsługiwane na Androida i iOS. *(wartość logiczna)*
-
-* **Opcje**: parametry opcjonalne, obecnie tylko obsługuje nagłówki (takie jak autoryzacja (uwierzytelnianie podstawowe), itp.).
-
-### Przykład
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-## abort
-
-Przerywa w toku transferu. Onerror callback jest przekazywany obiekt FileTransferError, który kod błędu z FileTransferError.ABORT_ERR.
-
-### Przykład
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-Obiekt `FileTransferError` jest przekazywana do błąd wywołania zwrotnego, gdy wystąpi błąd.
-
-### Właściwości
-
-* **Kod**: jeden z kodów błędów wstępnie zdefiniowanych poniżej. (Liczba)
-
-* **Źródło**: URL do źródła. (String)
-
-* **cel**: adres URL do docelowego. (String)
-
-* **HTTP_STATUS**: kod stanu HTTP. Ten atrybut jest dostępna tylko po otrzymaniu kodu odpowiedzi z połączenia HTTP. (Liczba)
-
-* **body** Treść odpowiedzi. Ten atrybut jest dostępna tylko wtedy, gdy odpowiedź jest otrzymanych od połączenia HTTP. (String)
-
-* **exception**: albo e.getMessage lub e.toString (String)
-
-### Stałe
-
-* 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
-* 2 = `FileTransferError.INVALID_URL_ERR`
-* 3 = `FileTransferError.CONNECTION_ERR`
-* 4 = `FileTransferError.ABORT_ERR`
-* 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## Do tyłu zgodności stwierdza
-
-Poprzednie wersje tego pluginu tylko zaakceptować urządzenia bezwzględnych ścieżek jako źródło dla przekazywania, lub w celu pobrania. Te ścieżki będzie zazwyczaj formy
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-Do tyłu zgodności, akceptowane są jeszcze te ścieżki, i jeśli aplikacja nagrał ścieżki, jak te w trwałej pamięci, następnie można nadal stosować.
-
-Te ścieżki były narażone wcześniej we właściwości `fullPath` `FileEntry` i `DirectoryEntry` obiektów zwróconych przez wtyczki pliku. Nowe wersje pliku plugin, jednak już wystawiać te ścieżki do JavaScript.
-
-Jeśli uaktualniasz nowy (1.0.0 lub nowsza) wersja pliku i mieć wcześniej przy `entry.fullPath` jako argumenty `download()` lub `upload() służącą`, a następnie trzeba będzie zmienić kod aby używać adresów URL plików zamiast.
-
-`FileEntry.toURL()` i `DirectoryEntry.toURL()` zwraca adres URL plików formularza
-
- cdvfile://localhost/persistent/path/to/file
-
-
-które mogą być używane zamiast bezwzględna ścieżka zarówno `download()` i `metody upload()` metody.
diff --git a/plugins/cordova-plugin-file-transfer/doc/ru/index.md b/plugins/cordova-plugin-file-transfer/doc/ru/index.md
deleted file mode 100644
index cdd5a15..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/ru/index.md
+++ /dev/null
@@ -1,290 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-Ðтот плагин позволÑет вам загружать и Ñкачивать файлы.
-
-## УÑтановка
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## Поддерживаемые платформы
-
-* Amazon Fire OS
-* Android
-* BlackBerry 10
-* Firefox OS **
-* iOS
-* Windows Phone 7 и 8 *
-* Windows 8 ***|
-* Windows ***|
-
-* *Ðе поддерживают `onprogress` , ни `abort()` *
-
-** *Ðе поддерживает `onprogress` *
-
-ЧаÑÑ‚Ð¸Ñ‡Ð½Ð°Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ° `onprogress` Ð´Ð»Ñ Ð·Ð°ÐºÐ°Ñ‡ÐºÐ¸ метод. `onprogress` вызываетÑÑ Ñ Ð¿ÑƒÑтой ход Ñобытий Ð±Ð»Ð°Ð³Ð¾Ð´Ð°Ñ€Ñ Windows limitations_
-
-# FileTransfer
-
-`FileTransfer`Объект предоÑтавлÑет ÑпоÑоб Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ файлов Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ неÑкольких чаÑтей запроÑа POST HTTP и Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ файлов, а также.
-
-## Параметры
-
-* **OnProgress**: называетÑÑ Ñ `ProgressEvent` вÑÑкий раз, когда новый фрагмент данных передаетÑÑ. *(ФункциÑ)*
-
-## Методы
-
-* **добавлено**: отправлÑет файл на Ñервер.
-
-* **Ñкачать**: Скачать файл Ñ Ñервера.
-
-* **прервать**: прерывает передачу в прогреÑÑ.
-
-## загрузить
-
-**Параметры**:
-
-* **fileURL**: файловой ÑиÑтемы URL-адреÑ, предÑтавлÑющий файл на уÑтройÑтве. Ð”Ð»Ñ Ð¾Ð±Ñ€Ð°Ñ‚Ð½Ð¾Ð¹ ÑовмеÑтимоÑти, Ñто также может быть полный путь к файлу на уÑтройÑтве. (См. [обратной ÑовмеÑтимоÑти отмечает] ниже)
-
-* **Ñервер**: URL-Ð°Ð´Ñ€ÐµÑ Ñервера, чтобы получить файл, как закодированные`encodeURI()`.
-
-* **successCallback**: обратного вызова, передаваемого `Metadata` объект. *(ФункциÑ)*
-
-* **errorCallback**: обратного вызова, который выполнÑетÑÑ Ð² Ñлучае Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ¸ `Metadata` . Вызываемый Ñ `FileTransferError` объект. *(ФункциÑ)*
-
-* **опции**: необÑзательные параметры *(объект)*. ДопуÑтимые ключи:
-
- * **fileKey**: Ð¸Ð¼Ñ Ñлемента form. По умолчанию `file` . (DOMString)
- * **Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°**: Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° Ð´Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¿Ñ€Ð¸ Ñохранении файла на Ñервере. По умолчанию `image.jpg` . (DOMString)
- * **mimeType**: mime-тип данных Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸. По умолчанию `image/jpeg` . (DOMString)
- * **params**: набор пар дополнительный ключ/значение Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ´Ð°Ñ‡Ð¸ в HTTP-запроÑе. (Объект)
- * **chunkedMode**: Ñледует ли загружать данные в фрагментарноÑти потоковом режиме. По умолчанию `true` . (ЛогичеÑкое значение)
- * **заголовки**: Карта значений заголовок Ð¸Ð¼Ñ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ°. ИÑпользуйте маÑÑив Ð´Ð»Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð±Ð¾Ð»ÐµÐµ одного значениÑ. (Объект)
-
-* **trustAllHosts**: необÑзательный параметр, по умолчанию `false` . ЕÑли значение `true` , она принимает вÑе Ñертификаты безопаÑноÑти. Ðто полезно, поÑкольку Android отвергает ÑамозаверÑющие Ñертификаты. Ðе рекомендуетÑÑ Ð´Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð² производÑтве. ПоддерживаетÑÑ Ð½Ð° Android и iOS. *(логичеÑкое значение)*
-
-### Пример
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### Пример Ñ Ð·Ð°Ð³Ñ€ÑƒÐ¶Ð°Ñ‚ÑŒ заголовки и ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ Progress (Android и iOS только)
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-Объект `FileUploadResult` передаетÑÑ Ð½Ð° уÑпех обратного вызова метода `upload()` объекта `FileTransfer`.
-
-### Параметры
-
-* **bytesSent**: количеÑтво байт, отправленных на Ñервер как чаÑÑ‚ÑŒ загрузки. (длиннаÑ)
-
-* **responseCode**: код ответа HTTP, возвращаемых Ñервером. (длиннаÑ)
-
-* **ответ**: ответ HTTP, возвращаемых Ñервером. (DOMString)
-
-* **заголовки**: заголовки ответов HTTP-Ñервером. (Объект)
-
- * Ð’ наÑтоÑщее Ð²Ñ€ÐµÐ¼Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶Ð¸Ð²Ð°ÐµÑ‚ÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ Ð´Ð»Ñ iOS.
-
-### ОÑобенноÑти iOS
-
-* Ðе поддерживает `responseCode` или`bytesSent`.
-
-## Скачать
-
-**Параметры**:
-
-* **иÑточник**: URL-Ð°Ð´Ñ€ÐµÑ Ñервера Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ файла, как закодированные`encodeURI()`.
-
-* **Цель**: файловой ÑиÑтемы URL-адреÑ, предÑтавлÑющий файл на уÑтройÑтве. Ð”Ð»Ñ Ð¾Ð±Ñ€Ð°Ñ‚Ð½Ð¾Ð¹ ÑовмеÑтимоÑти, Ñто также может быть полный путь к файлу на уÑтройÑтве. (См. [обратной ÑовмеÑтимоÑти отмечает] ниже)
-
-* **successCallback**: обратного вызова, передаваемого `FileEntry` объект. *(ФункциÑ)*
-
-* **errorCallback**: обратного вызова, который выполнÑетÑÑ, еÑли возникает ошибка при получении `Metadata` . Вызываемый Ñ `FileTransferError` объект. *(ФункциÑ)*
-
-* **trustAllHosts**: необÑзательный параметр, по умолчанию `false` . ЕÑли значение `true` , она принимает вÑе Ñертификаты безопаÑноÑти. Ðто полезно, потому что Android отвергает ÑамозаверÑющие Ñертификаты. Ðе рекомендуетÑÑ Ð´Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð² производÑтве. ПоддерживаетÑÑ Ð½Ð° Android и iOS. *(логичеÑкое значение)*
-
-* **опции**: необÑзательные параметры, в наÑтоÑщее Ð²Ñ€ÐµÐ¼Ñ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ поддерживает заголовки (например авторизации (Ð±Ð°Ð·Ð¾Ð²Ð°Ñ Ð°ÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ) и Ñ‚.д.).
-
-### Пример
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-## прервать
-
-Прерывает передачу в прогреÑÑ. Onerror обратного вызова передаетÑÑ Ð¾Ð±ÑŠÐµÐºÑ‚ FileTransferError, который имеет код ошибки FileTransferError.ABORT_ERR.
-
-### Пример
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-A `FileTransferError` при ошибке обратного вызова передаетÑÑ Ð¾Ð±ÑŠÐµÐºÑ‚, при возникновении ошибки.
-
-### Параметры
-
-* **код**: один из кодов Ñтандартных ошибок, перечиÑленные ниже. (ЧиÑло)
-
-* **иÑточник**: URL-Ð°Ð´Ñ€ÐµÑ Ð¸Ñточника. (Строка)
-
-* **Цель**: URL-Ð°Ð´Ñ€ÐµÑ Ðº целевому объекту. (Строка)
-
-* **http_status**: код ÑоÑтоÑÐ½Ð¸Ñ HTTP. Ðтот атрибут доÑтупен только при код ответа от HTTP-ÑоединениÑ. (ЧиÑло)
-
-* **иÑключение**: либо e.getMessage или e.toString (Ñтрока)
-
-### КонÑтанты
-
-* 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
-* 2 = `FileTransferError.INVALID_URL_ERR`
-* 3 = `FileTransferError.CONNECTION_ERR`
-* 4 = `FileTransferError.ABORT_ERR`
-* 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## Обратной ÑовмеÑтимоÑти отмечает
-
-Предыдущие верÑии Ñтого плагина будет принимать только уÑтройÑтва ÐбÑолют файлам как иÑточник Ð´Ð»Ñ Ð·Ð°ÐºÐ°Ñ‡ÐºÐ¸, или как целевых Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·Ð¾Ðº. Обычно Ñти пути бы формы
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-Ð”Ð»Ñ Ð¾Ð±Ñ€Ð°Ñ‚Ð½Ð¾Ð¹ ÑовмеÑтимоÑти, по-прежнему принимаютÑÑ Ñти пути, и еÑли ваше приложение зарегиÑтрировано пути как в поÑтоÑнное хранилище, то они могут продолжать иÑпользоватьÑÑ.
-
-Ðти пути ранее были видны в `fullPath` ÑвойÑтва `FileEntry` и `DirectoryEntry` объекты, возвращаемые файл плагина. Ðовые верÑии файла плагина, однако, не подвергать Ñти пути в JavaScript.
-
-ЕÑли вы переходите на новый (1.0.0 или новее) верÑию файла и вы ранее иÑпользовали `entry.fullPath` в качеÑтве аргументов `download()` или `upload()` , то вам необходимо будет изменить код Ð´Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¾Ð¹ ÑиÑтемы URL вмеÑто.
-
-`FileEntry.toURL()`и `DirectoryEntry.toURL()` возвращает URL-Ð°Ð´Ñ€ÐµÑ Ñ„Ð¾Ñ€Ð¼Ñ‹ файловой ÑиÑтемы
-
- cdvfile://localhost/persistent/path/to/file
-
-
-которые могут быть иÑпользованы вмеÑто абÑолютного пути в обоих `download()` и `upload()` методы.
diff --git a/plugins/cordova-plugin-file-transfer/doc/zh/README.md b/plugins/cordova-plugin-file-transfer/doc/zh/README.md
deleted file mode 100644
index 5399b04..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/zh/README.md
+++ /dev/null
@@ -1,311 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg)](https://travis-ci.org/apache/cordova-plugin-file-transfer)
-
-外掛程å¼æª”:
-
-這個外掛程å¼å…è¨±ä½ ä¸Šå‚³å’Œä¸‹è¼‰æª”æ¡ˆã€‚
-
-這個外掛程å¼å®šç¾©å…¨åŸŸ `FileTransfer`,`FileUploadOptions` 的建構函å¼ã€‚
-
-雖然在全çƒç¯„åœå…§ï¼Œä»–們ä¸å¯ç”¨ç›´åˆ° `deviceready` 事件之後。
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## 安è£
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## 支æ´çš„平臺
-
- * 亞馬éœç« OS
- * Android 系統
- * 黑莓 10
- * ç€è¦½å™¨
- * ç«ç‹ç€è¦½å™¨çš„作æ¥ç³»çµ± * *
- * iOS
- * Windows Phone 7 和 8 *
- * Windows 8
- * Windows
-
-\ **ä¸æ”¯æ´`onprogress`也`abort()` *
-
-\ * **ä¸æ”¯æ´`onprogress` *
-
-# 檔案傳輸
-
-`FileTransfer`物件æ供上傳檔使用 HTTP 多部分è·ä½æˆ–付諸表決的請求,並將檔以åŠä¸‹è¼‰çš„æ–¹å¼ã€‚
-
-## 屬性
-
- * **onprogress**: 使用調用 `ProgressEvent` æ¯ç•¶ä¸€å¡Šæ–°çš„資料傳輸。*(函數)*
-
-## 方法
-
- * **upload**: 將檔發é€åˆ°ä¼ºæœå™¨ã€‚
-
- * **download**: 從伺æœå™¨ä¸Šä¸‹è¼‰æª”案。
-
- * **abort**: ä¸æ¢æ£åœ¨é€²è¡Œè½‰è®“。
-
-## upload
-
-**åƒæ•¸**:
-
- * **fileURL**: 表示檔在è¨å‚™ä¸Šçš„檔案系統 URL。 為å‘後相容性,這也å¯ä»¥å°‡è¨å‚™ä¸Šçš„檔的完整路徑。 (請åƒè¦‹ [å‘後相容性注æ„到] 下é¢)
-
- * **server**: 伺æœå™¨ä»¥æŽ¥æ”¶è©²æª”,由編碼的 URL`encodeURI()`.
-
- * **successCallback**: 一個通éŽä¸€å€‹ `FileUploadResult` 物件的回檔。*(函數)*
-
- * **errorCallback**: 如果發生錯誤,檢索 `FileUploadResult` 執行一個回檔。使用 `FileTransferError` 物件調用。*(函數)*
-
- * **options**: å¯é¸åƒæ•¸*(物件)*。有效的金鑰:
-
- * **fileKey**: è¡¨å–®å…ƒç´ çš„å稱。é è¨å€¼ç‚º `file` 。() DOMString
- * **fileName**: è¦ä¿å˜åœ¨ä¼ºæœå™¨ä¸Šçš„檔時使用的檔案å稱。é è¨å€¼ç‚º `image.jpg` 。() DOMString
- * **httpMethod**: HTTP 方法使用-`PUT` 或 `POST`。é è¨å€¼ç‚º `POST`。() DOMString
- * **mimeType**: è¦ä¸Šè¼‰çš„資料的 mime 類型。é è¨è¨ç½®ç‚º `image/jpeg`。() DOMString
- * **params**: 一組è¦åœ¨ HTTP è¦æ±‚ä¸å‚³éžçš„å¯é¸çš„éµå€¼å°ã€‚(物件)
- * **chunkedMode**: 是å¦è¦åˆ†å¡Šçš„æµå¼è™•ç†æ¨¡å¼ä¸çš„資料上載。é è¨å€¼ç‚º `true`。(布林值)
- * **headers**: 地圖的標é å稱/標é 值。 使用陣列來指定多個值。 IOS〠FireOS,和安å“系統,如果已命å的內容類型標é å˜åœ¨ï¼Œå¤šéƒ¨åˆ†è¡¨å–®è³‡æ–™ä¸è¢«ä½¿ç”¨ã€‚ (Object)
- * **httpMethod**: HTTP 方法,例如使用張貼或放。 é è¨ç‚º`開機自檢`。() DOMString
-
- * **trustAllHosts**: å¯é¸åƒæ•¸ï¼Œé è¨å€¼ç‚º `false` 。 如果è¨ç½®ç‚º `true` ,它å¯ä»¥æŽ¥å—的所有安全è‰æ›¸ã€‚ é€™æ˜¯æœ‰ç”¨çš„å› ç‚º android 系統拒絕自簽å的安全è‰æ›¸ã€‚ ä¸å»ºè°ä¾›ç”Ÿç”¢ä½¿ç”¨ã€‚ 在 Android å’Œ iOS 上å—支æ´ã€‚ *(布林值)*
-
-### 示例
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### 與上傳的標é 和進度事件 (Android å’Œ iOS åªï¼‰ 的示例
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-`FileUploadResult` 物件將傳éžçµ¦è©² `檔案傳輸` 物件的 `upload()` 方法的æˆåŠŸå›žæª”。
-
-### 屬性
-
- * **bytesSent**: 作為上載的一部分發é€åˆ°ä¼ºæœå™¨çš„ä½å…ƒçµ„數。(é•·)
-
- * **responseCode**: 由伺æœå™¨è¿”回的 HTTP 回應代碼。(é•·)
-
- * **response**: 由伺æœå™¨è¿”回的 HTTP 回應。() DOMString
-
- * **headers**: 由伺æœå™¨çš„ HTTP 回應標é 。(物件)
-
- * ç›®å‰æ”¯æ´çš„ iOS åªã€‚
-
-### iOS 的怪癖
-
- * ä¸æ”¯æ´ `responseCode` 或`bytesSent`.
-
-## download
-
-**åƒæ•¸**:
-
- * **source**: è¦ä¸‹è¼‰çš„檔,如由編碼的伺æœå™¨çš„ URL`encodeURI()`.
-
- * **target**: 表示檔在è¨å‚™ä¸Šçš„檔案系統 url。 為å‘後相容性,這也å¯ä»¥å°‡è¨å‚™ä¸Šçš„檔的完整路徑。 (請åƒè¦‹ [å‘後相容性注æ„到] 下é¢)
-
- * **successCallback**: 傳éžä¸€å€‹å›žæª” `FileEntry` 物件。*(函數)*
-
- * **errorCallback**: 如果檢索 `FileEntry` 時發生錯誤,則執行一個回檔。使用 `FileTransferError` 物件調用。*(函數)*
-
- * **trustAllHosts**: å¯é¸åƒæ•¸ï¼Œé è¨å€¼ç‚º `false` 。 如果è¨ç½®ç‚º `true` ,它å¯ä»¥æŽ¥å—的所有安全è‰æ›¸ã€‚ é€™æ˜¯æœ‰ç”¨çš„å› ç‚º Android 拒絕自行簽署å¼å®‰å…¨è‰æ›¸ã€‚ ä¸å»ºè°ä¾›ç”Ÿç”¢ä½¿ç”¨ã€‚ 在 Android å’Œ iOS 上å—支æ´ã€‚ *(布林值)*
-
- * **options**: å¯é¸åƒæ•¸ï¼Œç›®å‰åªæ”¯æ´æ¨™é¡Œ (如授權 (基本驗è‰ï¼‰ ç‰ï¼‰ã€‚
-
-### 示例
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-### WP8 的怪癖
-
- * 下載請求由本機實ç¾è¢«ç·©å˜ã€‚è‹¥è¦é¿å…ç·©å˜ï¼Œå‚³éž`如果修改自`郵件é 以下載方法。
-
-## abort
-
-ä¸æ¢æ£åœ¨é€²è¡Œè½‰è®“。Onerror 回檔傳éžä¸€å€‹ FileTransferError 物件具有 FileTransferError.ABORT_ERR 錯誤代碼。
-
-### 示例
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-當發生錯誤時,`FileTransferError` 物件將傳éžçµ¦éŒ¯èª¤å›žæª”。
-
-### 屬性
-
- * **code**: 下é¢åˆ—出的é 定義的錯誤代碼之一。(人數)
-
- * **source**: æºçš„ URL。(å—串)
-
- * **target**: 到目標 URL。(å—串)
-
- * **HTTP_status**: HTTP 狀態碼。從 HTTP 連接收到一個回應代碼時,æ¤å±¬æ€§æ‰å¯ç”¨ã€‚(人數)
-
- * **body**回應æ£æ–‡ã€‚æ¤å±¬æ€§åªèƒ½æ˜¯å¯ç”¨çš„當該 HTTP 連接收到ç”覆。(å—串)
-
- * **exception**: è¦éº¼ e.getMessage 或 e.toString (å—串)
-
-### 常é‡
-
- * 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
- * 2 = `FileTransferError.INVALID_URL_ERR`
- * 3 = `FileTransferError.CONNECTION_ERR`
- * 4 = `FileTransferError.ABORT_ERR`
- * 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## å‘後相容性注æ„到
-
-以å‰ç‰ˆæœ¬çš„這個外掛程å¼æ‰æœƒæŽ¥å—è¨å‚™-絕å°æª”路徑作為æºå°æ–¼ä¸Šè¼‰ï¼Œæˆ–用於下載的目標。這些路徑通常會在表單
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-為å‘後相容性,這些路徑ä»æœƒè¢«æŽ¥å—,和如果您的應用程å¼å·²éŒ„å¾—åƒé€™äº›åœ¨æŒä¹…性å˜å„²çš„路徑,然後他們å¯ä»¥ç¹¼çºŒä½¿ç”¨ã€‚
-
-這些路徑被以å‰æš´éœ²åœ¨ `FileEntry` 和由檔外掛程å¼è¿”回的 `DirectoryEntry` 物件的 `fullPath` 屬性ä¸ã€‚ 新版本的檔的外掛程å¼ï¼Œä½†æ˜¯ï¼Œä¸å†å…¬é–‹é€™äº› JavaScript 的路徑。
-
-如果您è¦å‡ç´šåˆ°æ–° (1.0.0 或更高版本) ç‰ˆæœ¬çš„æª”ï¼Œå’Œä½ ä»¥å‰ä¸€ç›´åœ¨ä½¿ç”¨ `entry.fullPath` 作為åƒæ•¸åˆ° `download()` 或 `upload()`ï¼Œé‚£éº¼ä½ å°‡éœ€è¦æ›´æ”¹ä»£ç¢¼ä»¥ä½¿ç”¨æª”案系統的 Url 來代替。
-
-`FileEntry.toURL()` 和 `DirectoryEntry.toURL()` 返回的表單檔案 URL
-
- cdvfile://localhost/persistent/path/to/file
-
-
-它å¯ä»¥ç”¨åœ¨ `download()` å’Œ `upload()` 兩種方法ä¸çš„絕å°æª”路徑ä½ç½®ã€‚
\ No newline at end of file
diff --git a/plugins/cordova-plugin-file-transfer/doc/zh/index.md b/plugins/cordova-plugin-file-transfer/doc/zh/index.md
deleted file mode 100644
index b3af1eb..0000000
--- a/plugins/cordova-plugin-file-transfer/doc/zh/index.md
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-# cordova-plugin-file-transfer
-
-這個外掛程å¼å…è¨±ä½ ä¸Šå‚³å’Œä¸‹è¼‰æª”æ¡ˆã€‚
-
-這個外掛程å¼å®šç¾©å…¨åŸŸ `FileTransfer`,`FileUploadOptions` 的建構函å¼ã€‚
-
-雖然在全çƒç¯„åœå…§ï¼Œä»–們ä¸å¯ç”¨ç›´åˆ° `deviceready` 事件之後。
-
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- console.log(FileTransfer);
- }
-
-
-## 安è£
-
- cordova plugin add cordova-plugin-file-transfer
-
-
-## 支æ´çš„平臺
-
-* 亞馬éœç« OS
-* Android 系統
-* 黑莓 10
-* ç€è¦½å™¨
-* ç«ç‹ç€è¦½å™¨çš„作æ¥ç³»çµ± * *
-* iOS
-* Windows Phone 7 和 8 *
-* Windows 8
-* Windows
-
-* *ä¸æ”¯æ´ `onprogress` 也 `abort()`*
-
-* * *ä¸æ”¯æ´ `onprogress`*
-
-# FileTransfer
-
-`FileTransfer` 物件æ供一種使用 HTTP 多部分 POST 請求的檔上傳,下載檔案以åŠæ–¹å¼ã€‚
-
-## 屬性
-
-* **onprogress**: 使用調用 `ProgressEvent` æ¯ç•¶ä¸€å¡Šæ–°çš„資料傳輸。*(函數)*
-
-## 方法
-
-* **upload**: 將檔發é€åˆ°ä¼ºæœå™¨ã€‚
-
-* **download**: 從伺æœå™¨ä¸Šä¸‹è¼‰æª”案。
-
-* **abort**: ä¸æ¢æ£åœ¨é€²è¡Œè½‰è®“。
-
-## upload
-
-**åƒæ•¸**:
-
-* **fileURL**: 表示檔在è¨å‚™ä¸Šçš„檔案系統 URL。 為å‘後相容性,這也å¯ä»¥å°‡è¨å‚™ä¸Šçš„檔的完整路徑。 (請åƒè¦‹ [å‘後相容性注æ„到] 下é¢)
-
-* **server**: 伺æœå™¨ä»¥æŽ¥æ”¶è©²æª”,由編碼的 URL`encodeURI()`.
-
-* **successCallback**: 一個通éŽä¸€å€‹ `FileUploadResult` 物件的回檔。*(函數)*
-
-* **errorCallback**: 如果發生錯誤,檢索 `FileUploadResult` 執行一個回檔。使用 `FileTransferError` 物件調用。*(函數)*
-
-* **options**: å¯é¸åƒæ•¸*(物件)*。有效的金鑰:
-
- * **fileKey**: è¡¨å–®å…ƒç´ çš„å稱。é è¨å€¼ç‚º `file` 。() DOMString
- * **fileName**: è¦ä¿å˜åœ¨ä¼ºæœå™¨ä¸Šçš„檔時使用的檔案å稱。é è¨å€¼ç‚º `image.jpg` 。() DOMString
- * **httpMethod**: HTTP 方法使用-`PUT` 或 `POST`。é è¨å€¼ç‚º `POST`。() DOMString
- * **mimeType**: è¦ä¸Šè¼‰çš„資料的 mime 類型。é è¨è¨ç½®ç‚º `image/jpeg`。() DOMString
- * **params**: 一組è¦åœ¨ HTTP è¦æ±‚ä¸å‚³éžçš„å¯é¸çš„éµå€¼å°ã€‚(物件)
- * **chunkedMode**: 是å¦è¦åˆ†å¡Šçš„æµå¼è™•ç†æ¨¡å¼ä¸çš„資料上載。é è¨å€¼ç‚º `true`。(布林值)
- * **headers**: 地圖的標é å稱/標é 值。使用陣列來指定多個值。(物件)
-
-* **trustAllHosts**: å¯é¸åƒæ•¸ï¼Œé è¨å€¼ç‚º `false` 。 如果è¨ç½®ç‚º `true` ,它接å—的所有安全è‰æ›¸ã€‚ é€™æ˜¯æœ‰ç”¨çš„å› ç‚º android 系統拒絕自簽å的安全è‰æ›¸ã€‚ ä¸å»ºè°ä¾›ç”Ÿç”¢ä½¿ç”¨ã€‚ æ”¯æ´ Android å’Œ iOS。 *(布林值)*
-
-### 示例
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- var fail = function (error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = "text/plain";
-
- var params = {};
- params.value1 = "test";
- params.value2 = "param";
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
-
-
-### 與上傳的標é 和進度事件 (Android å’Œ iOS åªï¼‰ 的示例
-
- function win(r) {
- console.log("Code = " + r.responseCode);
- console.log("Response = " + r.response);
- console.log("Sent = " + r.bytesSent);
- }
-
- function fail(error) {
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var uri = encodeURI("http://some.server.com/upload.php");
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
- options.mimeType="text/plain";
-
- var headers={'headerParam':'headerValue'};
-
- options.headers = headers;
-
- var ft = new FileTransfer();
- ft.onprogress = function(progressEvent) {
- if (progressEvent.lengthComputable) {
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
- } else {
- loadingStatus.increment();
- }
- };
- ft.upload(fileURL, uri, win, fail, options);
-
-
-## FileUploadResult
-
-`FileUploadResult` 物件將傳éžçµ¦è©² `檔案傳輸` 物件的 `upload()` 方法的æˆåŠŸå›žæª”。
-
-### 屬性
-
-* **bytesSent**: 作為上載的一部分發é€åˆ°ä¼ºæœå™¨çš„ä½å…ƒçµ„數。(é•·)
-
-* **responseCode**: 由伺æœå™¨è¿”回的 HTTP 回應代碼。(é•·)
-
-* **response**: 由伺æœå™¨è¿”回的 HTTP 回應。() DOMString
-
-* **headers**: 由伺æœå™¨çš„ HTTP 回應標é 。(物件)
-
- * ç›®å‰æ”¯æ´çš„ iOS åªã€‚
-
-### iOS 的怪癖
-
-* ä¸æ”¯æ´ `responseCode` 或`bytesSent`.
-
-## download
-
-**åƒæ•¸**:
-
-* **source**: è¦ä¸‹è¼‰çš„檔,如由編碼的伺æœå™¨çš„ URL`encodeURI()`.
-
-* **target**: 表示檔在è¨å‚™ä¸Šçš„檔案系統 url。 為å‘後相容性,這也å¯ä»¥å°‡è¨å‚™ä¸Šçš„檔的完整路徑。 (請åƒè¦‹ [å‘後相容性注æ„到] 下é¢)
-
-* **successCallback**: 傳éžä¸€å€‹å›žæª” `FileEntry` 物件。*(函數)*
-
-* **errorCallback**: 如果檢索 `FileEntry` 時發生錯誤,則執行一個回檔。使用 `FileTransferError` 物件調用。*(函數)*
-
-* **trustAllHosts**: å¯é¸åƒæ•¸ï¼Œé è¨å€¼ç‚º `false` 。 如果è¨ç½®ç‚º `true` ,它å¯ä»¥æŽ¥å—的所有安全è‰æ›¸ã€‚ é€™æ˜¯æœ‰ç”¨çš„å› ç‚º Android 拒絕自行簽署å¼å®‰å…¨è‰æ›¸ã€‚ ä¸å»ºè°ä¾›ç”Ÿç”¢ä½¿ç”¨ã€‚ 在 Android å’Œ iOS 上å—支æ´ã€‚ *(布林值)*
-
-* **options**: å¯é¸åƒæ•¸ï¼Œç›®å‰åªæ”¯æ´æ¨™é¡Œ (如授權 (基本驗è‰ï¼‰ ç‰ï¼‰ã€‚
-
-### 示例
-
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
- // for example, cdvfile://localhost/persistent/path/to/downloads/
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI("http://some.server.com/download.php");
-
- fileTransfer.download(
- uri,
- fileURL,
- function(entry) {
- console.log("download complete: " + entry.toURL());
- },
- function(error) {
- console.log("download error source " + error.source);
- console.log("download error target " + error.target);
- console.log("upload error code" + error.code);
- },
- false,
- {
- headers: {
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
- }
- }
- );
-
-
-## abort
-
-ä¸æ¢æ£åœ¨é€²è¡Œè½‰è®“。Onerror 回檔傳éžä¸€å€‹ FileTransferError 物件具有 FileTransferError.ABORT_ERR 錯誤代碼。
-
-### 示例
-
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
- // for example, cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
- console.log("Should not be called.");
- }
-
- var fail = function(error) {
- // error.code == FileTransferError.ABORT_ERR
- alert("An error has occurred: Code = " + error.code);
- console.log("upload error source " + error.source);
- console.log("upload error target " + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey="file";
- options.fileName="myphoto.jpg";
- options.mimeType="image/jpeg";
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
- ft.abort();
-
-
-## FileTransferError
-
-當發生錯誤時,`FileTransferError` 物件將傳éžçµ¦éŒ¯èª¤å›žæª”。
-
-### 屬性
-
-* **code**: 下é¢åˆ—出的é 定義的錯誤代碼之一。(人數)
-
-* **source**: æºçš„ URL。(å—串)
-
-* **target**: 到目標 URL。(å—串)
-
-* **HTTP_status**: HTTP 狀態碼。從 HTTP 連接收到一個回應代碼時,æ¤å±¬æ€§æ‰å¯ç”¨ã€‚(人數)
-
-* **body**回應æ£æ–‡ã€‚æ¤å±¬æ€§åªèƒ½æ˜¯å¯ç”¨çš„當該 HTTP 連接收到ç”覆。(å—串)
-
-* **exception**: è¦éº¼ e.getMessage 或 e.toString (å—串)
-
-### 常é‡
-
-* 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
-* 2 = `FileTransferError.INVALID_URL_ERR`
-* 3 = `FileTransferError.CONNECTION_ERR`
-* 4 = `FileTransferError.ABORT_ERR`
-* 5 = `FileTransferError.NOT_MODIFIED_ERR`
-
-## å‘後相容性注æ„到
-
-以å‰ç‰ˆæœ¬çš„這個外掛程å¼æ‰æœƒæŽ¥å—è¨å‚™-絕å°æª”路徑作為æºå°æ–¼ä¸Šè¼‰ï¼Œæˆ–用於下載的目標。這些路徑通常會在表單
-
- /var/mobile/Applications//Documents/path/to/file (iOS)
- /storage/emulated/0/path/to/file (Android)
-
-
-為å‘後相容性,這些路徑ä»æœƒè¢«æŽ¥å—,和如果您的應用程å¼å·²éŒ„å¾—åƒé€™äº›åœ¨æŒä¹…性å˜å„²çš„路徑,然後他們å¯ä»¥ç¹¼çºŒä½¿ç”¨ã€‚
-
-這些路徑被以å‰æš´éœ²åœ¨ `FileEntry` 和由檔外掛程å¼è¿”回的 `DirectoryEntry` 物件的 `fullPath` 屬性ä¸ã€‚ 新版本的檔的外掛程å¼ï¼Œä½†æ˜¯ï¼Œä¸å†å…¬é–‹é€™äº› JavaScript 的路徑。
-
-如果您è¦å‡ç´šåˆ°æ–° (1.0.0 或更高版本) ç‰ˆæœ¬çš„æª”ï¼Œå’Œä½ ä»¥å‰ä¸€ç›´åœ¨ä½¿ç”¨ `entry.fullPath` 作為åƒæ•¸åˆ° `download()` 或 `upload()`ï¼Œé‚£éº¼ä½ å°‡éœ€è¦æ›´æ”¹ä»£ç¢¼ä»¥ä½¿ç”¨æª”案系統的 Url 來代替。
-
-`FileEntry.toURL()` 和 `DirectoryEntry.toURL()` 返回的表單檔案 URL
-
- cdvfile://localhost/persistent/path/to/file
-
-
-它å¯ä»¥ç”¨åœ¨ `download()` å’Œ `upload()` 兩種方法ä¸çš„絕å°æª”路徑ä½ç½®ã€‚
diff --git a/plugins/cordova-plugin-file-transfer/package.json b/plugins/cordova-plugin-file-transfer/package.json
deleted file mode 100644
index 2b5a342..0000000
--- a/plugins/cordova-plugin-file-transfer/package.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "_from": "cordova-plugin-file-transfer@^1.7.1",
- "_id": "cordova-plugin-file-transfer@1.7.1",
- "_inBundle": false,
- "_integrity": "sha1-p12L4uvDu5sjxbG70ZkhTsJnWGs=",
- "_location": "/cordova-plugin-file-transfer",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "cordova-plugin-file-transfer@^1.7.1",
- "name": "cordova-plugin-file-transfer",
- "escapedName": "cordova-plugin-file-transfer",
- "rawSpec": "^1.7.1",
- "saveSpec": null,
- "fetchSpec": "^1.7.1"
- },
- "_requiredBy": [
- "#USER",
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/cordova-plugin-file-transfer/-/cordova-plugin-file-transfer-1.7.1.tgz",
- "_shasum": "a75d8be2ebc3bb9b23c5b1bbd199214ec267586b",
- "_spec": "cordova-plugin-file-transfer@^1.7.1",
- "_where": "/home/thrrgilag/workspace/cordova/Goober",
- "author": {
- "name": "Apache Software Foundation"
- },
- "bugs": {
- "url": "https://issues.apache.org/jira/browse/CB"
- },
- "bundleDependencies": false,
- "cordova": {
- "id": "cordova-plugin-file-transfer",
- "platforms": [
- "android",
- "amazon-fireos",
- "ubuntu",
- "blackberry10",
- "ios",
- "wp7",
- "wp8",
- "windows8",
- "windows",
- "firefoxos",
- "browser"
- ]
- },
- "deprecated": false,
- "description": "Cordova File Transfer Plugin",
- "devDependencies": {
- "jscs": "^2.6.0",
- "jshint": "^2.8.0"
- },
- "engines": {
- "cordovaDependencies": {
- "2.0.0": {
- "cordova": ">100"
- }
- }
- },
- "homepage": "https://github.com/apache/cordova-plugin-file-transfer#readme",
- "keywords": [
- "cordova",
- "file",
- "transfer",
- "ecosystem:cordova",
- "cordova-android",
- "cordova-amazon-fireos",
- "cordova-ubuntu",
- "cordova-blackberry10",
- "cordova-ios",
- "cordova-wp7",
- "cordova-wp8",
- "cordova-windows8",
- "cordova-windows",
- "cordova-firefoxos",
- "cordova-browser"
- ],
- "license": "Apache-2.0",
- "name": "cordova-plugin-file-transfer",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/apache/cordova-plugin-file-transfer.git"
- },
- "scripts": {
- "lint": "jshint www && jshint src && jshint tests",
- "style": "jscs tests/tests.js",
- "test": "npm run lint && npm run style"
- },
- "types": "./types/index.d.ts",
- "version": "1.7.1"
-}
diff --git a/plugins/cordova-plugin-file-transfer/plugin.xml b/plugins/cordova-plugin-file-transfer/plugin.xml
deleted file mode 100644
index bfacbb1..0000000
--- a/plugins/cordova-plugin-file-transfer/plugin.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
- File Transfer
- Cordova File Transfer Plugin
- Apache 2.0
- cordova,file,transfer
- https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git
- https://issues.apache.org/jira/browse/CB/component/12320650
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/cordova-plugin-file-transfer/src/amazon/FileTransfer.java b/plugins/cordova-plugin-file-transfer/src/amazon/FileTransfer.java
deleted file mode 100644
index 1563a39..0000000
--- a/plugins/cordova-plugin-file-transfer/src/amazon/FileTransfer.java
+++ /dev/null
@@ -1,898 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-package org.apache.cordova.filetransfer;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayOutputStream;
-import java.io.Closeable;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.HttpURLConnection;
-import java.net.URLConnection;
-import java.net.URLDecoder;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.Inflater;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSocketFactory;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-
-import org.apache.cordova.Config;
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.CordovaResourceApi;
-import org.apache.cordova.CordovaResourceApi.OpenForReadResult;
-import org.apache.cordova.PluginResult;
-import org.apache.cordova.file.FileUtils;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import android.net.Uri;
-import android.os.Build;
-import android.util.Log;
-import com.amazon.android.webkit.AmazonCookieManager;
-
-public class FileTransfer extends CordovaPlugin {
-
- private static final String LOG_TAG = "FileTransfer";
- private static final String LINE_START = "--";
- private static final String LINE_END = "\r\n";
- private static final String BOUNDARY = "+++++";
-
- public static int FILE_NOT_FOUND_ERR = 1;
- public static int INVALID_URL_ERR = 2;
- public static int CONNECTION_ERR = 3;
- public static int ABORTED_ERR = 4;
-
- private static HashMap activeRequests = new HashMap();
- private static final int MAX_BUFFER_SIZE = 16 * 1024;
-
- private static final class RequestContext {
- String source;
- String target;
- File targetFile;
- CallbackContext callbackContext;
- InputStream currentInputStream;
- OutputStream currentOutputStream;
- boolean aborted;
- RequestContext(String source, String target, CallbackContext callbackContext) {
- this.source = source;
- this.target = target;
- this.callbackContext = callbackContext;
- }
- void sendPluginResult(PluginResult pluginResult) {
- synchronized (this) {
- if (!aborted) {
- callbackContext.sendPluginResult(pluginResult);
- }
- }
- }
- }
-
- /**
- * Adds an interface method to an InputStream to return the number of bytes
- * read from the raw stream. This is used to track total progress against
- * the HTTP Content-Length header value from the server.
- */
- private static abstract class TrackingInputStream extends FilterInputStream {
- public TrackingInputStream(final InputStream in) {
- super(in);
- }
- public abstract long getTotalRawBytesRead();
- }
-
- private static class ExposedGZIPInputStream extends GZIPInputStream {
- public ExposedGZIPInputStream(final InputStream in) throws IOException {
- super(in);
- }
- public Inflater getInflater() {
- return inf;
- }
- }
-
- /**
- * Provides raw bytes-read tracking for a GZIP input stream. Reports the
- * total number of compressed bytes read from the input, rather than the
- * number of uncompressed bytes.
- */
- private static class TrackingGZIPInputStream extends TrackingInputStream {
- private ExposedGZIPInputStream gzin;
- public TrackingGZIPInputStream(final ExposedGZIPInputStream gzin) throws IOException {
- super(gzin);
- this.gzin = gzin;
- }
- public long getTotalRawBytesRead() {
- return gzin.getInflater().getBytesRead();
- }
- }
-
- /**
- * Provides simple total-bytes-read tracking for an existing InputStream
- */
- private static class SimpleTrackingInputStream extends TrackingInputStream {
- private long bytesRead = 0;
- public SimpleTrackingInputStream(InputStream stream) {
- super(stream);
- }
-
- private int updateBytesRead(int newBytesRead) {
- if (newBytesRead != -1) {
- bytesRead += newBytesRead;
- }
- return newBytesRead;
- }
-
- @Override
- public int read() throws IOException {
- return updateBytesRead(super.read());
- }
-
- // Note: FilterInputStream delegates read(byte[] bytes) to the below method,
- // so we don't override it or else double count (CB-5631).
- @Override
- public int read(byte[] bytes, int offset, int count) throws IOException {
- return updateBytesRead(super.read(bytes, offset, count));
- }
-
- public long getTotalRawBytesRead() {
- return bytesRead;
- }
- }
-
- @Override
- public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException {
- if (action.equals("upload") || action.equals("download")) {
- String source = args.getString(0);
- String target = args.getString(1);
-
- if (action.equals("upload")) {
- try {
- source = URLDecoder.decode(source, "UTF-8");
- upload(source, target, args, callbackContext);
- } catch (UnsupportedEncodingException e) {
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.MALFORMED_URL_EXCEPTION, "UTF-8 error."));
- }
- } else {
- download(source, target, args, callbackContext);
- }
- return true;
- } else if (action.equals("abort")) {
- String objectId = args.getString(0);
- abort(objectId);
- callbackContext.success();
- return true;
- }
- return false;
- }
-
- private static void addHeadersToRequest(URLConnection connection, JSONObject headers) {
- try {
- for (Iterator> iter = headers.keys(); iter.hasNext(); ) {
- String headerKey = iter.next().toString();
- JSONArray headerValues = headers.optJSONArray(headerKey);
- if (headerValues == null) {
- headerValues = new JSONArray();
- headerValues.put(headers.getString(headerKey));
- }
- connection.setRequestProperty(headerKey, headerValues.getString(0));
- for (int i = 1; i < headerValues.length(); ++i) {
- connection.addRequestProperty(headerKey, headerValues.getString(i));
- }
- }
- } catch (JSONException e1) {
- // No headers to be manipulated!
- }
- }
-
- /**
- * Uploads the specified file to the server URL provided using an HTTP multipart request.
- * @param source Full path of the file on the file system
- * @param target URL of the server to receive the file
- * @param args JSON Array of args
- * @param callbackContext callback id for optional progress reports
- *
- * args[2] fileKey Name of file request parameter
- * args[3] fileName File name to be used on server
- * args[4] mimeType Describes file content type
- * args[5] params key:value pairs of user-defined parameters
- * @return FileUploadResult containing result of upload request
- */
- private void upload(final String source, final String target, JSONArray args, CallbackContext callbackContext) throws JSONException {
- Log.d(LOG_TAG, "upload " + source + " to " + target);
-
- // Setup the options
- final String fileKey = getArgument(args, 2, "file");
- final String fileName = getArgument(args, 3, "image.jpg");
- final String mimeType = getArgument(args, 4, "image/jpeg");
- final JSONObject params = args.optJSONObject(5) == null ? new JSONObject() : args.optJSONObject(5);
- final boolean trustEveryone = args.optBoolean(6);
- // Always use chunked mode unless set to false as per API
- final boolean chunkedMode = args.optBoolean(7) || args.isNull(7);
- // Look for headers on the params map for backwards compatibility with older Cordova versions.
- final JSONObject headers = args.optJSONObject(8) == null ? params.optJSONObject("headers") : args.optJSONObject(8);
- final String objectId = args.getString(9);
- final String httpMethod = getArgument(args, 10, "POST");
-
- final CordovaResourceApi resourceApi = webView.getResourceApi();
-
- Log.d(LOG_TAG, "fileKey: " + fileKey);
- Log.d(LOG_TAG, "fileName: " + fileName);
- Log.d(LOG_TAG, "mimeType: " + mimeType);
- Log.d(LOG_TAG, "params: " + params);
- Log.d(LOG_TAG, "trustEveryone: " + trustEveryone);
- Log.d(LOG_TAG, "chunkedMode: " + chunkedMode);
- Log.d(LOG_TAG, "headers: " + headers);
- Log.d(LOG_TAG, "objectId: " + objectId);
- Log.d(LOG_TAG, "httpMethod: " + httpMethod);
-
- final Uri targetUri = resourceApi.remapUri(Uri.parse(target));
- // Accept a path or a URI for the source.
- Uri tmpSrc = Uri.parse(source);
- final Uri sourceUri = resourceApi.remapUri(
- tmpSrc.getScheme() != null ? tmpSrc : Uri.fromFile(new File(source)));
-
- int uriType = CordovaResourceApi.getUriType(targetUri);
- final boolean useHttps = uriType == CordovaResourceApi.URI_TYPE_HTTPS;
- if (uriType != CordovaResourceApi.URI_TYPE_HTTP && !useHttps) {
- JSONObject error = createFileTransferError(INVALID_URL_ERR, source, target, null, 0);
- Log.e(LOG_TAG, "Unsupported URI: " + targetUri);
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
- return;
- }
-
- final RequestContext context = new RequestContext(source, target, callbackContext);
- synchronized (activeRequests) {
- activeRequests.put(objectId, context);
- }
-
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- if (context.aborted) {
- return;
- }
- HttpURLConnection conn = null;
- HostnameVerifier oldHostnameVerifier = null;
- SSLSocketFactory oldSocketFactory = null;
- int totalBytes = 0;
- int fixedLength = -1;
- try {
- // Create return object
- FileUploadResult result = new FileUploadResult();
- FileProgressResult progress = new FileProgressResult();
-
- //------------------ CLIENT REQUEST
- // Open a HTTP connection to the URL based on protocol
- conn = resourceApi.createHttpConnection(targetUri);
- if (useHttps && trustEveryone) {
- // Setup the HTTPS connection class to trust everyone
- HttpsURLConnection https = (HttpsURLConnection)conn;
- oldSocketFactory = trustAllHosts(https);
- // Save the current hostnameVerifier
- oldHostnameVerifier = https.getHostnameVerifier();
- // Setup the connection not to verify hostnames
- https.setHostnameVerifier(DO_NOT_VERIFY);
- }
-
- // Allow Inputs
- conn.setDoInput(true);
-
- // Allow Outputs
- conn.setDoOutput(true);
-
- // Don't use a cached copy.
- conn.setUseCaches(false);
-
- // Use a post method.
- conn.setRequestMethod(httpMethod);
-
- // if we specified a Content-Type header, don't do multipart form upload
- boolean multipartFormUpload = (headers == null) || !headers.has("Content-Type");
- if (multipartFormUpload) {
- conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY);
- }
- // Set the cookies on the response
- String cookie = AmazonCookieManager.getInstance().getCookie(target);
- if (cookie != null) {
- conn.setRequestProperty("Cookie", cookie);
- }
-
- // Handle the other headers
- if (headers != null) {
- addHeadersToRequest(conn, headers);
- }
-
- /*
- * Store the non-file portions of the multipart data as a string, so that we can add it
- * to the contentSize, since it is part of the body of the HTTP request.
- */
- StringBuilder beforeData = new StringBuilder();
- try {
- for (Iterator> iter = params.keys(); iter.hasNext();) {
- Object key = iter.next();
- if(!String.valueOf(key).equals("headers"))
- {
- beforeData.append(LINE_START).append(BOUNDARY).append(LINE_END);
- beforeData.append("Content-Disposition: form-data; name=\"").append(key.toString()).append('"');
- beforeData.append(LINE_END).append(LINE_END);
- beforeData.append(params.getString(key.toString()));
- beforeData.append(LINE_END);
- }
- }
- } catch (JSONException e) {
- Log.e(LOG_TAG, e.getMessage(), e);
- }
-
- beforeData.append(LINE_START).append(BOUNDARY).append(LINE_END);
- beforeData.append("Content-Disposition: form-data; name=\"").append(fileKey).append("\";");
- beforeData.append(" filename=\"").append(fileName).append('"').append(LINE_END);
- beforeData.append("Content-Type: ").append(mimeType).append(LINE_END).append(LINE_END);
- byte[] beforeDataBytes = beforeData.toString().getBytes("UTF-8");
- byte[] tailParamsBytes = (LINE_END + LINE_START + BOUNDARY + LINE_START + LINE_END).getBytes("UTF-8");
-
-
- // Get a input stream of the file on the phone
- OpenForReadResult readResult = resourceApi.openForRead(sourceUri);
-
- int stringLength = beforeDataBytes.length + tailParamsBytes.length;
- if (readResult.length >= 0) {
- fixedLength = (int)readResult.length;
- if (multipartFormUpload)
- fixedLength += stringLength;
- progress.setLengthComputable(true);
- progress.setTotal(fixedLength);
- }
- Log.d(LOG_TAG, "Content Length: " + fixedLength);
- // setFixedLengthStreamingMode causes and OutOfMemoryException on pre-Froyo devices.
- // http://code.google.com/p/android/issues/detail?id=3164
- // It also causes OOM if HTTPS is used, even on newer devices.
- boolean useChunkedMode = chunkedMode && (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO || useHttps);
- useChunkedMode = useChunkedMode || (fixedLength == -1);
-
- if (useChunkedMode) {
- conn.setChunkedStreamingMode(MAX_BUFFER_SIZE);
- // Although setChunkedStreamingMode sets this header, setting it explicitly here works
- // around an OutOfMemoryException when using https.
- conn.setRequestProperty("Transfer-Encoding", "chunked");
- } else {
- conn.setFixedLengthStreamingMode(fixedLength);
- }
-
- conn.connect();
-
- OutputStream sendStream = null;
- try {
- sendStream = conn.getOutputStream();
- synchronized (context) {
- if (context.aborted) {
- return;
- }
- context.currentOutputStream = sendStream;
- }
-
- if (multipartFormUpload) {
- //We don't want to change encoding, we just want this to write for all Unicode.
- sendStream.write(beforeDataBytes);
- totalBytes += beforeDataBytes.length;
- }
- // create a buffer of maximum size
- int bytesAvailable = readResult.inputStream.available();
- int bufferSize = Math.min(bytesAvailable, MAX_BUFFER_SIZE);
- byte[] buffer = new byte[bufferSize];
-
- // read file and write it into form...
- int bytesRead = readResult.inputStream.read(buffer, 0, bufferSize);
-
- long prevBytesRead = 0;
- while (bytesRead > 0) {
- result.setBytesSent(totalBytes);
- sendStream.write(buffer, 0, bytesRead);
- totalBytes += bytesRead;
- if (totalBytes > prevBytesRead + 102400) {
- prevBytesRead = totalBytes;
- Log.d(LOG_TAG, "Uploaded " + totalBytes + " of " + fixedLength + " bytes");
- }
- bytesAvailable = readResult.inputStream.available();
- bufferSize = Math.min(bytesAvailable, MAX_BUFFER_SIZE);
- bytesRead = readResult.inputStream.read(buffer, 0, bufferSize);
-
- // Send a progress event.
- progress.setLoaded(totalBytes);
- PluginResult progressResult = new PluginResult(PluginResult.Status.OK, progress.toJSONObject());
- progressResult.setKeepCallback(true);
- context.sendPluginResult(progressResult);
- }
-
- if (multipartFormUpload) {
- // send multipart form data necessary after file data...
- sendStream.write(tailParamsBytes);
- totalBytes += tailParamsBytes.length;
- }
- sendStream.flush();
- } finally {
- safeClose(readResult.inputStream);
- safeClose(sendStream);
- }
- context.currentOutputStream = null;
- Log.d(LOG_TAG, "Sent " + totalBytes + " of " + fixedLength);
-
- //------------------ read the SERVER RESPONSE
- String responseString;
- int responseCode = conn.getResponseCode();
- Log.d(LOG_TAG, "response code: " + responseCode);
- Log.d(LOG_TAG, "response headers: " + conn.getHeaderFields());
- TrackingInputStream inStream = null;
- try {
- inStream = getInputStream(conn);
- synchronized (context) {
- if (context.aborted) {
- return;
- }
- context.currentInputStream = inStream;
- }
-
- ByteArrayOutputStream out = new ByteArrayOutputStream(Math.max(1024, conn.getContentLength()));
- byte[] buffer = new byte[1024];
- int bytesRead = 0;
- // write bytes to file
- while ((bytesRead = inStream.read(buffer)) > 0) {
- out.write(buffer, 0, bytesRead);
- }
- responseString = out.toString("UTF-8");
- } finally {
- context.currentInputStream = null;
- safeClose(inStream);
- }
-
- Log.d(LOG_TAG, "got response from server");
- Log.d(LOG_TAG, responseString.substring(0, Math.min(256, responseString.length())));
-
- // send request and retrieve response
- result.setResponseCode(responseCode);
- result.setResponse(responseString);
-
- context.sendPluginResult(new PluginResult(PluginResult.Status.OK, result.toJSONObject()));
- } catch (FileNotFoundException e) {
- JSONObject error = createFileTransferError(FILE_NOT_FOUND_ERR, source, target, conn);
- Log.e(LOG_TAG, error.toString(), e);
- context.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
- } catch (IOException e) {
- JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, conn);
- Log.e(LOG_TAG, error.toString(), e);
- Log.e(LOG_TAG, "Failed after uploading " + totalBytes + " of " + fixedLength + " bytes.");
- context.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
- } catch (JSONException e) {
- Log.e(LOG_TAG, e.getMessage(), e);
- context.sendPluginResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION));
- } catch (Throwable t) {
- // Shouldn't happen, but will
- JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, conn);
- Log.e(LOG_TAG, error.toString(), t);
- context.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
- } finally {
- synchronized (activeRequests) {
- activeRequests.remove(objectId);
- }
-
- if (conn != null) {
- // Revert back to the proper verifier and socket factories
- // Revert back to the proper verifier and socket factories
- if (trustEveryone && useHttps) {
- HttpsURLConnection https = (HttpsURLConnection) conn;
- https.setHostnameVerifier(oldHostnameVerifier);
- https.setSSLSocketFactory(oldSocketFactory);
- }
- }
- }
- }
- });
- }
-
- private static void safeClose(Closeable stream) {
- if (stream != null) {
- try {
- stream.close();
- } catch (IOException e) {
- }
- }
- }
-
- private static TrackingInputStream getInputStream(URLConnection conn) throws IOException {
- String encoding = conn.getContentEncoding();
- if (encoding != null && encoding.equalsIgnoreCase("gzip")) {
- return new TrackingGZIPInputStream(new ExposedGZIPInputStream(conn.getInputStream()));
- }
- return new SimpleTrackingInputStream(conn.getInputStream());
- }
-
- // always verify the host - don't check for certificate
- private static final HostnameVerifier DO_NOT_VERIFY = new HostnameVerifier() {
- public boolean verify(String hostname, SSLSession session) {
- return true;
- }
- };
- // Create a trust manager that does not validate certificate chains
- private static final TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
- public java.security.cert.X509Certificate[] getAcceptedIssuers() {
- return new java.security.cert.X509Certificate[] {};
- }
-
- public void checkClientTrusted(X509Certificate[] chain,
- String authType) throws CertificateException {
- }
-
- public void checkServerTrusted(X509Certificate[] chain,
- String authType) throws CertificateException {
- }
- } };
-
- /**
- * This function will install a trust manager that will blindly trust all SSL
- * certificates. The reason this code is being added is to enable developers
- * to do development using self signed SSL certificates on their web server.
- *
- * The standard HttpsURLConnection class will throw an exception on self
- * signed certificates if this code is not run.
- */
- private static SSLSocketFactory trustAllHosts(HttpsURLConnection connection) {
- // Install the all-trusting trust manager
- SSLSocketFactory oldFactory = connection.getSSLSocketFactory();
- try {
- // Install our all trusting manager
- SSLContext sc = SSLContext.getInstance("TLS");
- sc.init(null, trustAllCerts, new java.security.SecureRandom());
- SSLSocketFactory newFactory = sc.getSocketFactory();
- connection.setSSLSocketFactory(newFactory);
- } catch (Exception e) {
- Log.e(LOG_TAG, e.getMessage(), e);
- }
- return oldFactory;
- }
-
- private static JSONObject createFileTransferError(int errorCode, String source, String target, URLConnection connection) {
-
- int httpStatus = 0;
- StringBuilder bodyBuilder = new StringBuilder();
- String body = null;
- if (connection != null) {
- try {
- if (connection instanceof HttpURLConnection) {
- httpStatus = ((HttpURLConnection)connection).getResponseCode();
- InputStream err = ((HttpURLConnection) connection).getErrorStream();
- if(err != null)
- {
- BufferedReader reader = new BufferedReader(new InputStreamReader(err, "UTF-8"));
- try {
- String line = reader.readLine();
- while(line != null) {
- bodyBuilder.append(line);
- line = reader.readLine();
- if(line != null) {
- bodyBuilder.append('\n');
- }
- }
- body = bodyBuilder.toString();
- } finally {
- reader.close();
- }
- }
- }
- // IOException can leave connection object in a bad state, so catch all exceptions.
- } catch (Throwable e) {
- Log.w(LOG_TAG, "Error getting HTTP status code from connection.", e);
- }
- }
-
- return createFileTransferError(errorCode, source, target, body, httpStatus);
- }
-
- /**
- * Create an error object based on the passed in errorCode
- * @param errorCode the error
- * @return JSONObject containing the error
- */
- private static JSONObject createFileTransferError(int errorCode, String source, String target, String body, Integer httpStatus) {
- JSONObject error = null;
- try {
- error = new JSONObject();
- error.put("code", errorCode);
- error.put("source", source);
- error.put("target", target);
- if(body != null)
- {
- error.put("body", body);
- }
- if (httpStatus != null) {
- error.put("http_status", httpStatus);
- }
- } catch (JSONException e) {
- Log.e(LOG_TAG, e.getMessage(), e);
- }
- return error;
- }
-
- /**
- * Convenience method to read a parameter from the list of JSON args.
- * @param args the args passed to the Plugin
- * @param position the position to retrieve the arg from
- * @param defaultString the default to be used if the arg does not exist
- * @return String with the retrieved value
- */
- private static String getArgument(JSONArray args, int position, String defaultString) {
- String arg = defaultString;
- if (args.length() > position) {
- arg = args.optString(position);
- if (arg == null || "null".equals(arg)) {
- arg = defaultString;
- }
- }
- return arg;
- }
-
- /**
- * Downloads a file form a given URL and saves it to the specified directory.
- *
- * @param source URL of the server to receive the file
- * @param target Full path of the file on the file system
- */
- private void download(final String source, final String target, JSONArray args, CallbackContext callbackContext) throws JSONException {
- Log.d(LOG_TAG, "download " + source + " to " + target);
-
- final CordovaResourceApi resourceApi = webView.getResourceApi();
-
- final boolean trustEveryone = args.optBoolean(2);
- final String objectId = args.getString(3);
- final JSONObject headers = args.optJSONObject(4);
-
- final Uri sourceUri = resourceApi.remapUri(Uri.parse(source));
- // Accept a path or a URI for the source.
- Uri tmpTarget = Uri.parse(target);
- final Uri targetUri = resourceApi.remapUri(
- tmpTarget.getScheme() != null ? tmpTarget : Uri.fromFile(new File(target)));
-
- int uriType = CordovaResourceApi.getUriType(sourceUri);
- final boolean useHttps = uriType == CordovaResourceApi.URI_TYPE_HTTPS;
- final boolean isLocalTransfer = !useHttps && uriType != CordovaResourceApi.URI_TYPE_HTTP;
- if (uriType == CordovaResourceApi.URI_TYPE_UNKNOWN) {
- JSONObject error = createFileTransferError(INVALID_URL_ERR, source, target, null, 0);
- Log.e(LOG_TAG, "Unsupported URI: " + targetUri);
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
- return;
- }
-
- // TODO: refactor to also allow resources & content:
- if (!isLocalTransfer && !Config.isUrlWhiteListed(source)) {
- Log.w(LOG_TAG, "Source URL is not in white list: '" + source + "'");
- JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, null, 401);
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
- return;
- }
-
-
- final RequestContext context = new RequestContext(source, target, callbackContext);
- synchronized (activeRequests) {
- activeRequests.put(objectId, context);
- }
-
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- if (context.aborted) {
- return;
- }
- HttpURLConnection connection = null;
- HostnameVerifier oldHostnameVerifier = null;
- SSLSocketFactory oldSocketFactory = null;
- File file = null;
- PluginResult result = null;
- TrackingInputStream inputStream = null;
-
- OutputStream outputStream = null;
- try {
- OpenForReadResult readResult = null;
- outputStream = resourceApi.openOutputStream(targetUri);
-
- file = resourceApi.mapUriToFile(targetUri);
- context.targetFile = file;
-
- Log.d(LOG_TAG, "Download file:" + sourceUri);
-
- FileProgressResult progress = new FileProgressResult();
-
- if (isLocalTransfer) {
- readResult = resourceApi.openForRead(sourceUri);
- if (readResult.length != -1) {
- progress.setLengthComputable(true);
- progress.setTotal(readResult.length);
- }
- inputStream = new SimpleTrackingInputStream(readResult.inputStream);
- } else {
- // connect to server
- // Open a HTTP connection to the URL based on protocol
- connection = resourceApi.createHttpConnection(sourceUri);
- if (useHttps && trustEveryone) {
- // Setup the HTTPS connection class to trust everyone
- HttpsURLConnection https = (HttpsURLConnection)connection;
- oldSocketFactory = trustAllHosts(https);
- // Save the current hostnameVerifier
- oldHostnameVerifier = https.getHostnameVerifier();
- // Setup the connection not to verify hostnames
- https.setHostnameVerifier(DO_NOT_VERIFY);
- }
-
- connection.setRequestMethod("GET");
-
- // TODO: Make OkHttp use this AmazonCookieManager by default.
- String cookie = AmazonCookieManager.getInstance().getCookie(sourceUri.toString());
- if(cookie != null)
- {
- connection.setRequestProperty("cookie", cookie);
- }
-
- // This must be explicitly set for gzip progress tracking to work.
- connection.setRequestProperty("Accept-Encoding", "gzip");
-
- // Handle the other headers
- if (headers != null) {
- addHeadersToRequest(connection, headers);
- }
-
- connection.connect();
-
- if (connection.getContentEncoding() == null || connection.getContentEncoding().equalsIgnoreCase("gzip")) {
- // Only trust content-length header if we understand
- // the encoding -- identity or gzip
- if (connection.getContentLength() != -1) {
- progress.setLengthComputable(true);
- progress.setTotal(connection.getContentLength());
- }
- }
- inputStream = getInputStream(connection);
- }
-
- try {
- synchronized (context) {
- if (context.aborted) {
- return;
- }
- context.currentInputStream = inputStream;
- }
-
- // write bytes to file
- byte[] buffer = new byte[MAX_BUFFER_SIZE];
- int bytesRead = 0;
- while ((bytesRead = inputStream.read(buffer)) > 0) {
- outputStream.write(buffer, 0, bytesRead);
- // Send a progress event.
- progress.setLoaded(inputStream.getTotalRawBytesRead());
- PluginResult progressResult = new PluginResult(PluginResult.Status.OK, progress.toJSONObject());
- progressResult.setKeepCallback(true);
- context.sendPluginResult(progressResult);
- }
- } finally {
- context.currentInputStream = null;
- safeClose(inputStream);
- safeClose(outputStream);
- }
-
- Log.d(LOG_TAG, "Saved file: " + target);
-
- // create FileEntry object
- FileUtils filePlugin = (FileUtils)webView.pluginManager.getPlugin("File");
- if (filePlugin != null) {
- JSONObject fileEntry = filePlugin.getEntryForFile(file);
- if (fileEntry != null) {
- result = new PluginResult(PluginResult.Status.OK, fileEntry);
- } else {
- JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, connection);
- Log.e(LOG_TAG, "File plugin cannot represent download path");
- result = new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
- }
- } else {
- Log.e(LOG_TAG, "File plugin not found; cannot save downloaded file");
- result = new PluginResult(PluginResult.Status.ERROR, "File plugin not found; cannot save downloaded file");
- }
-
- } catch (FileNotFoundException e) {
- JSONObject error = createFileTransferError(FILE_NOT_FOUND_ERR, source, target, connection);
- Log.e(LOG_TAG, error.toString(), e);
- result = new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
- } catch (IOException e) {
- JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, connection);
- Log.e(LOG_TAG, error.toString(), e);
- result = new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
- } catch (JSONException e) {
- Log.e(LOG_TAG, e.getMessage(), e);
- result = new PluginResult(PluginResult.Status.JSON_EXCEPTION);
- } catch (Throwable e) {
- JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, connection);
- Log.e(LOG_TAG, error.toString(), e);
- result = new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
- } finally {
- safeClose(outputStream);
- synchronized (activeRequests) {
- activeRequests.remove(objectId);
- }
-
- if (connection != null) {
- // Revert back to the proper verifier and socket factories
- if (trustEveryone && useHttps) {
- HttpsURLConnection https = (HttpsURLConnection) connection;
- https.setHostnameVerifier(oldHostnameVerifier);
- https.setSSLSocketFactory(oldSocketFactory);
- }
- }
-
- if (result == null) {
- result = new PluginResult(PluginResult.Status.ERROR, createFileTransferError(CONNECTION_ERR, source, target, connection));
- }
- // Remove incomplete download.
- if (result.getStatus() != PluginResult.Status.OK.ordinal() && file != null) {
- file.delete();
- }
- context.sendPluginResult(result);
- }
- }
- });
- }
-
- /**
- * Abort an ongoing upload or download.
- */
- private void abort(String objectId) {
- final RequestContext context;
- synchronized (activeRequests) {
- context = activeRequests.remove(objectId);
- }
- if (context != null) {
- File file = context.targetFile;
- if (file != null) {
- file.delete();
- }
- // Trigger the abort callback immediately to minimize latency between it and abort() being called.
- JSONObject error = createFileTransferError(ABORTED_ERR, context.source, context.target, null, -1);
- synchronized (context) {
- context.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, error));
- context.aborted = true;
- }
- // Closing the streams can block, so execute on a background thread.
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- synchronized (context) {
- safeClose(context.currentInputStream);
- safeClose(context.currentOutputStream);
- }
- }
- });
- }
- }
-}
diff --git a/plugins/cordova-plugin-file-transfer/src/android/FileProgressResult.java b/plugins/cordova-plugin-file-transfer/src/android/FileProgressResult.java
deleted file mode 100644
index 76a7b13..0000000
--- a/plugins/cordova-plugin-file-transfer/src/android/FileProgressResult.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-package org.apache.cordova.filetransfer;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/**
- * Encapsulates in-progress status of uploading or downloading a file to a remote server.
- */
-public class FileProgressResult {
-
- private boolean lengthComputable = false; // declares whether total is known
- private long loaded = 0; // bytes sent so far
- private long total = 0; // bytes total, if known
-
- public boolean getLengthComputable() {
- return lengthComputable;
- }
-
- public void setLengthComputable(boolean computable) {
- this.lengthComputable = computable;
- }
-
- public long getLoaded() {
- return loaded;
- }
-
- public void setLoaded(long bytes) {
- this.loaded = bytes;
- }
-
- public long getTotal() {
- return total;
- }
-
- public void setTotal(long bytes) {
- this.total = bytes;
- }
-
- public JSONObject toJSONObject() throws JSONException {
- return new JSONObject(
- "{loaded:" + loaded +
- ",total:" + total +
- ",lengthComputable:" + (lengthComputable ? "true" : "false") + "}");
- }
-}
diff --git a/plugins/cordova-plugin-file-transfer/src/android/FileTransfer.java b/plugins/cordova-plugin-file-transfer/src/android/FileTransfer.java
deleted file mode 100644
index 5a3c5d6..0000000
--- a/plugins/cordova-plugin-file-transfer/src/android/FileTransfer.java
+++ /dev/null
@@ -1,932 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-package org.apache.cordova.filetransfer;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayOutputStream;
-import java.io.Closeable;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.net.HttpURLConnection;
-import java.net.URLConnection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.Inflater;
-
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.CordovaResourceApi;
-import org.apache.cordova.CordovaResourceApi.OpenForReadResult;
-import org.apache.cordova.LOG;
-import org.apache.cordova.PluginManager;
-import org.apache.cordova.PluginResult;
-import org.apache.cordova.Whitelist;
-import org.apache.cordova.file.FileUtils;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import android.net.Uri;
-import android.os.Build;
-import android.webkit.CookieManager;
-
-public class FileTransfer extends CordovaPlugin {
-
- private static final String LOG_TAG = "FileTransfer";
- private static final String LINE_START = "--";
- private static final String LINE_END = "\r\n";
- private static final String BOUNDARY = "+++++";
-
- public static int FILE_NOT_FOUND_ERR = 1;
- public static int INVALID_URL_ERR = 2;
- public static int CONNECTION_ERR = 3;
- public static int ABORTED_ERR = 4;
- public static int NOT_MODIFIED_ERR = 5;
-
- private static HashMap activeRequests = new HashMap();
- private static final int MAX_BUFFER_SIZE = 16 * 1024;
-
- private static final class RequestContext {
- String source;
- String target;
- File targetFile;
- CallbackContext callbackContext;
- HttpURLConnection connection;
- boolean aborted;
- RequestContext(String source, String target, CallbackContext callbackContext) {
- this.source = source;
- this.target = target;
- this.callbackContext = callbackContext;
- }
- void sendPluginResult(PluginResult pluginResult) {
- synchronized (this) {
- if (!aborted) {
- callbackContext.sendPluginResult(pluginResult);
- }
- }
- }
- }
-
- /**
- * Adds an interface method to an InputStream to return the number of bytes
- * read from the raw stream. This is used to track total progress against
- * the HTTP Content-Length header value from the server.
- */
- private static abstract class TrackingInputStream extends FilterInputStream {
- public TrackingInputStream(final InputStream in) {
- super(in);
- }
- public abstract long getTotalRawBytesRead();
- }
-
- private static class ExposedGZIPInputStream extends GZIPInputStream {
- public ExposedGZIPInputStream(final InputStream in) throws IOException {
- super(in);
- }
- public Inflater getInflater() {
- return inf;
- }
- }
-
- /**
- * Provides raw bytes-read tracking for a GZIP input stream. Reports the
- * total number of compressed bytes read from the input, rather than the
- * number of uncompressed bytes.
- */
- private static class TrackingGZIPInputStream extends TrackingInputStream {
- private ExposedGZIPInputStream gzin;
- public TrackingGZIPInputStream(final ExposedGZIPInputStream gzin) throws IOException {
- super(gzin);
- this.gzin = gzin;
- }
- public long getTotalRawBytesRead() {
- return gzin.getInflater().getBytesRead();
- }
- }
-
- /**
- * Provides simple total-bytes-read tracking for an existing InputStream
- */
- private static class SimpleTrackingInputStream extends TrackingInputStream {
- private long bytesRead = 0;
- public SimpleTrackingInputStream(InputStream stream) {
- super(stream);
- }
-
- private int updateBytesRead(int newBytesRead) {
- if (newBytesRead != -1) {
- bytesRead += newBytesRead;
- }
- return newBytesRead;
- }
-
- @Override
- public int read() throws IOException {
- return updateBytesRead(super.read());
- }
-
- // Note: FilterInputStream delegates read(byte[] bytes) to the below method,
- // so we don't override it or else double count (CB-5631).
- @Override
- public int read(byte[] bytes, int offset, int count) throws IOException {
- return updateBytesRead(super.read(bytes, offset, count));
- }
-
- public long getTotalRawBytesRead() {
- return bytesRead;
- }
- }
-
- @Override
- public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException {
- if (action.equals("upload") || action.equals("download")) {
- String source = args.getString(0);
- String target = args.getString(1);
-
- if (action.equals("upload")) {
- upload(source, target, args, callbackContext);
- } else {
- download(source, target, args, callbackContext);
- }
- return true;
- } else if (action.equals("abort")) {
- String objectId = args.getString(0);
- abort(objectId);
- callbackContext.success();
- return true;
- }
- return false;
- }
-
- private static void addHeadersToRequest(URLConnection connection, JSONObject headers) {
- try {
- for (Iterator> iter = headers.keys(); iter.hasNext(); ) {
- /* RFC 2616 says that non-ASCII characters and control
- * characters are not allowed in header names or values.
- * Additionally, spaces are not allowed in header names.
- * RFC 2046 Quoted-printable encoding may be used to encode
- * arbitrary characters, but we donon- not do that encoding here.
- */
- String headerKey = iter.next().toString();
- String cleanHeaderKey = headerKey.replaceAll("\\n","")
- .replaceAll("\\s+","")
- .replaceAll(":", "")
- .replaceAll("[^\\x20-\\x7E]+", "");
-
- JSONArray headerValues = headers.optJSONArray(headerKey);
- if (headerValues == null) {
- headerValues = new JSONArray();
-
- /* RFC 2616 also says that any amount of consecutive linear
- * whitespace within a header value can be replaced with a
- * single space character, without affecting the meaning of
- * that value.
- */
-
- String headerValue = headers.getString(headerKey);
- String finalValue = headerValue.replaceAll("\\s+", " ").replaceAll("\\n"," ").replaceAll("[^\\x20-\\x7E]+", " ");
- headerValues.put(finalValue);
- }
-
- //Use the clean header key, not the one that we passed in
- connection.setRequestProperty(cleanHeaderKey, headerValues.getString(0));
- for (int i = 1; i < headerValues.length(); ++i) {
- connection.addRequestProperty(headerKey, headerValues.getString(i));
- }
- }
- } catch (JSONException e1) {
- // No headers to be manipulated!
- }
- }
-
- private String getCookies(final String target) {
- boolean gotCookie = false;
- String cookie = null;
- Class webViewClass = webView.getClass();
- try {
- Method gcmMethod = webViewClass.getMethod("getCookieManager");
- Class iccmClass = gcmMethod.getReturnType();
- Method gcMethod = iccmClass.getMethod("getCookie", String.class);
-
- cookie = (String)gcMethod.invoke(
- iccmClass.cast(
- gcmMethod.invoke(webView)
- ), target);
-
- gotCookie = true;
- } catch (NoSuchMethodException e) {
- } catch (IllegalAccessException e) {
- } catch (InvocationTargetException e) {
- } catch (ClassCastException e) {
- }
-
- if (!gotCookie && CookieManager.getInstance() != null) {
- cookie = CookieManager.getInstance().getCookie(target);
- }
-
- return cookie;
- }
-
- /**
- * Uploads the specified file to the server URL provided using an HTTP multipart request.
- * @param source Full path of the file on the file system
- * @param target URL of the server to receive the file
- * @param args JSON Array of args
- * @param callbackContext callback id for optional progress reports
- *
- * args[2] fileKey Name of file request parameter
- * args[3] fileName File name to be used on server
- * args[4] mimeType Describes file content type
- * args[5] params key:value pairs of user-defined parameters
- * @return FileUploadResult containing result of upload request
- */
- private void upload(final String source, final String target, JSONArray args, CallbackContext callbackContext) throws JSONException {
- LOG.d(LOG_TAG, "upload " + source + " to " + target);
-
- // Setup the options
- final String fileKey = getArgument(args, 2, "file");
- final String fileName = getArgument(args, 3, "image.jpg");
- final String mimeType = getArgument(args, 4, "image/jpeg");
- final JSONObject params = args.optJSONObject(5) == null ? new JSONObject() : args.optJSONObject(5);
- // Always use chunked mode unless set to false as per API
- final boolean chunkedMode = args.optBoolean(7) || args.isNull(7);
- // Look for headers on the params map for backwards compatibility with older Cordova versions.
- final JSONObject headers = args.optJSONObject(8) == null ? params.optJSONObject("headers") : args.optJSONObject(8);
- final String objectId = args.getString(9);
- final String httpMethod = getArgument(args, 10, "POST");
-
- final CordovaResourceApi resourceApi = webView.getResourceApi();
-
- LOG.d(LOG_TAG, "fileKey: " + fileKey);
- LOG.d(LOG_TAG, "fileName: " + fileName);
- LOG.d(LOG_TAG, "mimeType: " + mimeType);
- LOG.d(LOG_TAG, "params: " + params);
- LOG.d(LOG_TAG, "chunkedMode: " + chunkedMode);
- LOG.d(LOG_TAG, "headers: " + headers);
- LOG.d(LOG_TAG, "objectId: " + objectId);
- LOG.d(LOG_TAG, "httpMethod: " + httpMethod);
-
- final Uri targetUri = resourceApi.remapUri(Uri.parse(target));
-
- int uriType = CordovaResourceApi.getUriType(targetUri);
- final boolean useHttps = uriType == CordovaResourceApi.URI_TYPE_HTTPS;
- if (uriType != CordovaResourceApi.URI_TYPE_HTTP && !useHttps) {
- JSONObject error = createFileTransferError(INVALID_URL_ERR, source, target, null, 0, null);
- LOG.e(LOG_TAG, "Unsupported URI: " + targetUri);
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
- return;
- }
-
- final RequestContext context = new RequestContext(source, target, callbackContext);
- synchronized (activeRequests) {
- activeRequests.put(objectId, context);
- }
-
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- if (context.aborted) {
- return;
- }
-
- // We should call remapUri on background thread otherwise it throws
- // IllegalStateException when trying to remap 'cdvfile://localhost/content/...' URIs
- // via ContentFilesystem (see https://issues.apache.org/jira/browse/CB-9022)
- Uri tmpSrc = Uri.parse(source);
- final Uri sourceUri = resourceApi.remapUri(
- tmpSrc.getScheme() != null ? tmpSrc : Uri.fromFile(new File(source)));
-
- HttpURLConnection conn = null;
- int totalBytes = 0;
- int fixedLength = -1;
- try {
- // Create return object
- FileUploadResult result = new FileUploadResult();
- FileProgressResult progress = new FileProgressResult();
-
- //------------------ CLIENT REQUEST
- // Open a HTTP connection to the URL based on protocol
- conn = resourceApi.createHttpConnection(targetUri);
-
- // Allow Inputs
- conn.setDoInput(true);
-
- // Allow Outputs
- conn.setDoOutput(true);
-
- // Don't use a cached copy.
- conn.setUseCaches(false);
-
- // Use a post method.
- conn.setRequestMethod(httpMethod);
-
- // if we specified a Content-Type header, don't do multipart form upload
- boolean multipartFormUpload = (headers == null) || !headers.has("Content-Type");
- if (multipartFormUpload) {
- conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY);
- }
-
- // Set the cookies on the response
- String cookie = getCookies(target);
-
- if (cookie != null) {
- conn.setRequestProperty("Cookie", cookie);
- }
-
- // Handle the other headers
- if (headers != null) {
- addHeadersToRequest(conn, headers);
- }
-
- /*
- * Store the non-file portions of the multipart data as a string, so that we can add it
- * to the contentSize, since it is part of the body of the HTTP request.
- */
- StringBuilder beforeData = new StringBuilder();
- try {
- for (Iterator> iter = params.keys(); iter.hasNext();) {
- Object key = iter.next();
- if(!String.valueOf(key).equals("headers"))
- {
- beforeData.append(LINE_START).append(BOUNDARY).append(LINE_END);
- beforeData.append("Content-Disposition: form-data; name=\"").append(key.toString()).append('"');
- beforeData.append(LINE_END).append(LINE_END);
- beforeData.append(params.getString(key.toString()));
- beforeData.append(LINE_END);
- }
- }
- } catch (JSONException e) {
- LOG.e(LOG_TAG, e.getMessage(), e);
- }
-
- beforeData.append(LINE_START).append(BOUNDARY).append(LINE_END);
- beforeData.append("Content-Disposition: form-data; name=\"").append(fileKey).append("\";");
- beforeData.append(" filename=\"").append(fileName).append('"').append(LINE_END);
- beforeData.append("Content-Type: ").append(mimeType).append(LINE_END).append(LINE_END);
- byte[] beforeDataBytes = beforeData.toString().getBytes("UTF-8");
- byte[] tailParamsBytes = (LINE_END + LINE_START + BOUNDARY + LINE_START + LINE_END).getBytes("UTF-8");
-
-
- // Get a input stream of the file on the phone
- OpenForReadResult readResult = resourceApi.openForRead(sourceUri);
-
- int stringLength = beforeDataBytes.length + tailParamsBytes.length;
- if (readResult.length >= 0) {
- fixedLength = (int)readResult.length;
- if (multipartFormUpload)
- fixedLength += stringLength;
- progress.setLengthComputable(true);
- progress.setTotal(fixedLength);
- }
- LOG.d(LOG_TAG, "Content Length: " + fixedLength);
- // setFixedLengthStreamingMode causes and OutOfMemoryException on pre-Froyo devices.
- // http://code.google.com/p/android/issues/detail?id=3164
- // It also causes OOM if HTTPS is used, even on newer devices.
- boolean useChunkedMode = chunkedMode || (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO);
- useChunkedMode = useChunkedMode || (fixedLength == -1);
-
- if (useChunkedMode) {
- conn.setChunkedStreamingMode(MAX_BUFFER_SIZE);
- // Although setChunkedStreamingMode sets this header, setting it explicitly here works
- // around an OutOfMemoryException when using https.
- conn.setRequestProperty("Transfer-Encoding", "chunked");
- } else {
- conn.setFixedLengthStreamingMode(fixedLength);
-
- if (useHttps) {
- LOG.w(LOG_TAG, "setFixedLengthStreamingMode could cause OutOfMemoryException - switch to chunkedMode=true to avoid it if this is an issue.");
- }
- }
-
- conn.connect();
-
- OutputStream sendStream = null;
- try {
- sendStream = conn.getOutputStream();
- synchronized (context) {
- if (context.aborted) {
- return;
- }
- context.connection = conn;
- }
-
- if (multipartFormUpload) {
- //We don't want to change encoding, we just want this to write for all Unicode.
- sendStream.write(beforeDataBytes);
- totalBytes += beforeDataBytes.length;
- }
-
- // create a buffer of maximum size
- int bytesAvailable = readResult.inputStream.available();
- int bufferSize = Math.min(bytesAvailable, MAX_BUFFER_SIZE);
- byte[] buffer = new byte[bufferSize];
-
- // read file and write it into form...
- int bytesRead = readResult.inputStream.read(buffer, 0, bufferSize);
-
- long prevBytesRead = 0;
- while (bytesRead > 0) {
- totalBytes += bytesRead;
- result.setBytesSent(totalBytes);
- sendStream.write(buffer, 0, bytesRead);
- if (totalBytes > prevBytesRead + 102400) {
- prevBytesRead = totalBytes;
- LOG.d(LOG_TAG, "Uploaded " + totalBytes + " of " + fixedLength + " bytes");
- }
- bytesAvailable = readResult.inputStream.available();
- bufferSize = Math.min(bytesAvailable, MAX_BUFFER_SIZE);
- bytesRead = readResult.inputStream.read(buffer, 0, bufferSize);
-
- // Send a progress event.
- progress.setLoaded(totalBytes);
- PluginResult progressResult = new PluginResult(PluginResult.Status.OK, progress.toJSONObject());
- progressResult.setKeepCallback(true);
- context.sendPluginResult(progressResult);
- }
-
- if (multipartFormUpload) {
- // send multipart form data necessary after file data...
- sendStream.write(tailParamsBytes);
- totalBytes += tailParamsBytes.length;
- }
- sendStream.flush();
- } finally {
- safeClose(readResult.inputStream);
- safeClose(sendStream);
- }
- synchronized (context) {
- context.connection = null;
- }
- LOG.d(LOG_TAG, "Sent " + totalBytes + " of " + fixedLength);
-
- //------------------ read the SERVER RESPONSE
- String responseString;
- int responseCode = conn.getResponseCode();
- LOG.d(LOG_TAG, "response code: " + responseCode);
- LOG.d(LOG_TAG, "response headers: " + conn.getHeaderFields());
- TrackingInputStream inStream = null;
- try {
- inStream = getInputStream(conn);
- synchronized (context) {
- if (context.aborted) {
- return;
- }
- context.connection = conn;
- }
-
- ByteArrayOutputStream out = new ByteArrayOutputStream(Math.max(1024, conn.getContentLength()));
- byte[] buffer = new byte[1024];
- int bytesRead = 0;
- // write bytes to file
- while ((bytesRead = inStream.read(buffer)) > 0) {
- out.write(buffer, 0, bytesRead);
- }
- responseString = out.toString("UTF-8");
- } finally {
- synchronized (context) {
- context.connection = null;
- }
- safeClose(inStream);
- }
-
- LOG.d(LOG_TAG, "got response from server");
- LOG.d(LOG_TAG, responseString.substring(0, Math.min(256, responseString.length())));
-
- // send request and retrieve response
- result.setResponseCode(responseCode);
- result.setResponse(responseString);
-
- context.sendPluginResult(new PluginResult(PluginResult.Status.OK, result.toJSONObject()));
- } catch (FileNotFoundException e) {
- JSONObject error = createFileTransferError(FILE_NOT_FOUND_ERR, source, target, conn, e);
- LOG.e(LOG_TAG, error.toString(), e);
- context.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
- } catch (IOException e) {
- JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, conn, e);
- LOG.e(LOG_TAG, error.toString(), e);
- LOG.e(LOG_TAG, "Failed after uploading " + totalBytes + " of " + fixedLength + " bytes.");
- context.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
- } catch (JSONException e) {
- LOG.e(LOG_TAG, e.getMessage(), e);
- context.sendPluginResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION));
- } catch (Throwable t) {
- // Shouldn't happen, but will
- JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, conn, t);
- LOG.e(LOG_TAG, error.toString(), t);
- context.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
- } finally {
- synchronized (activeRequests) {
- activeRequests.remove(objectId);
- }
- }
- }
- });
- }
-
- private static void safeClose(Closeable stream) {
- if (stream != null) {
- try {
- stream.close();
- } catch (IOException e) {
- }
- }
- }
-
- private static TrackingInputStream getInputStream(URLConnection conn) throws IOException {
- String encoding = conn.getContentEncoding();
- if (encoding != null && encoding.equalsIgnoreCase("gzip")) {
- return new TrackingGZIPInputStream(new ExposedGZIPInputStream(conn.getInputStream()));
- }
- return new SimpleTrackingInputStream(conn.getInputStream());
- }
-
- private static JSONObject createFileTransferError(int errorCode, String source, String target, URLConnection connection, Throwable throwable) {
-
- int httpStatus = 0;
- StringBuilder bodyBuilder = new StringBuilder();
- String body = null;
- if (connection != null) {
- try {
- if (connection instanceof HttpURLConnection) {
- httpStatus = ((HttpURLConnection)connection).getResponseCode();
- InputStream err = ((HttpURLConnection) connection).getErrorStream();
- if(err != null)
- {
- BufferedReader reader = new BufferedReader(new InputStreamReader(err, "UTF-8"));
- try {
- String line = reader.readLine();
- while(line != null) {
- bodyBuilder.append(line);
- line = reader.readLine();
- if(line != null) {
- bodyBuilder.append('\n');
- }
- }
- body = bodyBuilder.toString();
- } finally {
- reader.close();
- }
- }
- }
- // IOException can leave connection object in a bad state, so catch all exceptions.
- } catch (Throwable e) {
- LOG.w(LOG_TAG, "Error getting HTTP status code from connection.", e);
- }
- }
-
- return createFileTransferError(errorCode, source, target, body, httpStatus, throwable);
- }
-
- /**
- * Create an error object based on the passed in errorCode
- * @param errorCode the error
- * @return JSONObject containing the error
- */
- private static JSONObject createFileTransferError(int errorCode, String source, String target, String body, Integer httpStatus, Throwable throwable) {
- JSONObject error = null;
- try {
- error = new JSONObject();
- error.put("code", errorCode);
- error.put("source", source);
- error.put("target", target);
- if(body != null)
- {
- error.put("body", body);
- }
- if (httpStatus != null) {
- error.put("http_status", httpStatus);
- }
- if (throwable != null) {
- String msg = throwable.getMessage();
- if (msg == null || "".equals(msg)) {
- msg = throwable.toString();
- }
- error.put("exception", msg);
- }
- } catch (JSONException e) {
- LOG.e(LOG_TAG, e.getMessage(), e);
- }
- return error;
- }
-
- /**
- * Convenience method to read a parameter from the list of JSON args.
- * @param args the args passed to the Plugin
- * @param position the position to retrieve the arg from
- * @param defaultString the default to be used if the arg does not exist
- * @return String with the retrieved value
- */
- private static String getArgument(JSONArray args, int position, String defaultString) {
- String arg = defaultString;
- if (args.length() > position) {
- arg = args.optString(position);
- if (arg == null || "null".equals(arg)) {
- arg = defaultString;
- }
- }
- return arg;
- }
-
- /**
- * Downloads a file form a given URL and saves it to the specified directory.
- *
- * @param source URL of the server to receive the file
- * @param target Full path of the file on the file system
- */
- private void download(final String source, final String target, JSONArray args, CallbackContext callbackContext) throws JSONException {
- LOG.d(LOG_TAG, "download " + source + " to " + target);
-
- final CordovaResourceApi resourceApi = webView.getResourceApi();
-
- final String objectId = args.getString(3);
- final JSONObject headers = args.optJSONObject(4);
-
- final Uri sourceUri = resourceApi.remapUri(Uri.parse(source));
- int uriType = CordovaResourceApi.getUriType(sourceUri);
- final boolean useHttps = uriType == CordovaResourceApi.URI_TYPE_HTTPS;
- final boolean isLocalTransfer = !useHttps && uriType != CordovaResourceApi.URI_TYPE_HTTP;
- if (uriType == CordovaResourceApi.URI_TYPE_UNKNOWN) {
- JSONObject error = createFileTransferError(INVALID_URL_ERR, source, target, null, 0, null);
- LOG.e(LOG_TAG, "Unsupported URI: " + sourceUri);
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
- return;
- }
-
- /* This code exists for compatibility between 3.x and 4.x versions of Cordova.
- * Previously the CordovaWebView class had a method, getWhitelist, which would
- * return a Whitelist object. Since the fixed whitelist is removed in Cordova 4.x,
- * the correct call now is to shouldAllowRequest from the plugin manager.
- */
- Boolean shouldAllowRequest = null;
- if (isLocalTransfer) {
- shouldAllowRequest = true;
- }
- if (shouldAllowRequest == null) {
- try {
- Method gwl = webView.getClass().getMethod("getWhitelist");
- Whitelist whitelist = (Whitelist)gwl.invoke(webView);
- shouldAllowRequest = whitelist.isUrlWhiteListed(source);
- } catch (NoSuchMethodException e) {
- } catch (IllegalAccessException e) {
- } catch (InvocationTargetException e) {
- }
- }
- if (shouldAllowRequest == null) {
- try {
- Method gpm = webView.getClass().getMethod("getPluginManager");
- PluginManager pm = (PluginManager)gpm.invoke(webView);
- Method san = pm.getClass().getMethod("shouldAllowRequest", String.class);
- shouldAllowRequest = (Boolean)san.invoke(pm, source);
- } catch (NoSuchMethodException e) {
- } catch (IllegalAccessException e) {
- } catch (InvocationTargetException e) {
- }
- }
-
- if (!Boolean.TRUE.equals(shouldAllowRequest)) {
- LOG.w(LOG_TAG, "Source URL is not in white list: '" + source + "'");
- JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, null, 401, null);
- callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
- return;
- }
-
-
- final RequestContext context = new RequestContext(source, target, callbackContext);
- synchronized (activeRequests) {
- activeRequests.put(objectId, context);
- }
-
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- if (context.aborted) {
- return;
- }
-
- // Accept a path or a URI for the source.
- Uri tmpTarget = Uri.parse(target);
- Uri targetUri = resourceApi.remapUri(
- tmpTarget.getScheme() != null ? tmpTarget : Uri.fromFile(new File(target)));
- HttpURLConnection connection = null;
- File file = null;
- PluginResult result = null;
- TrackingInputStream inputStream = null;
- boolean cached = false;
-
- OutputStream outputStream = null;
- try {
- OpenForReadResult readResult = null;
-
- file = resourceApi.mapUriToFile(targetUri);
- context.targetFile = file;
-
- LOG.d(LOG_TAG, "Download file:" + sourceUri);
-
- FileProgressResult progress = new FileProgressResult();
-
- if (isLocalTransfer) {
- readResult = resourceApi.openForRead(sourceUri);
- if (readResult.length != -1) {
- progress.setLengthComputable(true);
- progress.setTotal(readResult.length);
- }
- inputStream = new SimpleTrackingInputStream(readResult.inputStream);
- } else {
- // connect to server
- // Open a HTTP connection to the URL based on protocol
- connection = resourceApi.createHttpConnection(sourceUri);
- connection.setRequestMethod("GET");
-
- // TODO: Make OkHttp use this CookieManager by default.
- String cookie = getCookies(sourceUri.toString());
-
- if(cookie != null)
- {
- connection.setRequestProperty("cookie", cookie);
- }
-
- // This must be explicitly set for gzip progress tracking to work.
- connection.setRequestProperty("Accept-Encoding", "gzip");
-
- // Handle the other headers
- if (headers != null) {
- addHeadersToRequest(connection, headers);
- }
-
- connection.connect();
- if (connection.getResponseCode() == HttpURLConnection.HTTP_NOT_MODIFIED) {
- cached = true;
- connection.disconnect();
- LOG.d(LOG_TAG, "Resource not modified: " + source);
- JSONObject error = createFileTransferError(NOT_MODIFIED_ERR, source, target, connection, null);
- result = new PluginResult(PluginResult.Status.ERROR, error);
- } else {
- if (connection.getContentEncoding() == null || connection.getContentEncoding().equalsIgnoreCase("gzip")) {
- // Only trust content-length header if we understand
- // the encoding -- identity or gzip
- if (connection.getContentLength() != -1) {
- progress.setLengthComputable(true);
- progress.setTotal(connection.getContentLength());
- }
- }
- inputStream = getInputStream(connection);
- }
- }
-
- if (!cached) {
- try {
- synchronized (context) {
- if (context.aborted) {
- return;
- }
- context.connection = connection;
- }
-
- // write bytes to file
- byte[] buffer = new byte[MAX_BUFFER_SIZE];
- int bytesRead = 0;
- outputStream = resourceApi.openOutputStream(targetUri);
- while ((bytesRead = inputStream.read(buffer)) > 0) {
- outputStream.write(buffer, 0, bytesRead);
- // Send a progress event.
- progress.setLoaded(inputStream.getTotalRawBytesRead());
- PluginResult progressResult = new PluginResult(PluginResult.Status.OK, progress.toJSONObject());
- progressResult.setKeepCallback(true);
- context.sendPluginResult(progressResult);
- }
- } finally {
- synchronized (context) {
- context.connection = null;
- }
- safeClose(inputStream);
- safeClose(outputStream);
- }
-
- LOG.d(LOG_TAG, "Saved file: " + target);
-
-
- // create FileEntry object
- Class webViewClass = webView.getClass();
- PluginManager pm = null;
- try {
- Method gpm = webViewClass.getMethod("getPluginManager");
- pm = (PluginManager) gpm.invoke(webView);
- } catch (NoSuchMethodException e) {
- } catch (IllegalAccessException e) {
- } catch (InvocationTargetException e) {
- }
- if (pm == null) {
- try {
- Field pmf = webViewClass.getField("pluginManager");
- pm = (PluginManager)pmf.get(webView);
- } catch (NoSuchFieldException e) {
- } catch (IllegalAccessException e) {
- }
- }
- file = resourceApi.mapUriToFile(targetUri);
- context.targetFile = file;
- FileUtils filePlugin = (FileUtils) pm.getPlugin("File");
- if (filePlugin != null) {
- JSONObject fileEntry = filePlugin.getEntryForFile(file);
- if (fileEntry != null) {
- result = new PluginResult(PluginResult.Status.OK, fileEntry);
- } else {
- JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, connection, null);
- LOG.e(LOG_TAG, "File plugin cannot represent download path");
- result = new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
- }
- } else {
- LOG.e(LOG_TAG, "File plugin not found; cannot save downloaded file");
- result = new PluginResult(PluginResult.Status.ERROR, "File plugin not found; cannot save downloaded file");
- }
- }
- } catch (FileNotFoundException e) {
- JSONObject error = createFileTransferError(FILE_NOT_FOUND_ERR, source, target, connection, e);
- LOG.e(LOG_TAG, error.toString(), e);
- result = new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
- } catch (IOException e) {
- JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, connection, e);
- LOG.e(LOG_TAG, error.toString(), e);
- result = new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
- } catch (JSONException e) {
- LOG.e(LOG_TAG, e.getMessage(), e);
- result = new PluginResult(PluginResult.Status.JSON_EXCEPTION);
- } catch (Throwable e) {
- JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, connection, e);
- LOG.e(LOG_TAG, error.toString(), e);
- result = new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
- } finally {
- synchronized (activeRequests) {
- activeRequests.remove(objectId);
- }
-
- if (result == null) {
- result = new PluginResult(PluginResult.Status.ERROR, createFileTransferError(CONNECTION_ERR, source, target, connection, null));
- }
- // Remove incomplete download.
- if (!cached && result.getStatus() != PluginResult.Status.OK.ordinal() && file != null) {
- file.delete();
- }
- context.sendPluginResult(result);
- }
- }
- });
- }
-
- /**
- * Abort an ongoing upload or download.
- */
- private void abort(String objectId) {
- final RequestContext context;
- synchronized (activeRequests) {
- context = activeRequests.remove(objectId);
- }
- if (context != null) {
- // Closing the streams can block, so execute on a background thread.
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- synchronized (context) {
- File file = context.targetFile;
- if (file != null) {
- file.delete();
- }
- // Trigger the abort callback immediately to minimize latency between it and abort() being called.
- JSONObject error = createFileTransferError(ABORTED_ERR, context.source, context.target, null, -1, null);
- context.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, error));
- context.aborted = true;
- if (context.connection != null) {
- try {
- context.connection.disconnect();
- } catch (Exception e) {
- LOG.e(LOG_TAG, "CB-8431 Catch workaround for fatal exception", e);
- }
- }
- }
- }
- });
- }
- }
-}
diff --git a/plugins/cordova-plugin-file-transfer/src/android/FileUploadResult.java b/plugins/cordova-plugin-file-transfer/src/android/FileUploadResult.java
deleted file mode 100644
index c24ea78..0000000
--- a/plugins/cordova-plugin-file-transfer/src/android/FileUploadResult.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-package org.apache.cordova.filetransfer;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/**
- * Encapsulates the result and/or status of uploading a file to a remote server.
- */
-public class FileUploadResult {
-
- private long bytesSent = 0; // bytes sent
- private int responseCode = -1; // HTTP response code
- private String response = null; // HTTP response
- private String objectId = null; // FileTransfer object id
-
- public long getBytesSent() {
- return bytesSent;
- }
-
- public void setBytesSent(long bytes) {
- this.bytesSent = bytes;
- }
-
- public int getResponseCode() {
- return responseCode;
- }
-
- public void setResponseCode(int responseCode) {
- this.responseCode = responseCode;
- }
-
- public String getResponse() {
- return response;
- }
-
- public void setResponse(String response) {
- this.response = response;
- }
-
- public String getObjectId() {
- return objectId;
- }
-
- public void setObjectId(String objectId) {
- this.objectId = objectId;
- }
-
- public JSONObject toJSONObject() throws JSONException {
- return new JSONObject(
- "{bytesSent:" + bytesSent +
- ",responseCode:" + responseCode +
- ",response:" + JSONObject.quote(response) +
- ",objectId:" + JSONObject.quote(objectId) + "}");
- }
-}
diff --git a/plugins/cordova-plugin-file-transfer/src/ios/CDVFileTransfer.h b/plugins/cordova-plugin-file-transfer/src/ios/CDVFileTransfer.h
deleted file mode 100644
index b7301ef..0000000
--- a/plugins/cordova-plugin-file-transfer/src/ios/CDVFileTransfer.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import
-#import
-#import "CDVFile.h"
-
-enum CDVFileTransferError {
- FILE_NOT_FOUND_ERR = 1,
- INVALID_URL_ERR = 2,
- CONNECTION_ERR = 3,
- CONNECTION_ABORTED = 4,
- NOT_MODIFIED = 5
-};
-typedef int CDVFileTransferError;
-
-enum CDVFileTransferDirection {
- CDV_TRANSFER_UPLOAD = 1,
- CDV_TRANSFER_DOWNLOAD = 2,
-};
-typedef int CDVFileTransferDirection;
-
-// Magic value within the options dict used to set a cookie.
-extern NSString* const kOptionsKeyCookie;
-
-@interface CDVFileTransfer : CDVPlugin {}
-
-- (void)upload:(CDVInvokedUrlCommand*)command;
-- (void)download:(CDVInvokedUrlCommand*)command;
-- (NSString*)escapePathComponentForUrlString:(NSString*)urlString;
-
-// Visible for testing.
-- (NSURLRequest*)requestForUploadCommand:(CDVInvokedUrlCommand*)command fileData:(NSData*)fileData;
-- (NSMutableDictionary*)createFileTransferError:(int)code AndSource:(NSString*)source AndTarget:(NSString*)target;
-
-- (NSMutableDictionary*)createFileTransferError:(int)code
- AndSource:(NSString*)source
- AndTarget:(NSString*)target
- AndHttpStatus:(int)httpStatus
- AndBody:(NSString*)body;
-@property (nonatomic, strong) NSOperationQueue* queue;
-@property (readonly) NSMutableDictionary* activeTransfers;
-@end
-
-@class CDVFileTransferEntityLengthRequest;
-
-@interface CDVFileTransferDelegate : NSObject {}
-
-- (void)updateBytesExpected:(long long)newBytesExpected;
-- (void)cancelTransfer:(NSURLConnection*)connection;
-
-@property (strong) NSMutableData* responseData; // atomic
-@property (nonatomic, strong) NSDictionary* responseHeaders;
-@property (nonatomic, assign) UIBackgroundTaskIdentifier backgroundTaskID;
-@property (nonatomic, strong) CDVFileTransfer* command;
-@property (nonatomic, assign) CDVFileTransferDirection direction;
-@property (nonatomic, strong) NSURLConnection* connection;
-@property (nonatomic, copy) NSString* callbackId;
-@property (nonatomic, copy) NSString* objectId;
-@property (nonatomic, copy) NSString* source;
-@property (nonatomic, copy) NSString* target;
-@property (nonatomic, copy) NSURL* targetURL;
-@property (nonatomic, copy) NSString* mimeType;
-@property (assign) int responseCode; // atomic
-@property (nonatomic, assign) long long bytesTransfered;
-@property (nonatomic, assign) long long bytesExpected;
-@property (nonatomic, assign) BOOL trustAllHosts;
-@property (strong) NSFileHandle* targetFileHandle;
-@property (nonatomic, strong) CDVFileTransferEntityLengthRequest* entityLengthRequest;
-@property (nonatomic, strong) CDVFile *filePlugin;
-@property (nonatomic, assign) BOOL chunkedMode;
-
-@end
diff --git a/plugins/cordova-plugin-file-transfer/src/ios/CDVFileTransfer.m b/plugins/cordova-plugin-file-transfer/src/ios/CDVFileTransfer.m
deleted file mode 100644
index d0584ad..0000000
--- a/plugins/cordova-plugin-file-transfer/src/ios/CDVFileTransfer.m
+++ /dev/null
@@ -1,861 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import
-#import "CDVFileTransfer.h"
-#import "CDVLocalFilesystem.h"
-
-#import
-#import
-#import
-#import
-
-#ifndef DLog
-#ifdef DEBUG
- #define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
-#else
- #define DLog(...)
-#endif
-#endif
-
-@interface CDVFileTransfer ()
-// Sets the requests headers for the request.
-- (void)applyRequestHeaders:(NSDictionary*)headers toRequest:(NSMutableURLRequest*)req;
-// Creates a delegate to handle an upload.
-- (CDVFileTransferDelegate*)delegateForUploadCommand:(CDVInvokedUrlCommand*)command;
-// Creates an NSData* for the file for the given upload arguments.
-- (void)fileDataForUploadCommand:(CDVInvokedUrlCommand*)command;
-@end
-
-// Buffer size to use for streaming uploads.
-static const NSUInteger kStreamBufferSize = 32768;
-// Magic value within the options dict used to set a cookie.
-NSString* const kOptionsKeyCookie = @"__cookie";
-// Form boundary for multi-part requests.
-NSString* const kFormBoundary = @"+++++org.apache.cordova.formBoundary";
-
-// Writes the given data to the stream in a blocking way.
-// If successful, returns bytesToWrite.
-// If the stream was closed on the other end, returns 0.
-// If there was an error, returns -1.
-static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
-{
- UInt8* bytes = (UInt8*)[data bytes];
- long long bytesToWrite = [data length];
- long long totalBytesWritten = 0;
-
- while (totalBytesWritten < bytesToWrite) {
- CFIndex result = CFWriteStreamWrite(stream,
- bytes + totalBytesWritten,
- bytesToWrite - totalBytesWritten);
- if (result < 0) {
- CFStreamError error = CFWriteStreamGetError(stream);
- NSLog(@"WriteStreamError domain: %ld error: %ld", error.domain, (long)error.error);
- return result;
- } else if (result == 0) {
- return result;
- }
- totalBytesWritten += result;
- }
-
- return totalBytesWritten;
-}
-
-@implementation CDVFileTransfer
-@synthesize activeTransfers;
-
-- (void)pluginInitialize {
- activeTransfers = [[NSMutableDictionary alloc] init];
-}
-
-- (NSString*)escapePathComponentForUrlString:(NSString*)urlString
-{
- NSRange schemeAndHostRange = [urlString rangeOfString:@"://.*?/" options:NSRegularExpressionSearch];
-
- if (schemeAndHostRange.length == 0) {
- return urlString;
- }
-
- NSInteger schemeAndHostEndIndex = NSMaxRange(schemeAndHostRange);
- NSString* schemeAndHost = [urlString substringToIndex:schemeAndHostEndIndex];
- NSString* pathComponent = [urlString substringFromIndex:schemeAndHostEndIndex];
- pathComponent = [pathComponent stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-
- return [schemeAndHost stringByAppendingString:pathComponent];
-}
-
-- (void)applyRequestHeaders:(NSDictionary*)headers toRequest:(NSMutableURLRequest*)req
-{
- [req setValue:@"XMLHttpRequest" forHTTPHeaderField:@"X-Requested-With"];
-
- NSString* userAgent = [self.commandDelegate userAgent];
- if (userAgent) {
- [req setValue:userAgent forHTTPHeaderField:@"User-Agent"];
- }
-
- for (NSString* headerName in headers) {
- id value = [headers objectForKey:headerName];
- if (!value || (value == [NSNull null])) {
- value = @"null";
- }
-
- // First, remove an existing header if one exists.
- [req setValue:nil forHTTPHeaderField:headerName];
-
- if (![value isKindOfClass:[NSArray class]]) {
- value = [NSArray arrayWithObject:value];
- }
-
- // Then, append all header values.
- for (id __strong subValue in value) {
- // Convert from an NSNumber -> NSString.
- if ([subValue respondsToSelector:@selector(stringValue)]) {
- subValue = [subValue stringValue];
- }
- if ([subValue isKindOfClass:[NSString class]]) {
- [req addValue:subValue forHTTPHeaderField:headerName];
- }
- }
- }
-}
-
-- (NSURLRequest*)requestForUploadCommand:(CDVInvokedUrlCommand*)command fileData:(NSData*)fileData
-{
- // arguments order from js: [filePath, server, fileKey, fileName, mimeType, params, debug, chunkedMode]
- // however, params is a JavaScript object and during marshalling is put into the options dict,
- // thus debug and chunkedMode are the 6th and 7th arguments
- NSString* target = [command argumentAtIndex:0];
- NSString* server = [command argumentAtIndex:1];
- NSString* fileKey = [command argumentAtIndex:2 withDefault:@"file"];
- NSString* fileName = [command argumentAtIndex:3 withDefault:@"image.jpg"];
- NSString* mimeType = [command argumentAtIndex:4 withDefault:@"image/jpeg"];
- NSDictionary* options = [command argumentAtIndex:5 withDefault:nil];
- // BOOL trustAllHosts = [[command argumentAtIndex:6 withDefault:[NSNumber numberWithBool:YES]] boolValue]; // allow self-signed certs
- BOOL chunkedMode = [[command argumentAtIndex:7 withDefault:[NSNumber numberWithBool:YES]] boolValue];
- NSDictionary* headers = [command argumentAtIndex:8 withDefault:nil];
- // Allow alternative http method, default to POST. JS side checks
- // for allowed methods, currently PUT or POST (forces POST for
- // unrecognised values)
- NSString* httpMethod = [command argumentAtIndex:10 withDefault:@"POST"];
- CDVPluginResult* result = nil;
- CDVFileTransferError errorCode = 0;
-
- // NSURL does not accepts URLs with spaces in the path. We escape the path in order
- // to be more lenient.
- NSURL* url = [NSURL URLWithString:server];
-
- if (!url) {
- errorCode = INVALID_URL_ERR;
- NSLog(@"File Transfer Error: Invalid server URL %@", server);
- } else if (!fileData) {
- errorCode = FILE_NOT_FOUND_ERR;
- }
-
- if (errorCode > 0) {
- result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:[self createFileTransferError:errorCode AndSource:target AndTarget:server]];
- [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
- return nil;
- }
-
- NSMutableURLRequest* req = [NSMutableURLRequest requestWithURL:url];
-
- [req setHTTPMethod:httpMethod];
-
- // Magic value to set a cookie
- if ([options objectForKey:kOptionsKeyCookie]) {
- [req setValue:[options objectForKey:kOptionsKeyCookie] forHTTPHeaderField:@"Cookie"];
- [req setHTTPShouldHandleCookies:NO];
- }
-
- // if we specified a Content-Type header, don't do multipart form upload
- BOOL multipartFormUpload = [headers objectForKey:@"Content-Type"] == nil;
- if (multipartFormUpload) {
- NSString* contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", kFormBoundary];
- [req setValue:contentType forHTTPHeaderField:@"Content-Type"];
- }
- [self applyRequestHeaders:headers toRequest:req];
-
- NSData* formBoundaryData = [[NSString stringWithFormat:@"--%@\r\n", kFormBoundary] dataUsingEncoding:NSUTF8StringEncoding];
- NSMutableData* postBodyBeforeFile = [NSMutableData data];
-
- for (NSString* key in options) {
- id val = [options objectForKey:key];
- if (!val || (val == [NSNull null]) || [key isEqualToString:kOptionsKeyCookie]) {
- continue;
- }
- // if it responds to stringValue selector (eg NSNumber) get the NSString
- if ([val respondsToSelector:@selector(stringValue)]) {
- val = [val stringValue];
- }
- // finally, check whether it is a NSString (for dataUsingEncoding selector below)
- if (![val isKindOfClass:[NSString class]]) {
- continue;
- }
-
- [postBodyBeforeFile appendData:formBoundaryData];
- [postBodyBeforeFile appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n", key] dataUsingEncoding:NSUTF8StringEncoding]];
- [postBodyBeforeFile appendData:[val dataUsingEncoding:NSUTF8StringEncoding]];
- [postBodyBeforeFile appendData:[@"\r\n" dataUsingEncoding : NSUTF8StringEncoding]];
- }
-
- [postBodyBeforeFile appendData:formBoundaryData];
- [postBodyBeforeFile appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"; filename=\"%@\"\r\n", fileKey, fileName] dataUsingEncoding:NSUTF8StringEncoding]];
- if (mimeType != nil) {
- [postBodyBeforeFile appendData:[[NSString stringWithFormat:@"Content-Type: %@\r\n", mimeType] dataUsingEncoding:NSUTF8StringEncoding]];
- }
- [postBodyBeforeFile appendData:[[NSString stringWithFormat:@"Content-Length: %ld\r\n\r\n", (long)[fileData length]] dataUsingEncoding:NSUTF8StringEncoding]];
-
- DLog(@"fileData length: %ld", [fileData length]);
- NSData* postBodyAfterFile = [[NSString stringWithFormat:@"\r\n--%@--\r\n", kFormBoundary] dataUsingEncoding:NSUTF8StringEncoding];
-
- long long totalPayloadLength = [fileData length];
- if (multipartFormUpload) {
- totalPayloadLength += [postBodyBeforeFile length] + [postBodyAfterFile length];
- }
-
- [req setValue:[[NSNumber numberWithLongLong:totalPayloadLength] stringValue] forHTTPHeaderField:@"Content-Length"];
-
- if (chunkedMode) {
- CFReadStreamRef readStream = NULL;
- CFWriteStreamRef writeStream = NULL;
- CFStreamCreateBoundPair(NULL, &readStream, &writeStream, kStreamBufferSize);
- [req setHTTPBodyStream:CFBridgingRelease(readStream)];
-
- [self.commandDelegate runInBackground:^{
- if (CFWriteStreamOpen(writeStream)) {
- if (multipartFormUpload) {
- NSData* chunks[] = { postBodyBeforeFile, fileData, postBodyAfterFile };
- int numChunks = sizeof(chunks) / sizeof(chunks[0]);
-
- for (int i = 0; i < numChunks; ++i) {
- // Allow uploading of an empty file
- if (chunks[i].length == 0) {
- continue;
- }
-
- CFIndex result = WriteDataToStream(chunks[i], writeStream);
- if (result <= 0) {
- break;
- }
- }
- } else {
- if (totalPayloadLength > 0) {
- WriteDataToStream(fileData, writeStream);
- } else {
- NSLog(@"Uploading of an empty file is not supported for chunkedMode=true and multipart=false");
- }
- }
- } else {
- NSLog(@"FileTransfer: Failed to open writeStream");
- }
- CFWriteStreamClose(writeStream);
- CFRelease(writeStream);
- }];
- } else {
- if (multipartFormUpload) {
- [postBodyBeforeFile appendData:fileData];
- [postBodyBeforeFile appendData:postBodyAfterFile];
- [req setHTTPBody:postBodyBeforeFile];
- } else {
- [req setHTTPBody:fileData];
- }
- }
- return req;
-}
-
-- (CDVFileTransferDelegate*)delegateForUploadCommand:(CDVInvokedUrlCommand*)command
-{
- NSString* source = [command argumentAtIndex:0];
- NSString* server = [command argumentAtIndex:1];
- BOOL trustAllHosts = [[command argumentAtIndex:6 withDefault:[NSNumber numberWithBool:NO]] boolValue]; // allow self-signed certs
- NSString* objectId = [command argumentAtIndex:9];
- BOOL chunkedMode = [[command argumentAtIndex:7 withDefault:[NSNumber numberWithBool:YES]] boolValue];
-
- CDVFileTransferDelegate* delegate = [[CDVFileTransferDelegate alloc] init];
-
- delegate.command = self;
- delegate.callbackId = command.callbackId;
- delegate.direction = CDV_TRANSFER_UPLOAD;
- delegate.objectId = objectId;
- delegate.source = source;
- delegate.target = server;
- delegate.trustAllHosts = trustAllHosts;
- delegate.filePlugin = [self.commandDelegate getCommandInstance:@"File"];
- delegate.chunkedMode = chunkedMode;
-
- return delegate;
-}
-
-- (void)fileDataForUploadCommand:(CDVInvokedUrlCommand*)command
-{
- NSString* source = (NSString*)[command argumentAtIndex:0];
- NSString* server = [command argumentAtIndex:1];
- NSError* __autoreleasing err = nil;
-
- if ([source hasPrefix:@"data:"] && [source rangeOfString:@"base64"].location != NSNotFound) {
- NSRange commaRange = [source rangeOfString: @","];
- if (commaRange.location == NSNotFound) {
- // Return error is there is no comma
- __weak CDVFileTransfer* weakSelf = self;
- CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:[weakSelf createFileTransferError:INVALID_URL_ERR AndSource:source AndTarget:server]];
- [weakSelf.commandDelegate sendPluginResult:result callbackId:command.callbackId];
- return;
- }
-
- if (commaRange.location + 1 > source.length - 1) {
- // Init as an empty data
- NSData *fileData = [[NSData alloc] init];
- [self uploadData:fileData command:command];
- return;
- }
-
- NSData *fileData = [[NSData alloc] initWithBase64EncodedString:[source substringFromIndex:(commaRange.location + 1)] options:NSDataBase64DecodingIgnoreUnknownCharacters];
- [self uploadData:fileData command:command];
- return;
- }
-
- CDVFilesystemURL *sourceURL = [CDVFilesystemURL fileSystemURLWithString:source];
- NSObject *fs;
- if (sourceURL) {
- // Try to get a CDVFileSystem which will handle this file.
- // This requires talking to the current CDVFile plugin.
- fs = [[self.commandDelegate getCommandInstance:@"File"] filesystemForURL:sourceURL];
- }
- if (fs) {
- __weak CDVFileTransfer* weakSelf = self;
- [fs readFileAtURL:sourceURL start:0 end:-1 callback:^(NSData *fileData, NSString *mimeType, CDVFileError err) {
- if (err) {
- // We couldn't find the asset. Send the appropriate error.
- CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:[weakSelf createFileTransferError:NOT_FOUND_ERR AndSource:source AndTarget:server]];
- [weakSelf.commandDelegate sendPluginResult:result callbackId:command.callbackId];
- } else {
- [weakSelf uploadData:fileData command:command];
- }
- }];
- return;
- } else {
- // Extract the path part out of a file: URL.
- NSString* filePath = [source hasPrefix:@"/"] ? [source copy] : [(NSURL *)[NSURL URLWithString:source] path];
- if (filePath == nil) {
- // We couldn't find the asset. Send the appropriate error.
- CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:[self createFileTransferError:NOT_FOUND_ERR AndSource:source AndTarget:server]];
- [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
- return;
- }
-
- // Memory map the file so that it can be read efficiently even if it is large.
- NSData* fileData = [NSData dataWithContentsOfFile:filePath options:NSDataReadingMappedIfSafe error:&err];
-
- if (err != nil) {
- NSLog(@"Error opening file %@: %@", source, err);
- CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:[self createFileTransferError:NOT_FOUND_ERR AndSource:source AndTarget:server]];
- [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
- } else {
- [self uploadData:fileData command:command];
- }
- }
-}
-
-- (void)upload:(CDVInvokedUrlCommand*)command
-{
- // fileData and req are split into helper functions to ease the unit testing of delegateForUpload.
- // First, get the file data. This method will call `uploadData:command`.
- [self fileDataForUploadCommand:command];
-}
-
-- (void)uploadData:(NSData*)fileData command:(CDVInvokedUrlCommand*)command
-{
- NSURLRequest* req = [self requestForUploadCommand:command fileData:fileData];
-
- if (req == nil) {
- return;
- }
- CDVFileTransferDelegate* delegate = [self delegateForUploadCommand:command];
- delegate.connection = [[NSURLConnection alloc] initWithRequest:req delegate:delegate startImmediately:NO];
- if (self.queue == nil) {
- self.queue = [[NSOperationQueue alloc] init];
- }
- [delegate.connection setDelegateQueue:self.queue];
-
- // sets a background task ID for the transfer object.
- delegate.backgroundTaskID = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
- [delegate cancelTransfer:delegate.connection];
- }];
-
- @synchronized (activeTransfers) {
- activeTransfers[delegate.objectId] = delegate;
- }
- [delegate.connection start];
-}
-
-- (void)abort:(CDVInvokedUrlCommand*)command
-{
- NSString* objectId = [command argumentAtIndex:0];
-
- @synchronized (activeTransfers) {
- CDVFileTransferDelegate* delegate = activeTransfers[objectId];
- if (delegate != nil) {
- [delegate cancelTransfer:delegate.connection];
- CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:[self createFileTransferError:CONNECTION_ABORTED AndSource:delegate.source AndTarget:delegate.target]];
- [self.commandDelegate sendPluginResult:result callbackId:delegate.callbackId];
- }
- }
-}
-
-- (void)download:(CDVInvokedUrlCommand*)command
-{
- DLog(@"File Transfer downloading file...");
- NSString* source = [command argumentAtIndex:0];
- NSString* target = [command argumentAtIndex:1];
- BOOL trustAllHosts = [[command argumentAtIndex:2 withDefault:[NSNumber numberWithBool:NO]] boolValue]; // allow self-signed certs
- NSString* objectId = [command argumentAtIndex:3];
- NSDictionary* headers = [command argumentAtIndex:4 withDefault:nil];
-
- CDVPluginResult* result = nil;
- CDVFileTransferError errorCode = 0;
-
- NSURL* targetURL;
-
- if ([target hasPrefix:@"/"]) {
- /* Backwards-compatibility:
- * Check here to see if it looks like the user passed in a raw filesystem path. (Perhaps they had the path saved, and were previously using it with the old version of File). If so, normalize it by removing empty path segments, and check with File to see if any of the installed filesystems will handle it. If so, then we will end up with a filesystem url to use for the remainder of this operation.
- */
- target = [target stringByReplacingOccurrencesOfString:@"//" withString:@"/"];
- targetURL = [[self.commandDelegate getCommandInstance:@"File"] fileSystemURLforLocalPath:target].url;
- } else {
- targetURL = [NSURL URLWithString:target];
-
- if (targetURL == nil) {
- NSString* targetUrlTextEscaped = [target stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
- if (targetUrlTextEscaped) {
- targetURL = [NSURL URLWithString:targetUrlTextEscaped];
- }
- }
- }
-
- NSURL* sourceURL = [NSURL URLWithString:source];
-
- if (!sourceURL) {
- errorCode = INVALID_URL_ERR;
- NSLog(@"File Transfer Error: Invalid server URL %@", source);
- } else if (!targetURL) {
- errorCode = INVALID_URL_ERR;
- NSLog(@"File Tranfer Error: Invalid target URL %@", target);
- } else if (![targetURL isFileURL]) {
- CDVFilesystemURL *fsURL = [CDVFilesystemURL fileSystemURLWithString:target];
- if (!fsURL) {
- errorCode = FILE_NOT_FOUND_ERR;
- NSLog(@"File Transfer Error: Invalid file path or URL %@", target);
- }
- }
-
- if (errorCode > 0) {
- result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:[self createFileTransferError:errorCode AndSource:source AndTarget:target]];
- [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
- return;
- }
-
- NSMutableURLRequest* req = [NSMutableURLRequest requestWithURL:sourceURL];
- [self applyRequestHeaders:headers toRequest:req];
-
- CDVFileTransferDelegate* delegate = [[CDVFileTransferDelegate alloc] init];
- delegate.command = self;
- delegate.direction = CDV_TRANSFER_DOWNLOAD;
- delegate.callbackId = command.callbackId;
- delegate.objectId = objectId;
- delegate.source = source;
- delegate.target = [targetURL absoluteString];
- delegate.targetURL = targetURL;
- delegate.trustAllHosts = trustAllHosts;
- delegate.filePlugin = [self.commandDelegate getCommandInstance:@"File"];
- delegate.backgroundTaskID = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
- [delegate cancelTransfer:delegate.connection];
- }];
-
- delegate.connection = [[NSURLConnection alloc] initWithRequest:req delegate:delegate startImmediately:NO];
-
- if (self.queue == nil) {
- self.queue = [[NSOperationQueue alloc] init];
- }
- [delegate.connection setDelegateQueue:self.queue];
-
- @synchronized (activeTransfers) {
- activeTransfers[delegate.objectId] = delegate;
- }
- // Downloads can take time
- // sending this to a new thread calling the download_async method
- dispatch_async(
- dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, (unsigned long)NULL),
- ^(void) { [delegate.connection start];}
- );
-}
-
-- (NSMutableDictionary*)createFileTransferError:(int)code AndSource:(NSString*)source AndTarget:(NSString*)target
-{
- NSMutableDictionary* result = [NSMutableDictionary dictionaryWithCapacity:3];
-
- [result setObject:[NSNumber numberWithInt:code] forKey:@"code"];
- if (source != nil) {
- [result setObject:source forKey:@"source"];
- }
- if (target != nil) {
- [result setObject:target forKey:@"target"];
- }
- NSLog(@"FileTransferError %@", result);
-
- return result;
-}
-
-- (NSMutableDictionary*)createFileTransferError:(int)code
- AndSource:(NSString*)source
- AndTarget:(NSString*)target
- AndHttpStatus:(int)httpStatus
- AndBody:(NSString*)body
-{
- NSMutableDictionary* result = [NSMutableDictionary dictionaryWithCapacity:5];
-
- [result setObject:[NSNumber numberWithInt:code] forKey:@"code"];
- if (source != nil) {
- [result setObject:source forKey:@"source"];
- }
- if (target != nil) {
- [result setObject:target forKey:@"target"];
- }
- [result setObject:[NSNumber numberWithInt:httpStatus] forKey:@"http_status"];
- if (body != nil) {
- [result setObject:body forKey:@"body"];
- }
- NSLog(@"FileTransferError %@", result);
-
- return result;
-}
-
-- (void)onReset {
- @synchronized (activeTransfers) {
- while ([activeTransfers count] > 0) {
- CDVFileTransferDelegate* delegate = [activeTransfers allValues][0];
- [delegate cancelTransfer:delegate.connection];
- }
- }
-}
-
-@end
-
-@interface CDVFileTransferEntityLengthRequest : NSObject {
- NSURLConnection* _connection;
- CDVFileTransferDelegate* __weak _originalDelegate;
-}
-
-- (CDVFileTransferEntityLengthRequest*)initWithOriginalRequest:(NSURLRequest*)originalRequest andDelegate:(CDVFileTransferDelegate*)originalDelegate;
-
-@end
-
-@implementation CDVFileTransferEntityLengthRequest
-
-- (CDVFileTransferEntityLengthRequest*)initWithOriginalRequest:(NSURLRequest*)originalRequest andDelegate:(CDVFileTransferDelegate*)originalDelegate
-{
- if (self) {
- DLog(@"Requesting entity length for GZIPped content...");
-
- NSMutableURLRequest* req = [originalRequest mutableCopy];
- [req setHTTPMethod:@"HEAD"];
- [req setValue:@"identity" forHTTPHeaderField:@"Accept-Encoding"];
-
- _originalDelegate = originalDelegate;
- _connection = [NSURLConnection connectionWithRequest:req delegate:self];
- }
- return self;
-}
-
-- (void)connection:(NSURLConnection*)connection didReceiveResponse:(NSURLResponse*)response
-{
- DLog(@"HEAD request returned; content-length is %lld", [response expectedContentLength]);
- [_originalDelegate updateBytesExpected:[response expectedContentLength]];
-}
-
-- (void)connection:(NSURLConnection*)connection didReceiveData:(NSData*)data
-{}
-
-- (void)connectionDidFinishLoading:(NSURLConnection*)connection
-{}
-
-@end
-
-@implementation CDVFileTransferDelegate
-
-@synthesize callbackId, connection = _connection, source, target, responseData, responseHeaders, command, bytesTransfered, bytesExpected, direction, responseCode, objectId, targetFileHandle, filePlugin;
-
-- (void)connectionDidFinishLoading:(NSURLConnection*)connection
-{
- NSString* uploadResponse = nil;
- NSString* downloadResponse = nil;
- NSMutableDictionary* uploadResult;
- CDVPluginResult* result = nil;
-
- NSLog(@"File Transfer Finished with response code %d", self.responseCode);
-
- if (self.direction == CDV_TRANSFER_UPLOAD) {
- uploadResponse = [[NSString alloc] initWithData:self.responseData encoding:NSUTF8StringEncoding];
- if (uploadResponse == nil) {
- uploadResponse = [[NSString alloc] initWithData: self.responseData encoding:NSISOLatin1StringEncoding];
- }
-
- if ((self.responseCode >= 200) && (self.responseCode < 300)) {
- // create dictionary to return FileUploadResult object
- uploadResult = [NSMutableDictionary dictionaryWithCapacity:3];
- if (uploadResponse != nil) {
- [uploadResult setObject:uploadResponse forKey:@"response"];
- [uploadResult setObject:self.responseHeaders forKey:@"headers"];
- }
- [uploadResult setObject:[NSNumber numberWithLongLong:self.bytesTransfered] forKey:@"bytesSent"];
- [uploadResult setObject:[NSNumber numberWithInt:self.responseCode] forKey:@"responseCode"];
- result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:uploadResult];
- } else {
- result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:[command createFileTransferError:CONNECTION_ERR AndSource:source AndTarget:target AndHttpStatus:self.responseCode AndBody:uploadResponse]];
- }
- }
- if (self.direction == CDV_TRANSFER_DOWNLOAD) {
- if (self.targetFileHandle) {
- [self.targetFileHandle closeFile];
- self.targetFileHandle = nil;
- DLog(@"File Transfer Download success");
-
- result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:[self.filePlugin makeEntryForURL:self.targetURL]];
- } else {
- downloadResponse = [[NSString alloc] initWithData:self.responseData encoding:NSUTF8StringEncoding];
- if (downloadResponse == nil) {
- downloadResponse = [[NSString alloc] initWithData: self.responseData encoding:NSISOLatin1StringEncoding];
- }
-
- CDVFileTransferError errorCode = self.responseCode == 404 ? FILE_NOT_FOUND_ERR
- : (self.responseCode == 304 ? NOT_MODIFIED : CONNECTION_ERR);
- result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:[command createFileTransferError:errorCode AndSource:source AndTarget:target AndHttpStatus:self.responseCode AndBody:downloadResponse]];
- }
- }
-
- [self.command.commandDelegate sendPluginResult:result callbackId:callbackId];
-
- // remove connection for activeTransfers
- @synchronized (command.activeTransfers) {
- [command.activeTransfers removeObjectForKey:objectId];
- // remove background id task in case our upload was done in the background
- [[UIApplication sharedApplication] endBackgroundTask:self.backgroundTaskID];
- self.backgroundTaskID = UIBackgroundTaskInvalid;
- }
-}
-
-- (void)removeTargetFile
-{
- NSFileManager* fileMgr = [NSFileManager defaultManager];
-
- NSString *targetPath = [self targetFilePath];
- if ([fileMgr fileExistsAtPath:targetPath])
- {
- [fileMgr removeItemAtPath:targetPath error:nil];
- }
-}
-
-- (void)cancelTransfer:(NSURLConnection*)connection
-{
- [connection cancel];
- @synchronized (self.command.activeTransfers) {
- CDVFileTransferDelegate* delegate = self.command.activeTransfers[self.objectId];
- [self.command.activeTransfers removeObjectForKey:self.objectId];
- [[UIApplication sharedApplication] endBackgroundTask:delegate.backgroundTaskID];
- delegate.backgroundTaskID = UIBackgroundTaskInvalid;
- }
-
- if (self.direction == CDV_TRANSFER_DOWNLOAD) {
- [self removeTargetFile];
- }
-}
-
-- (void)cancelTransferWithError:(NSURLConnection*)connection errorMessage:(NSString*)errorMessage
-{
- CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsDictionary:[self.command createFileTransferError:FILE_NOT_FOUND_ERR AndSource:self.source AndTarget:self.target AndHttpStatus:self.responseCode AndBody:errorMessage]];
-
- NSLog(@"File Transfer Error: %@", errorMessage);
- [self cancelTransfer:connection];
- [self.command.commandDelegate sendPluginResult:result callbackId:callbackId];
-}
-
-- (NSString *)targetFilePath
-{
- NSString *path = nil;
- CDVFilesystemURL *sourceURL = [CDVFilesystemURL fileSystemURLWithString:self.target];
- if (sourceURL && sourceURL.fileSystemName != nil) {
- // This requires talking to the current CDVFile plugin
- NSObject *fs = [self.filePlugin filesystemForURL:sourceURL];
- path = [fs filesystemPathForURL:sourceURL];
- } else {
- // Extract the path part out of a file: URL.
- path = [self.target hasPrefix:@"/"] ? [self.target copy] : [(NSURL *)[NSURL URLWithString:self.target] path];
- }
- return path;
-}
-
-- (void)connection:(NSURLConnection*)connection didReceiveResponse:(NSURLResponse*)response
-{
- NSError* __autoreleasing error = nil;
-
- self.mimeType = [response MIMEType];
- self.targetFileHandle = nil;
-
- // required for iOS 4.3, for some reason; response is
- // a plain NSURLResponse, not the HTTP subclass
- if ([response isKindOfClass:[NSHTTPURLResponse class]]) {
- NSHTTPURLResponse* httpResponse = (NSHTTPURLResponse*)response;
-
- self.responseCode = (int)[httpResponse statusCode];
- self.bytesExpected = [response expectedContentLength];
- self.responseHeaders = [httpResponse allHeaderFields];
- if ((self.direction == CDV_TRANSFER_DOWNLOAD) && (self.responseCode == 200) && (self.bytesExpected == NSURLResponseUnknownLength)) {
- // Kick off HEAD request to server to get real length
- // bytesExpected will be updated when that response is returned
- self.entityLengthRequest = [[CDVFileTransferEntityLengthRequest alloc] initWithOriginalRequest:connection.currentRequest andDelegate:self];
- }
- } else if ([response.URL isFileURL]) {
- NSDictionary* attr = [[NSFileManager defaultManager] attributesOfItemAtPath:[response.URL path] error:nil];
- self.responseCode = 200;
- self.bytesExpected = [attr[NSFileSize] longLongValue];
- } else {
- self.responseCode = 200;
- self.bytesExpected = NSURLResponseUnknownLength;
- }
- if ((self.direction == CDV_TRANSFER_DOWNLOAD) && (self.responseCode >= 200) && (self.responseCode < 300)) {
- // Download response is okay; begin streaming output to file
- NSString *filePath = [self targetFilePath];
- if (filePath == nil) {
- // We couldn't find the asset. Send the appropriate error.
- [self cancelTransferWithError:connection errorMessage:[NSString stringWithFormat:@"Could not create target file"]];
- return;
- }
-
- NSString* parentPath = [filePath stringByDeletingLastPathComponent];
-
- // create parent directories if needed
- if ([[NSFileManager defaultManager] createDirectoryAtPath:parentPath withIntermediateDirectories:YES attributes:nil error:&error] == NO) {
- if (error) {
- [self cancelTransferWithError:connection errorMessage:[NSString stringWithFormat:@"Could not create path to save downloaded file: %@", [error localizedDescription]]];
- } else {
- [self cancelTransferWithError:connection errorMessage:@"Could not create path to save downloaded file"];
- }
- return;
- }
- // create target file
- if ([[NSFileManager defaultManager] createFileAtPath:filePath contents:nil attributes:nil] == NO) {
- [self cancelTransferWithError:connection errorMessage:@"Could not create target file"];
- return;
- }
- // open target file for writing
- self.targetFileHandle = [NSFileHandle fileHandleForWritingAtPath:filePath];
- if (self.targetFileHandle == nil) {
- [self cancelTransferWithError:connection errorMessage:@"Could not open target file for writing"];
- }
- DLog(@"Streaming to file %@", filePath);
- }
-}
-
-- (void)connection:(NSURLConnection*)connection didFailWithError:(NSError*)error
-{
- NSString* body = [[NSString alloc] initWithData:self.responseData encoding:NSUTF8StringEncoding];
- CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:[command createFileTransferError:CONNECTION_ERR AndSource:source AndTarget:target AndHttpStatus:self.responseCode AndBody:body]];
-
- NSLog(@"File Transfer Error: %@", [error localizedDescription]);
-
- [self cancelTransfer:connection];
- [self.command.commandDelegate sendPluginResult:result callbackId:callbackId];
-}
-
-- (void)connection:(NSURLConnection*)connection didReceiveData:(NSData*)data
-{
- self.bytesTransfered += data.length;
- if (self.targetFileHandle) {
- [self.targetFileHandle writeData:data];
- } else {
- [self.responseData appendData:data];
- }
- [self updateProgress];
-}
-
-- (void)updateBytesExpected:(long long)newBytesExpected
-{
- DLog(@"Updating bytesExpected to %lld", newBytesExpected);
- self.bytesExpected = newBytesExpected;
- [self updateProgress];
-}
-
-- (void)updateProgress
-{
- if (self.direction == CDV_TRANSFER_DOWNLOAD) {
- BOOL lengthComputable = (self.bytesExpected != NSURLResponseUnknownLength);
- // If the response is GZipped, and we have an outstanding HEAD request to get
- // the length, then hold off on sending progress events.
- if (!lengthComputable && (self.entityLengthRequest != nil)) {
- return;
- }
- NSMutableDictionary* downloadProgress = [NSMutableDictionary dictionaryWithCapacity:3];
- [downloadProgress setObject:[NSNumber numberWithBool:lengthComputable] forKey:@"lengthComputable"];
- [downloadProgress setObject:[NSNumber numberWithLongLong:self.bytesTransfered] forKey:@"loaded"];
- [downloadProgress setObject:[NSNumber numberWithLongLong:self.bytesExpected] forKey:@"total"];
- CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:downloadProgress];
- [result setKeepCallbackAsBool:true];
- [self.command.commandDelegate sendPluginResult:result callbackId:callbackId];
- }
-}
-
-- (void)connection:(NSURLConnection*)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite
-{
- if (self.direction == CDV_TRANSFER_UPLOAD) {
- NSMutableDictionary* uploadProgress = [NSMutableDictionary dictionaryWithCapacity:3];
-
- [uploadProgress setObject:[NSNumber numberWithBool:true] forKey:@"lengthComputable"];
- [uploadProgress setObject:[NSNumber numberWithLongLong:totalBytesWritten] forKey:@"loaded"];
- [uploadProgress setObject:[NSNumber numberWithLongLong:totalBytesExpectedToWrite] forKey:@"total"];
- CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:uploadProgress];
- [result setKeepCallbackAsBool:true];
- [self.command.commandDelegate sendPluginResult:result callbackId:callbackId];
- }
- self.bytesTransfered = totalBytesWritten;
-}
-
-// for self signed certificates
-- (void)connection:(NSURLConnection*)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge*)challenge
-{
- if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
- if (self.trustAllHosts) {
- NSURLCredential* credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
- [challenge.sender useCredential:credential forAuthenticationChallenge:challenge];
- }
- [challenge.sender continueWithoutCredentialForAuthenticationChallenge:challenge];
- } else {
- [challenge.sender performDefaultHandlingForAuthenticationChallenge:challenge];
- }
-}
-
-- (id)init
-{
- if ((self = [super init])) {
- self.responseData = [NSMutableData data];
- self.targetFileHandle = nil;
- }
- return self;
-}
-
-@end
diff --git a/plugins/cordova-plugin-file-transfer/src/ubuntu/file-transfer.cpp b/plugins/cordova-plugin-file-transfer/src/ubuntu/file-transfer.cpp
deleted file mode 100644
index 5b1adea..0000000
--- a/plugins/cordova-plugin-file-transfer/src/ubuntu/file-transfer.cpp
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- *
- * Copyright 2013 Canonical Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#include "file-transfer.h"
-#include
-#include
-
-static void SetHeaders(QNetworkRequest &request, const QVariantMap &headers) {
- for (const QString &key: headers.keys()) {
- QVariant val = *headers.find(key);
- QString value = val.toString();
- if (val.userType() == QMetaType::QVariantList || val.userType() == QMetaType::QStringList) {
- QList list = val.toList();
- for (QVariant v: list) {
- if (value.size())
- value += ", ";
- value += v.toString();
- }
- }
- request.setRawHeader(key.toUtf8(), value.toUtf8());
- }
-}
-
-void FileTransfer::download(int scId, int ecId, const QString& url, const QString &target, bool /*trustAllHost*/, int id, const QVariantMap &headers) {
- QSharedPointer request(new FileTransferRequest(_manager, scId, ecId, id, this));
-
- assert(_id2request.find(id) == _id2request.end());
-
- _id2request.insert(id, request);
-
- request->connect(request.data(), &FileTransferRequest::done, [&]() {
- auto it = _id2request.find(id);
- while (it != _id2request.end() && it.key() == id) {
- if (it.value().data() == request.data()) {
- _id2request.erase(it);
- break;
- }
- it++;
- }
- });
- request->download(url, target, headers);
-}
-
-void FileTransfer::upload(int scId, int ecId, const QString &fileURI, const QString& url, const QString& fileKey, const QString& fileName, const QString& mimeType,
- const QVariantMap & params, bool /*trustAllHosts*/, bool /*chunkedMode*/, const QVariantMap &headers, int id, const QString &/*httpMethod*/) {
- QSharedPointer request(new FileTransferRequest(_manager, scId, ecId, id, this));
-
- assert(_id2request.find(id) == _id2request.end());
-
- _id2request.insert(id, request);
-
- request->connect(request.data(), &FileTransferRequest::done, [&]() {
- auto it = _id2request.find(id);
- while (it != _id2request.end() && it.key() == id) {
- if (it.value().data() == request.data()) {
- _id2request.erase(it);
- break;
- }
- it++;
- }
- });
- request->upload(url, fileURI, fileKey, fileName, mimeType, params, headers);
-}
-
-void FileTransfer::abort(int scId, int ecId, int id) {
- Q_UNUSED(scId)
- Q_UNUSED(ecId)
-
- auto it = _id2request.find(id);
- while (it != _id2request.end() && it.key() == id) {
- (*it)->abort();
- it++;
- }
-}
-
-void FileTransferRequest::download(const QString& uri, const QString &targetURI, const QVariantMap &headers) {
- QUrl url(uri);
- QNetworkRequest request;
-
- QSharedPointer filePlugin(_plugin->cordova()->getPlugin());
-
- if (!filePlugin.data())
- return;
-
- if (!url.isValid()) {
- QVariantMap map;
- map.insert("code", INVALID_URL_ERR);
- map.insert("source", uri);
- map.insert("target", targetURI);
- _plugin->cb(_ecId, map);
- emit done();
- return;
- }
-
- request.setUrl(url);
- if (url.password().size() || url.userName().size()) {
- QString headerData = "Basic " + (url.userName() + ":" + url.password()).toLocal8Bit().toBase64();
- request.setRawHeader("Authorization", headerData.toLocal8Bit());
- }
- SetHeaders(request, headers);
- _reply = QSharedPointer(_manager.get(request));
-
- _reply->connect(_reply.data(), &QNetworkReply::finished, [this, targetURI, uri, filePlugin]() {
- if (!_scId || _reply->error() != QNetworkReply::NoError)
- return;
-
- QPair f1(dynamic_cast(filePlugin.data())->resolveURI(targetURI));
-
- QFile res(f1.second.absoluteFilePath());
- if (!f1.first || !res.open(QIODevice::WriteOnly)) {
- QVariantMap map;
- map.insert("code", INVALID_URL_ERR);
- map.insert("source", uri);
- map.insert("target", targetURI);
- _plugin->cb(_ecId, map);
- emit done();
- return;
- }
- res.write(_reply->readAll());
-
- _plugin->cb(_scId, dynamic_cast(filePlugin.data())->file2map(f1.second));
-
- emit done();
- });
- _reply->connect(_reply.data(), SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(error(QNetworkReply::NetworkError)));
- _reply->connect(_reply.data(), SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(progress(qint64, qint64)));
-}
-
-void FileTransferRequest::upload(const QString& _url, const QString& fileURI, QString fileKey, QString fileName, QString mimeType, const QVariantMap ¶ms, const QVariantMap &headers) {
- QUrl url(_url);
- QNetworkRequest request;
-
- QSharedPointer filePlugin(_plugin->cordova()->getPlugin());
-
- if (!filePlugin.data())
- return;
-
- if (!url.isValid()) {
- QVariantMap map;
- map.insert("code", INVALID_URL_ERR);
- map.insert("source", fileURI);
- map.insert("target", _url);
- _plugin->cb(_ecId, map);
- emit done();
- return;
- }
-
- QPair f1(dynamic_cast(filePlugin.data())->resolveURI(fileURI));
- QFile file(f1.second.absoluteFilePath());
- if (!f1.first || !file.open(QIODevice::ReadOnly)) {
- QVariantMap map;
- map.insert("code", FILE_NOT_FOUND_ERR);
- map.insert("source", fileURI);
- map.insert("target", _url);
- _plugin->cb(_ecId, map);
- emit done();
- return;
- }
- QString content{file.readAll()};
-
- request.setUrl(url);
- if (url.password().size() || url.userName().size()) {
- QString headerData = "Basic " + (url.userName() + ":" + url.password()).toLocal8Bit().toBase64();
- request.setRawHeader("Authorization", headerData.toLocal8Bit());
- }
- SetHeaders(request, headers);
-
- QString boundary = QString("CORDOVA-QT-%1A").arg(qrand());
- while (content.contains(boundary)) {
- boundary += QString("B%1A").arg(qrand());
- }
-
- request.setHeader(QNetworkRequest::ContentTypeHeader, QString("multipart/form-data; boundary=") + boundary);
-
- fileKey.replace("\"", "");
- fileName.replace("\"", "");
- mimeType.replace("\"", "");
- QString part = "--" + boundary + "\r\n";
-
- part += "Content-Disposition: form-data; name=\"" + fileKey +"\"; filename=\"" + fileName + "\"\r\n";
- part += "Content-Type: " + mimeType + "\r\n\r\n";
- part += content + "\r\n";
-
- for (QString key: params.keys()) {
- part += "--" + boundary + "\r\n";
- part += "Content-Disposition: form-data; name=\"" + key + "\";\r\n\r\n";
- part += params.find(key)->toString();
- part += "\r\n";
- }
-
- part += QString("--") + boundary + "--" + "\r\n";
-
- _reply = QSharedPointer(_manager.post(request, QByteArray(part.toUtf8())));
-
- _reply->connect(_reply.data(), &QNetworkReply::finished, [this, content]() {
- if (_reply->error() != QNetworkReply::NoError)
- return;
- int status = 200;
- QVariant statusCode = _reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
-
- if (statusCode.isValid()) {
- status = statusCode.toInt();
- }
-
- QVariantMap map;
- map.insert("responseCode", status);
- map.insert("response", QString(_reply->readAll()));
- map.insert("bytesSent", content.size());
- _plugin->cb(_scId, map);
- emit done();
- });
- _reply->connect(_reply.data(), SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(error(QNetworkReply::NetworkError)));
- _reply->connect(_reply.data(), SIGNAL(uploadProgress(qint64, qint64)), this, SLOT(progress(qint64, qint64)));
-}
-
-void FileTransferRequest::abort() {
- QVariantMap map;
- map.insert("code", ABORT_ERR);
- _plugin->cb(_ecId, map);
- _scId = 0;
- emit done();
-}
-
-void FileTransferRequest::error(QNetworkReply::NetworkError code) {
- Q_UNUSED(code);
-
- int status = 404;
- QVariant statusCode = _reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
- if (statusCode.isValid()) {
- status = statusCode.toInt();
- }
-
- QVariantMap map;
- map.insert("http_status", status);
- map.insert("body", QString(_reply->readAll()));
- map.insert("code", CONNECTION_ERR);
- _plugin->cb(_ecId, map);
- emit done();
-}
-
-void FileTransferRequest::progress(qint64 bytesReceived, qint64 bytesTotal) {
- QVariantMap map;
- map.insert("lengthComputable", true);
- map.insert("total", bytesTotal);
- map.insert("loaded", bytesReceived);
-
- if (bytesReceived && bytesTotal && _scId)
- _plugin->callbackWithoutRemove(_scId, CordovaInternal::format(map));
-}
diff --git a/plugins/cordova-plugin-file-transfer/src/ubuntu/file-transfer.h b/plugins/cordova-plugin-file-transfer/src/ubuntu/file-transfer.h
deleted file mode 100644
index 75822cb..0000000
--- a/plugins/cordova-plugin-file-transfer/src/ubuntu/file-transfer.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- *
- * Copyright 2013 Canonical Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#ifndef FILE_TRANSFER_H_SDASDASDAS
-#define FILE_TRANSFER_H_SDASDASDAS
-
-#include
-#include
-
-#include
-
-class FileTransfer;
-
-class FileTransferRequest: public QObject {
- Q_OBJECT
-
- QNetworkAccessManager &_manager;
- int _scId, _ecId;
- int _id;
- QSharedPointer _reply;
-
- enum FileTransferError {
- FILE_NOT_FOUND_ERR = 1,
- INVALID_URL_ERR = 2,
- CONNECTION_ERR = 3,
- ABORT_ERR = 4
- };
-
-public:
- FileTransferRequest(QNetworkAccessManager &manager, int scId, int ecId, int id, FileTransfer *plugin):
- _manager(manager),
- _scId(scId),
- _ecId(ecId),
- _id(id),
- _plugin(plugin) {
- }
-
- void download(const QString& url, const QString &targetURI, const QVariantMap &headers);
- void upload(const QString& _url, const QString& fileURI, QString fileKey, QString fileName, QString mimeType, const QVariantMap ¶ms, const QVariantMap &headers);
- void abort();
-
-signals:
- void done();
-
-private slots:
- void progress(qint64 bytesReceived, qint64 bytesTotal);
- void error(QNetworkReply::NetworkError code);
-private:
- FileTransfer *_plugin;
- Q_DISABLE_COPY(FileTransferRequest);
-};
-
-class FileTransfer : public CPlugin {
- Q_OBJECT
-public:
- explicit FileTransfer(Cordova *cordova): CPlugin(cordova) {
- }
-
- Cordova* cordova() {
- return m_cordova;
- }
-
- virtual const QString fullName() override {
- return FileTransfer::fullID();
- }
-
- virtual const QString shortName() override {
- return "FileTransfer";
- }
-
- static const QString fullID() {
- return "FileTransfer";
- }
-
-public slots:
- void abort(int scId, int ecId, int id);
- void download(int scId, int ecId, const QString& url, const QString &target, bool /*trustAllHost*/, int id, const QVariantMap &/*headers*/);
- void upload(int scId, int ecId, const QString &filePath, const QString& url, const QString& fileKey, const QString& fileName, const QString& mimeType,
- const QVariantMap & params, bool /*trustAllHosts*/, bool /*chunkedMode*/, const QVariantMap &headers, int id, const QString &httpMethod);
-
-private:
- QNetworkAccessManager _manager;
- QMultiMap > _id2request;
- int lastRequestId;
-};
-
-#endif
diff --git a/plugins/cordova-plugin-file-transfer/src/windows/FileTransferProxy.js b/plugins/cordova-plugin-file-transfer/src/windows/FileTransferProxy.js
deleted file mode 100644
index 5d1363f..0000000
--- a/plugins/cordova-plugin-file-transfer/src/windows/FileTransferProxy.js
+++ /dev/null
@@ -1,579 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-/*jshint -W030 */
-/*global Windows, WinJS*/
-/*global module, require*/
-
-var FTErr = require('./FileTransferError'),
- ProgressEvent = require('cordova-plugin-file.ProgressEvent'),
- FileUploadResult = require('cordova-plugin-file.FileUploadResult'),
- FileProxy = require('cordova-plugin-file.FileProxy');
-
-var appData = Windows.Storage.ApplicationData.current;
-
-var LINE_START = "--";
-var LINE_END = "\r\n";
-var BOUNDARY = '+++++';
-
-var fileTransferOps = [];
-
-// Some private helper functions, hidden by the module
-function cordovaPathToNative(path) {
-
- var cleanPath = String(path);
- // turn / into \\
- cleanPath = cleanPath.replace(/\//g, '\\');
- // turn \\ into \
- cleanPath = cleanPath.replace(/\\\\/g, '\\');
- // strip end \\ characters
- cleanPath = cleanPath.replace(/\\+$/g, '');
- return cleanPath;
-}
-
-function nativePathToCordova(path) {
- return String(path).replace(/\\/g, '/');
-}
-
-function alreadyCancelled(opId) {
- var op = fileTransferOps[opId];
- return op && op.state === FileTransferOperation.CANCELLED;
-}
-
-function doUpload (upload, uploadId, filePath, server, successCallback, errorCallback) {
- if (alreadyCancelled(uploadId)) {
- errorCallback(new FTErr(FTErr.ABORT_ERR, nativePathToCordova(filePath), server));
- return;
- }
-
- // update internal TransferOperation object with newly created promise
- var uploadOperation = upload.startAsync();
- fileTransferOps[uploadId].promise = uploadOperation;
-
- uploadOperation.then(
- function (result) {
- // Update TransferOperation object with new state, delete promise property
- // since it is not actual anymore
- var currentUploadOp = fileTransferOps[uploadId];
- if (currentUploadOp) {
- currentUploadOp.state = FileTransferOperation.DONE;
- currentUploadOp.promise = null;
- }
-
- var response = result.getResponseInformation();
- var ftResult = new FileUploadResult(result.progress.bytesSent, response.statusCode, '');
-
- // if server's response doesn't contain any data, then resolve operation now
- if (result.progress.bytesReceived === 0) {
- successCallback(ftResult);
- return;
- }
-
- // otherwise create a data reader, attached to response stream to get server's response
- var reader = new Windows.Storage.Streams.DataReader(result.getResultStreamAt(0));
- reader.loadAsync(result.progress.bytesReceived).then(function (size) {
- ftResult.response = reader.readString(size);
- successCallback(ftResult);
- reader.close();
- });
- },
- function (error) {
- var source = nativePathToCordova(filePath);
-
- // Handle download error here.
- // Wrap this routines into promise due to some async methods
- var getTransferError = new WinJS.Promise(function (resolve) {
- if (error.message === 'Canceled') {
- // If download was cancelled, message property will be specified
- resolve(new FTErr(FTErr.ABORT_ERR, source, server, null, null, error));
- } else {
- // in the other way, try to get response property
- var response = upload.getResponseInformation();
- if (!response) {
- resolve(new FTErr(FTErr.CONNECTION_ERR, source, server));
- } else {
- var reader = new Windows.Storage.Streams.DataReader(upload.getResultStreamAt(0));
- reader.loadAsync(upload.progress.bytesReceived).then(function (size) {
- var responseText = reader.readString(size);
- resolve(new FTErr(FTErr.FILE_NOT_FOUND_ERR, source, server, response.statusCode, responseText, error));
- reader.close();
- });
- }
- }
- });
-
- // Update TransferOperation object with new state, delete promise property
- // since it is not actual anymore
- var currentUploadOp = fileTransferOps[uploadId];
- if (currentUploadOp) {
- currentUploadOp.state = FileTransferOperation.CANCELLED;
- currentUploadOp.promise = null;
- }
-
- // Report the upload error back
- getTransferError.then(function (transferError) {
- errorCallback(transferError);
- });
- },
- function (evt) {
- var progressEvent = new ProgressEvent('progress', {
- loaded: evt.progress.bytesSent,
- total: evt.progress.totalBytesToSend,
- target: evt.resultFile
- });
- progressEvent.lengthComputable = true;
- successCallback(progressEvent, { keepCallback: true });
- }
- );
-}
-
-function FileTransferOperation(state, promise) {
- this.state = state;
- this.promise = promise;
-}
-
-FileTransferOperation.PENDING = 0;
-FileTransferOperation.DONE = 1;
-FileTransferOperation.CANCELLED = 2;
-
-var HTTP_E_STATUS_NOT_MODIFIED = -2145844944;
-
-module.exports = {
-
-/*
-exec(win, fail, 'FileTransfer', 'upload',
-[filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers, this._id, httpMethod]);
-*/
- upload: function (successCallback, errorCallback, options) {
- var filePath = options[0];
- var server = options[1];
- var fileKey = options[2] || 'source';
- var fileName = options[3];
- var mimeType = options[4];
- var params = options[5];
- // var trustAllHosts = options[6]; // todo
- // var chunkedMode = options[7]; // todo
- var headers = options[8] || {};
- var uploadId = options[9];
- var httpMethod = options[10];
-
- var isMultipart = typeof headers["Content-Type"] === 'undefined';
-
- function stringToByteArray(str) {
- var byteCharacters = atob(str);
- var byteNumbers = new Array(byteCharacters.length);
- for (var i = 0; i < byteCharacters.length; i++) {
- byteNumbers[i] = byteCharacters.charCodeAt(i);
- }
- return new Uint8Array(byteNumbers);
- }
-
- if (!filePath || (typeof filePath !== 'string')) {
- errorCallback(new FTErr(FTErr.FILE_NOT_FOUND_ERR, null, server));
- return;
- }
-
- if (filePath.indexOf("data:") === 0 && filePath.indexOf("base64") !== -1) {
- // First a DataWriter object is created, backed by an in-memory stream where
- // the data will be stored.
- var writer = Windows.Storage.Streams.DataWriter(new Windows.Storage.Streams.InMemoryRandomAccessStream());
- writer.unicodeEncoding = Windows.Storage.Streams.UnicodeEncoding.utf8;
- writer.byteOrder = Windows.Storage.Streams.ByteOrder.littleEndian;
-
- var commaIndex = filePath.indexOf(",");
- if (commaIndex === -1) {
- errorCallback(new FTErr(FTErr.INVALID_URL_ERR, fileName, server, null, null, "No comma in data: URI"));
- return;
- }
-
- // Create internal download operation object
- fileTransferOps[uploadId] = new FileTransferOperation(FileTransferOperation.PENDING, null);
-
- var fileDataString = filePath.substr(commaIndex + 1);
-
- // setting request headers for uploader
- var uploader = new Windows.Networking.BackgroundTransfer.BackgroundUploader();
- uploader.method = httpMethod;
- for (var header in headers) {
- if (headers.hasOwnProperty(header)) {
- uploader.setRequestHeader(header, headers[header]);
- }
- }
-
- if (isMultipart) {
- // adding params supplied to request payload
- var multipartParams = '';
- for (var key in params) {
- if (params.hasOwnProperty(key)) {
- multipartParams += LINE_START + BOUNDARY + LINE_END;
- multipartParams += "Content-Disposition: form-data; name=\"" + key + "\"";
- multipartParams += LINE_END + LINE_END;
- multipartParams += params[key];
- multipartParams += LINE_END;
- }
- }
-
- var multipartFile = LINE_START + BOUNDARY + LINE_END;
- multipartFile += "Content-Disposition: form-data; name=\"file\";";
- multipartFile += " filename=\"" + fileName + "\"" + LINE_END;
- multipartFile += "Content-Type: " + mimeType + LINE_END + LINE_END;
-
- var bound = LINE_END + LINE_START + BOUNDARY + LINE_START + LINE_END;
-
- uploader.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + BOUNDARY);
- writer.writeString(multipartParams);
- writer.writeString(multipartFile);
- writer.writeBytes(stringToByteArray(fileDataString));
- writer.writeString(bound);
- } else {
- writer.writeBytes(stringToByteArray(fileDataString));
- }
-
- var stream;
-
- // The call to store async sends the actual contents of the writer
- // to the backing stream.
- writer.storeAsync().then(function () {
- // For the in-memory stream implementation we are using, the flushAsync call
- // is superfluous, but other types of streams may require it.
- return writer.flushAsync();
- }).then(function () {
- // We detach the stream to prolong its useful lifetime. Were we to fail
- // to detach the stream, the call to writer.close() would close the underlying
- // stream, preventing its subsequent use by the DataReader below. Most clients
- // of DataWriter will have no reason to use the underlying stream after
- // writer.close() is called, and will therefore have no reason to call
- // writer.detachStream(). Note that once we detach the stream, we assume
- // responsibility for closing the stream subsequently; after the stream
- // has been detached, a call to writer.close() will have no effect on the stream.
- stream = writer.detachStream();
- // Make sure the stream is read from the beginning in the reader
- // we are creating below.
- stream.seek(0);
- // Most DataWriter clients will not call writer.detachStream(),
- // and furthermore will be working with a file-backed or network-backed stream,
- // rather than an in-memory-stream. In such cases, it would be particularly
- // important to call writer.close(). Doing so is always a best practice.
- writer.close();
-
- if (alreadyCancelled(uploadId)) {
- errorCallback(new FTErr(FTErr.ABORT_ERR, nativePathToCordova(filePath), server));
- return;
- }
-
- // create download object. This will throw an exception if URL is malformed
- var uri = new Windows.Foundation.Uri(server);
-
- var createUploadOperation;
- try {
- createUploadOperation = uploader.createUploadFromStreamAsync(uri, stream);
- } catch (e) {
- errorCallback(new FTErr(FTErr.INVALID_URL_ERR));
- return;
- }
-
- createUploadOperation.then(
- function (upload) {
- doUpload(upload, uploadId, filePath, server, successCallback, errorCallback);
- },
- function (err) {
- var errorObj = new FTErr(FTErr.INVALID_URL_ERR);
- errorObj.exception = err;
- errorCallback(errorObj);
- });
- });
-
- return;
- }
-
- if (filePath.substr(0, 8) === "file:///") {
- filePath = appData.localFolder.path + filePath.substr(8).split("/").join("\\");
- } else if (filePath.indexOf('ms-appdata:///') === 0) {
- // Handle 'ms-appdata' scheme
- filePath = filePath.replace('ms-appdata:///local', appData.localFolder.path)
- .replace('ms-appdata:///temp', appData.temporaryFolder.path);
- } else if (filePath.indexOf('cdvfile://') === 0) {
- filePath = filePath.replace('cdvfile://localhost/persistent', appData.localFolder.path)
- .replace('cdvfile://localhost/temporary', appData.temporaryFolder.path);
- }
-
- // normalize path separators
- filePath = cordovaPathToNative(filePath);
-
- // Create internal download operation object
- fileTransferOps[uploadId] = new FileTransferOperation(FileTransferOperation.PENDING, null);
-
- Windows.Storage.StorageFile.getFileFromPathAsync(filePath)
- .then(function (storageFile) {
-
- if (!fileName) {
- fileName = storageFile.name;
- }
- if (!mimeType) {
- // use the actual content type of the file, probably this should be the default way.
- // other platforms probably can't look this up.
- mimeType = storageFile.contentType;
- }
-
- if (alreadyCancelled(uploadId)) {
- errorCallback(new FTErr(FTErr.ABORT_ERR, nativePathToCordova(filePath), server));
- return;
- }
-
- // setting request headers for uploader
- var uploader = new Windows.Networking.BackgroundTransfer.BackgroundUploader();
- uploader.method = httpMethod;
- for (var header in headers) {
- if (headers.hasOwnProperty(header)) {
- uploader.setRequestHeader(header, headers[header]);
- }
- }
-
- // create download object. This will throw an exception if URL is malformed
- var uri = new Windows.Foundation.Uri(server);
-
- var createUploadOperation;
- try {
- if (isMultipart) {
- // adding params supplied to request payload
- var transferParts = [];
- for (var key in params) {
- // Create content part for params only if value is specified because CreateUploadAsync fails otherwise
- if (params.hasOwnProperty(key) && params[key] !== null && params[key] !== undefined && params[key].toString() !== "") {
- var contentPart = new Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart();
- contentPart.setHeader("Content-Disposition", "form-data; name=\"" + key + "\"");
- contentPart.setText(params[key]);
- transferParts.push(contentPart);
- }
- }
-
- // Adding file to upload to request payload
- var fileToUploadPart = new Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart(fileKey, fileName);
- fileToUploadPart.setHeader("Content-Type", mimeType);
- fileToUploadPart.setFile(storageFile);
- transferParts.push(fileToUploadPart);
-
- createUploadOperation = uploader.createUploadAsync(uri, transferParts);
- } else {
- createUploadOperation = WinJS.Promise.wrap(uploader.createUpload(uri, storageFile));
- }
- } catch (e) {
- errorCallback(new FTErr(FTErr.INVALID_URL_ERR));
- return;
- }
-
- createUploadOperation.then(
- function (upload) {
- doUpload(upload, uploadId, filePath, server, successCallback, errorCallback);
- },
- function (err) {
- var errorObj = new FTErr(FTErr.INVALID_URL_ERR);
- errorObj.exception = err;
- errorCallback(errorObj);
- }
- );
- }, function (err) {
- errorCallback(new FTErr(FTErr.FILE_NOT_FOUND_ERR, fileName, server, null, null, err));
- });
- },
-
- // [source, target, trustAllHosts, id, headers]
- download:function(successCallback, errorCallback, options) {
- var source = options[0];
- var target = options[1];
- var downloadId = options[3];
- var headers = options[4] || {};
-
- if (!target) {
- errorCallback(new FTErr(FTErr.FILE_NOT_FOUND_ERR));
- return;
- }
- if (target.substr(0, 8) === "file:///") {
- target = appData.localFolder.path + target.substr(8).split("/").join("\\");
- } else if (target.indexOf('ms-appdata:///') === 0) {
- // Handle 'ms-appdata' scheme
- target = target.replace('ms-appdata:///local', appData.localFolder.path)
- .replace('ms-appdata:///temp', appData.temporaryFolder.path);
- } else if (target.indexOf('cdvfile://') === 0) {
- target = target.replace('cdvfile://localhost/persistent', appData.localFolder.path)
- .replace('cdvfile://localhost/temporary', appData.temporaryFolder.path);
- }
- target = cordovaPathToNative(target);
-
- var path = target.substr(0, target.lastIndexOf("\\"));
- var fileName = target.substr(target.lastIndexOf("\\") + 1);
- if (path === null || fileName === null) {
- errorCallback(new FTErr(FTErr.FILE_NOT_FOUND_ERR));
- return;
- }
- // Download to a temp file to avoid the file deletion on 304
- // CB-7006 Empty file is created on file transfer if server response is 304
- var tempFileName = '~' + fileName;
-
- var download = null;
-
- // Create internal download operation object
- fileTransferOps[downloadId] = new FileTransferOperation(FileTransferOperation.PENDING, null);
-
- var downloadCallback = function(storageFolder) {
- storageFolder.createFileAsync(tempFileName, Windows.Storage.CreationCollisionOption.replaceExisting).then(function (storageFile) {
-
- if (alreadyCancelled(downloadId)) {
- errorCallback(new FTErr(FTErr.ABORT_ERR, source, target));
- return;
- }
-
- // if download isn't cancelled, contunue with creating and preparing download operation
- var downloader = new Windows.Networking.BackgroundTransfer.BackgroundDownloader();
- for (var header in headers) {
- if (headers.hasOwnProperty(header)) {
- downloader.setRequestHeader(header, headers[header]);
- }
- }
-
- // create download object. This will throw an exception if URL is malformed
- try {
- var uri = Windows.Foundation.Uri(source);
- download = downloader.createDownload(uri, storageFile);
- } catch (e) {
- // so we handle this and call errorCallback
- errorCallback(new FTErr(FTErr.INVALID_URL_ERR));
- return;
- }
-
- var downloadOperation = download.startAsync();
- // update internal TransferOperation object with newly created promise
- fileTransferOps[downloadId].promise = downloadOperation;
-
- downloadOperation.then(function () {
-
- // Update TransferOperation object with new state, delete promise property
- // since it is not actual anymore
- var currentDownloadOp = fileTransferOps[downloadId];
- if (currentDownloadOp) {
- currentDownloadOp.state = FileTransferOperation.DONE;
- currentDownloadOp.promise = null;
- }
-
- storageFile.renameAsync(fileName, Windows.Storage.CreationCollisionOption.replaceExisting).done(function () {
- var nativeURI = storageFile.path.replace(appData.localFolder.path, 'ms-appdata:///local')
- .replace(appData.temporaryFolder.path, 'ms-appdata:///temp')
- .replace(/\\/g, '/');
-
- // Passing null as error callback here because downloaded file should exist in any case
- // otherwise the error callback will be hit during file creation in another place
- FileProxy.resolveLocalFileSystemURI(successCallback, null, [nativeURI]);
- }, function(error) {
- errorCallback(new FTErr(FTErr.FILE_NOT_FOUND_ERR, source, target, null, null, error));
- });
- }, function(error) {
-
- var getTransferError = new WinJS.Promise(function (resolve) {
- // Handle download error here. If download was cancelled,
- // message property will be specified
- if (error.message === 'Canceled') {
- resolve(new FTErr(FTErr.ABORT_ERR, source, target, null, null, error));
- } else if (error && error.number === HTTP_E_STATUS_NOT_MODIFIED) {
- resolve(new FTErr(FTErr.NOT_MODIFIED_ERR, source, target, 304, null, error));
- } else {
- // in the other way, try to get response property
- var response = download.getResponseInformation();
- if (!response) {
- resolve(new FTErr(FTErr.CONNECTION_ERR, source, target));
- } else {
- var reader = new Windows.Storage.Streams.DataReader(download.getResultStreamAt(0));
- reader.loadAsync(download.progress.bytesReceived).then(function (bytesLoaded) {
- var payload = reader.readString(bytesLoaded);
- resolve(new FTErr(FTErr.FILE_NOT_FOUND_ERR, source, target, response.statusCode, payload, error));
- });
- }
- }
- });
- getTransferError.then(function (fileTransferError) {
-
- // Update TransferOperation object with new state, delete promise property
- // since it is not actual anymore
- var currentDownloadOp = fileTransferOps[downloadId];
- if (currentDownloadOp) {
- currentDownloadOp.state = FileTransferOperation.CANCELLED;
- currentDownloadOp.promise = null;
- }
-
- // Cleanup, remove incompleted file
- storageFile.deleteAsync().then(function() {
- errorCallback(fileTransferError);
- });
- });
-
- }, function(evt) {
-
- var progressEvent = new ProgressEvent('progress', {
- loaded: evt.progress.bytesReceived,
- total: evt.progress.totalBytesToReceive,
- target: evt.resultFile
- });
- // when bytesReceived == 0, BackgroundDownloader has not yet differentiated whether it could get file length or not,
- // when totalBytesToReceive == 0, BackgroundDownloader is unable to get file length
- progressEvent.lengthComputable = (evt.progress.bytesReceived > 0) && (evt.progress.totalBytesToReceive > 0);
-
- successCallback(progressEvent, { keepCallback: true });
- });
- }, function(error) {
- errorCallback(new FTErr(FTErr.FILE_NOT_FOUND_ERR, source, target, null, null, error));
- });
- };
-
- var fileNotFoundErrorCallback = function(error) {
- errorCallback(new FTErr(FTErr.FILE_NOT_FOUND_ERR, source, target, null, null, error));
- };
-
- Windows.Storage.StorageFolder.getFolderFromPathAsync(path).then(downloadCallback, function (error) {
- // Handle non-existent directory
- if (error.number === -2147024894) {
- var parent = path.substr(0, path.lastIndexOf('\\')),
- folderNameToCreate = path.substr(path.lastIndexOf('\\') + 1);
-
- Windows.Storage.StorageFolder.getFolderFromPathAsync(parent).then(function(parentFolder) {
- parentFolder.createFolderAsync(folderNameToCreate).then(downloadCallback, fileNotFoundErrorCallback);
- }, fileNotFoundErrorCallback);
- } else {
- fileNotFoundErrorCallback();
- }
- });
- },
-
- abort: function (successCallback, error, options) {
- var fileTransferOpId = options[0];
-
- // Try to find transferOperation with id specified, and cancel its' promise
- var currentOp = fileTransferOps[fileTransferOpId];
- if (currentOp) {
- currentOp.state = FileTransferOperation.CANCELLED;
- currentOp.promise && currentOp.promise.cancel();
- } else if (typeof fileTransferOpId !== 'undefined') {
- // Create the operation in cancelled state to be aborted right away
- fileTransferOps[fileTransferOpId] = new FileTransferOperation(FileTransferOperation.CANCELLED, null);
- }
- }
-
-};
-
-require("cordova/exec/proxy").add("FileTransfer",module.exports);
diff --git a/plugins/cordova-plugin-file-transfer/src/wp/FileTransfer.cs b/plugins/cordova-plugin-file-transfer/src/wp/FileTransfer.cs
deleted file mode 100644
index 4be46e8..0000000
--- a/plugins/cordova-plugin-file-transfer/src/wp/FileTransfer.cs
+++ /dev/null
@@ -1,994 +0,0 @@
-/*
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-using Microsoft.Phone.Controls;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.IO.IsolatedStorage;
-using System.Linq;
-using System.Net;
-using System.Runtime.Serialization;
-using System.Windows;
-using System.Security;
-using System.Diagnostics;
-using System.Threading.Tasks;
-using WPCordovaClassLib.Cordova.JSON;
-using System.Reflection;
-
-namespace WPCordovaClassLib.Cordova.Commands
-{
- public class FileTransfer : BaseCommand
- {
- public class DownloadRequestState
- {
- // This class stores the State of the request.
- public HttpWebRequest request;
- public TransferOptions options;
- public bool isCancelled;
-
- public DownloadRequestState()
- {
- request = null;
- options = null;
- isCancelled = false;
- }
- }
-
- public class TransferOptions
- {
- /// File path to upload OR File path to download to
- public string FilePath { get; set; }
-
- public string Url { get; set; }
- /// Flag to recognize if we should trust every host (only in debug environments)
- public bool TrustAllHosts { get; set; }
- public string Id { get; set; }
- public string Headers { get; set; }
- public string CallbackId { get; set; }
- public bool ChunkedMode { get; set; }
- /// Server address
- public string Server { get; set; }
- /// File key
- public string FileKey { get; set; }
- /// File name on the server
- public string FileName { get; set; }
- /// File Mime type
- public string MimeType { get; set; }
- /// Additional options
- public string Params { get; set; }
- public string Method { get; set; }
-
- public TransferOptions()
- {
- FileKey = "file";
- FileName = "image.jpg";
- MimeType = "image/jpeg";
- }
- }
-
- ///
- /// Boundary symbol
- ///
- private string Boundary = "----------------------------" + DateTime.Now.Ticks.ToString("x");
-
- // Error codes
- public const int FileNotFoundError = 1;
- public const int InvalidUrlError = 2;
- public const int ConnectionError = 3;
- public const int AbortError = 4; // not really an error, but whatevs
-
- private static Dictionary InProcDownloads = new Dictionary();
-
- // Private instance of the main WebBrowser instance
- // NOTE: Any access to this object needs to occur on the UI thread via the Dispatcher
- private WebBrowser browser;
-
-
-
- ///
- /// Uploading response info
- ///
- [DataContract]
- public class FileUploadResult
- {
- ///
- /// Amount of sent bytes
- ///
- [DataMember(Name = "bytesSent")]
- public long BytesSent { get; set; }
-
- ///
- /// Server response code
- ///
- [DataMember(Name = "responseCode")]
- public long ResponseCode { get; set; }
-
- ///
- /// Server response
- ///
- [DataMember(Name = "response", EmitDefaultValue = false)]
- public string Response { get; set; }
-
- ///
- /// Creates FileUploadResult object with response values
- ///
- /// Amount of sent bytes
- /// Server response code
- /// Server response
- public FileUploadResult(long bytesSent, long responseCode, string response)
- {
- this.BytesSent = bytesSent;
- this.ResponseCode = responseCode;
- this.Response = response;
- }
- }
- ///
- /// Represents transfer error codes for callback
- ///
- [DataContract]
- public class FileTransferError
- {
- ///
- /// Error code
- ///
- [DataMember(Name = "code", IsRequired = true)]
- public int Code { get; set; }
-
- ///
- /// The source URI
- ///
- [DataMember(Name = "source", IsRequired = true)]
- public string Source { get; set; }
-
- ///
- /// The target URI
- ///
- ///
- [DataMember(Name = "target", IsRequired = true)]
- public string Target { get; set; }
-
- [DataMember(Name = "body", IsRequired = true)]
- public string Body { get; set; }
-
- ///
- /// The http status code response from the remote URI
- ///
- [DataMember(Name = "http_status", IsRequired = true)]
- public int HttpStatus { get; set; }
-
- ///
- /// Creates FileTransferError object
- ///
- /// Error code
- public FileTransferError(int errorCode)
- {
- this.Code = errorCode;
- this.Source = null;
- this.Target = null;
- this.HttpStatus = 0;
- this.Body = "";
- }
- public FileTransferError(int errorCode, string source, string target, int status, string body = "")
- {
- this.Code = errorCode;
- this.Source = source;
- this.Target = target;
- this.HttpStatus = status;
- this.Body = body;
- }
- }
-
- ///
- /// Represents a singular progress event to be passed back to javascript
- ///
- [DataContract]
- public class FileTransferProgress
- {
- ///
- /// Is the length of the response known?
- ///
- [DataMember(Name = "lengthComputable", IsRequired = true)]
- public bool LengthComputable { get; set; }
- ///
- /// amount of bytes loaded
- ///
- [DataMember(Name = "loaded", IsRequired = true)]
- public long BytesLoaded { get; set; }
- ///
- /// Total bytes
- ///
- [DataMember(Name = "total", IsRequired = false)]
- public long BytesTotal { get; set; }
-
- public FileTransferProgress(long bTotal = 0, long bLoaded = 0)
- {
- LengthComputable = bTotal > 0;
- BytesLoaded = bLoaded;
- BytesTotal = bTotal;
- }
- }
-
- ///
- /// Represents a request header passed from Javascript to upload/download operations
- ///
- [DataContract]
- protected struct Header
- {
- [DataMember(Name = "name")]
- public string Name;
-
- [DataMember(Name = "value")]
- public string Value;
- }
-
- private static MethodInfo JsonDeserializeUsingJsonNet;
-
- public FileTransfer()
- {
- if (JsonDeserializeUsingJsonNet == null)
- {
- var method = typeof(JsonHelper).GetMethod("Deserialize", new Type[] { typeof(string), typeof(bool) });
- if (method != null)
- {
- JsonDeserializeUsingJsonNet = method.MakeGenericMethod(new Type[] { typeof(Header[]) });
- }
- }
- }
-
- /// Helper method to copy all relevant cookies from the WebBrowser control into a header on
- /// the HttpWebRequest
- ///
- /// The source browser to copy the cookies from
- /// The destination HttpWebRequest to add the cookie header to
- /// Nothing
- private async Task CopyCookiesFromWebBrowser(HttpWebRequest webRequest)
- {
- var tcs = new TaskCompletionSource