You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/12/19 04:01:17 UTC
[7/7] docs commit: CB-5658 Delete plugin API reference in favour of
links to github doc/index.md files
CB-5658 Delete plugin API reference in favour of links to github doc/index.md files
Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/97ae96ee
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/97ae96ee
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/97ae96ee
Branch: refs/heads/master
Commit: 97ae96eef90929a4fb0db975b6d3cfe21a303cc3
Parents: 5499544
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Dec 18 21:50:38 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Dec 18 22:00:43 2013 -0500
----------------------------------------------------------------------
docs/en/edge/config.json | 172 -------
.../accelerometer/acceleration/acceleration.md | 104 ----
.../accelerometer/accelerometer.clearWatch.md | 111 -----
.../accelerometer.getCurrentAcceleration.md | 109 ----
.../edge/cordova/accelerometer/accelerometer.md | 86 ----
.../accelerometer.watchAcceleration.md | 142 ------
.../parameters/accelerometerError.md | 26 -
.../parameters/accelerometerOptions.md | 26 -
.../parameters/accelerometerSuccess.md | 39 --
docs/en/edge/cordova/camera/camera.cleanup.md | 48 --
.../en/edge/cordova/camera/camera.getPicture.md | 255 ----------
docs/en/edge/cordova/camera/camera.md | 103 ----
.../camera/parameter/CameraPopoverHandle.md | 63 ---
.../camera/parameter/CameraPopoverOptions.md | 77 ---
.../cordova/camera/parameter/cameraError.md | 30 --
.../cordova/camera/parameter/cameraOptions.md | 136 -----
.../cordova/camera/parameter/cameraSuccess.md | 39 --
.../edge/cordova/compass/compass.clearWatch.md | 108 ----
.../cordova/compass/compass.clearWatchFilter.md | 22 -
.../compass/compass.getCurrentHeading.md | 96 ----
docs/en/edge/cordova/compass/compass.md | 100 ----
.../cordova/compass/compass.watchHeading.md | 148 ------
.../compass/compass.watchHeadingFilter.md | 22 -
.../compass/compassError/compassError.md | 36 --
.../cordova/compass/parameters/compassError.md | 28 --
.../compass/parameters/compassHeading.md | 54 --
.../compass/parameters/compassOptions.md | 44 --
.../compass/parameters/compassSuccess.md | 36 --
docs/en/edge/cordova/connection/connection.md | 99 ----
.../edge/cordova/connection/connection.type.md | 125 -----
.../en/edge/cordova/contacts/Contact/contact.md | 257 ----------
.../contacts/ContactAddress/contactaddress.md | 169 -------
.../contacts/ContactError/contactError.md | 42 --
.../contacts/ContactField/contactfield.md | 156 ------
.../ContactFindOptions/contactfindoptions.md | 109 ----
.../cordova/contacts/ContactName/contactname.md | 144 ------
.../ContactOrganization/contactorganization.md | 151 ------
.../en/edge/cordova/contacts/contacts.create.md | 72 ---
docs/en/edge/cordova/contacts/contacts.find.md | 124 -----
docs/en/edge/cordova/contacts/contacts.md | 139 ------
.../cordova/contacts/parameters/contactError.md | 26 -
.../contacts/parameters/contactFields.md | 24 -
.../contacts/parameters/contactFindOptions.md | 34 --
.../contacts/parameters/contactSuccess.md | 38 --
docs/en/edge/cordova/device/device.cordova.md | 75 ---
docs/en/edge/cordova/device/device.md | 94 ----
docs/en/edge/cordova/device/device.model.md | 92 ----
docs/en/edge/cordova/device/device.name.md | 95 ----
docs/en/edge/cordova/device/device.platform.md | 83 ----
docs/en/edge/cordova/device/device.uuid.md | 103 ----
docs/en/edge/cordova/device/device.version.md | 79 ---
.../cordova/events/events.batterycritical.md | 91 ----
.../en/edge/cordova/events/events.batterylow.md | 90 ----
.../edge/cordova/events/events.batterystatus.md | 97 ----
docs/en/edge/cordova/events/events.md | 64 +--
docs/en/edge/cordova/events/events.offline.md | 99 ----
docs/en/edge/cordova/events/events.online.md | 100 ----
.../file/directoryentry/directoryentry.md | 411 ---------------
.../file/directoryreader/directoryreader.md | 67 ---
docs/en/edge/cordova/file/file.md | 121 -----
.../en/edge/cordova/file/fileentry/fileentry.md | 337 -------------
.../en/edge/cordova/file/fileerror/fileerror.md | 47 --
docs/en/edge/cordova/file/fileobj/fileobj.md | 83 ----
.../edge/cordova/file/filereader/filereader.md | 255 ----------
.../edge/cordova/file/filesystem/filesystem.md | 91 ----
.../cordova/file/filetransfer/filetransfer.md | 302 -----------
.../file/filetransfererror/filetransfererror.md | 44 --
.../file/fileuploadoptions/fileuploadoptions.md | 48 --
.../file/fileuploadresult/fileuploadresult.md | 40 --
.../edge/cordova/file/filewriter/filewriter.md | 235 ---------
docs/en/edge/cordova/file/flags/flags.md | 47 --
.../file/localfilesystem/localfilesystem.md | 126 -----
docs/en/edge/cordova/file/metadata/metadata.md | 50 --
.../geolocation/Coordinates/coordinates.md | 130 -----
.../cordova/geolocation/Position/position.md | 114 -----
.../geolocation/PositionError/positionError.md | 54 --
.../geolocation/geolocation.clearWatch.md | 114 -----
.../geolocation.getCurrentPosition.md | 126 -----
docs/en/edge/cordova/geolocation/geolocation.md | 133 -----
.../geolocation/geolocation.watchPosition.md | 128 -----
.../parameters/geolocation.options.md | 38 --
.../geolocation/parameters/geolocationError.md | 31 --
.../parameters/geolocationSuccess.md | 46 --
.../GlobalizationError/globalizationerror.md | 88 ----
.../globalization/globalization.dateToString.md | 91 ----
.../globalization.getCurrencyPattern.md | 112 -----
.../globalization/globalization.getDateNames.md | 97 ----
.../globalization.getDatePattern.md | 105 ----
.../globalization.getFirstDayOfWeek.md | 77 ---
.../globalization.getLocaleName.md | 77 ---
.../globalization.getNumberPattern.md | 128 -----
.../globalization.getPreferredLanguage.md | 77 ---
.../globalization.isDayLightSavingsTime.md | 82 ---
.../edge/cordova/globalization/globalization.md | 79 ---
.../globalization.numberToString.md | 85 ----
.../globalization/globalization.stringToDate.md | 114 -----
.../globalization.stringToNumber.md | 88 ----
.../edge/cordova/inappbrowser/inappbrowser.md | 497 -------------------
.../en/edge/cordova/inappbrowser/window.open.md | 105 ----
.../edge/cordova/media/MediaError/mediaError.md | 42 --
.../edge/cordova/media/Parameters/mediaError.md | 31 --
docs/en/edge/cordova/media/capture/CaptureCB.md | 44 --
.../edge/cordova/media/capture/CaptureError.md | 38 --
.../cordova/media/capture/CaptureErrorCB.md | 41 --
.../cordova/media/capture/ConfigurationData.md | 61 ---
.../media/capture/MediaFile.getFormatData.md | 64 ---
docs/en/edge/cordova/media/capture/MediaFile.md | 38 --
.../edge/cordova/media/capture/MediaFileData.md | 92 ----
docs/en/edge/cordova/media/capture/capture.md | 164 ------
.../edge/cordova/media/capture/captureAudio.md | 145 ------
.../media/capture/captureAudioOptions.md | 51 --
.../edge/cordova/media/capture/captureImage.md | 138 -----
.../media/capture/captureImageOptions.md | 37 --
.../edge/cordova/media/capture/captureVideo.md | 138 -----
.../media/capture/captureVideoOptions.md | 44 --
.../cordova/media/media.getCurrentPosition.md | 176 -------
docs/en/edge/cordova/media/media.getDuration.md | 162 ------
docs/en/edge/cordova/media/media.md | 161 ------
docs/en/edge/cordova/media/media.pause.md | 162 ------
docs/en/edge/cordova/media/media.play.md | 185 -------
docs/en/edge/cordova/media/media.release.md | 154 ------
docs/en/edge/cordova/media/media.seekTo.md | 154 ------
docs/en/edge/cordova/media/media.setVolume.md | 171 -------
docs/en/edge/cordova/media/media.startRecord.md | 143 ------
docs/en/edge/cordova/media/media.stop.md | 167 -------
docs/en/edge/cordova/media/media.stopRecord.md | 135 -----
.../cordova/notification/notification.alert.md | 115 -----
.../cordova/notification/notification.beep.md | 111 -----
.../notification/notification.confirm.md | 126 -----
.../edge/cordova/notification/notification.md | 87 ----
.../cordova/notification/notification.prompt.md | 124 -----
.../notification/notification.vibrate.md | 98 ----
docs/en/edge/cordova/plugins/pluginapis.md | 80 +++
.../cordova/splashscreen/splashscreen.hide.md | 83 ----
.../edge/cordova/splashscreen/splashscreen.md | 68 ---
.../cordova/splashscreen/splashscreen.show.md | 79 ---
docs/en/edge/cordova/storage/storage.md | 8 +-
docs/en/edge/index.md | 64 +--
138 files changed, 97 insertions(+), 14135 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/config.json
----------------------------------------------------------------------
diff --git a/docs/en/edge/config.json b/docs/en/edge/config.json
index 12d3951..99f6553 100644
--- a/docs/en/edge/config.json
+++ b/docs/en/edge/config.json
@@ -1,190 +1,18 @@
{
"language": "English",
"merge": {
- "accelerometer.md": [
- "cordova/accelerometer/accelerometer.md",
- "cordova/accelerometer/accelerometer.getCurrentAcceleration.md",
- "cordova/accelerometer/accelerometer.watchAcceleration.md",
- "cordova/accelerometer/accelerometer.clearWatch.md",
- "cordova/accelerometer/acceleration/acceleration.md",
- "cordova/accelerometer/parameters/accelerometerSuccess.md",
- "cordova/accelerometer/parameters/accelerometerError.md",
- "cordova/accelerometer/parameters/accelerometerOptions.md"
- ],
- "camera.md": [
- "cordova/camera/camera.md",
- "cordova/camera/camera.getPicture.md",
- "cordova/camera/parameter/cameraSuccess.md",
- "cordova/camera/parameter/cameraError.md",
- "cordova/camera/parameter/cameraOptions.md",
- "cordova/camera/parameter/CameraPopoverOptions.md",
- "cordova/camera/parameter/CameraPopoverHandle.md"
- ],
- "capture.md": [
- "cordova/media/capture/capture.md",
- "cordova/media/capture/captureAudio.md",
- "cordova/media/capture/captureAudioOptions.md",
- "cordova/media/capture/captureImage.md",
- "cordova/media/capture/captureImageOptions.md",
- "cordova/media/capture/captureVideo.md",
- "cordova/media/capture/captureVideoOptions.md",
- "cordova/media/capture/CaptureError.md",
- "cordova/media/capture/CaptureCB.md",
- "cordova/media/capture/CaptureErrorCB.md",
- "cordova/media/capture/ConfigurationData.md",
- "cordova/media/capture/MediaFile.md",
- "cordova/media/capture/MediaFile.getFormatData.md",
- "cordova/media/capture/MediaFileData.md"
- ],
- "compass.md": [
- "cordova/compass/compass.md",
- "cordova/compass/compass.getCurrentHeading.md",
- "cordova/compass/compass.watchHeading.md",
- "cordova/compass/compass.clearWatch.md",
- "cordova/compass/compass.watchHeadingFilter.md",
- "cordova/compass/compass.clearWatchFilter.md",
- "cordova/compass/parameters/compassSuccess.md",
- "cordova/compass/parameters/compassError.md",
- "cordova/compass/parameters/compassOptions.md",
- "cordova/compass/parameters/compassHeading.md",
- "cordova/compass/compassError/compassError.md"
- ],
- "contacts.md": [
- "cordova/contacts/contacts.md",
- "cordova/contacts/contacts.create.md",
- "cordova/contacts/contacts.find.md",
- "cordova/contacts/Contact/contact.md",
- "cordova/contacts/ContactAddress/contactaddress.md",
- "cordova/contacts/ContactField/contactfield.md",
- "cordova/contacts/ContactFindOptions/contactfindoptions.md",
- "cordova/contacts/ContactName/contactname.md",
- "cordova/contacts/ContactOrganization/contactorganization.md",
- "cordova/contacts/ContactError/contactError.md",
- "cordova/contacts/parameters/contactSuccess.md",
- "cordova/contacts/parameters/contactError.md",
- "cordova/contacts/parameters/contactFields.md",
- "cordova/contacts/parameters/contactFindOptions.md"
- ],
- "device.md": [
- "cordova/device/device.md",
- "cordova/device/device.model.md",
- "cordova/device/device.cordova.md",
- "cordova/device/device.platform.md",
- "cordova/device/device.uuid.md",
- "cordova/device/device.version.md",
- "cordova/device/device.name.md"
- ],
"events.md": [
"cordova/events/events.md",
"cordova/events/events.deviceready.md",
"cordova/events/events.pause.md",
"cordova/events/events.resume.md",
- "cordova/events/events.online.md",
- "cordova/events/events.offline.md",
"cordova/events/events.backbutton.md",
- "cordova/events/events.batterycritical.md",
- "cordova/events/events.batterylow.md",
- "cordova/events/events.batterystatus.md",
"cordova/events/events.menubutton.md",
"cordova/events/events.searchbutton.md",
"cordova/events/events.startcallbutton.md",
"cordova/events/events.endcallbutton.md",
"cordova/events/events.volumedownbutton.md",
"cordova/events/events.volumeupbutton.md"
- ],
- "file.md": [
- "cordova/file/file.md",
- "cordova/file/fileobj/fileobj.md",
- "cordova/file/filereader/filereader.md",
- "cordova/file/filewriter/filewriter.md",
- "cordova/file/filesystem/filesystem.md",
- "cordova/file/fileentry/fileentry.md",
- "cordova/file/directoryentry/directoryentry.md",
- "cordova/file/directoryreader/directoryreader.md",
- "cordova/file/filetransfer/filetransfer.md",
- "cordova/file/fileuploadoptions/fileuploadoptions.md",
- "cordova/file/fileuploadresult/fileuploadresult.md",
- "cordova/file/flags/flags.md",
- "cordova/file/localfilesystem/localfilesystem.md",
- "cordova/file/metadata/metadata.md",
- "cordova/file/fileerror/fileerror.md",
- "cordova/file/filetransfererror/filetransfererror.md"
- ],
- "geolocation.md": [
- "cordova/geolocation/geolocation.md",
- "cordova/geolocation/geolocation.getCurrentPosition.md",
- "cordova/geolocation/geolocation.watchPosition.md",
- "cordova/geolocation/geolocation.clearWatch.md",
- "cordova/geolocation/Coordinates/coordinates.md",
- "cordova/geolocation/Position/position.md",
- "cordova/geolocation/PositionError/positionError.md",
- "cordova/geolocation/parameters/geolocationSuccess.md",
- "cordova/geolocation/parameters/geolocationError.md",
- "cordova/geolocation/parameters/geolocation.options.md"
- ],
- "globalization.md": [
- "cordova/globalization/globalization.md",
- "cordova/globalization/globalization.getPreferredLanguage.md",
- "cordova/globalization/globalization.getLocaleName.md",
- "cordova/globalization/globalization.dateToString.md",
- "cordova/globalization/globalization.stringToDate.md",
- "cordova/globalization/globalization.getDatePattern.md",
- "cordova/globalization/globalization.getDateNames.md",
- "cordova/globalization/globalization.isDayLightSavingsTime.md",
- "cordova/globalization/globalization.getFirstDayOfWeek.md",
- "cordova/globalization/globalization.numberToString.md",
- "cordova/globalization/globalization.stringToNumber.md",
- "cordova/globalization/globalization.getNumberPattern.md",
- "cordova/globalization/globalization.getCurrencyPattern.md",
- "cordova/globalization/GlobalizationError/globalizationerror.md"
- ],
- "media.md": [
- "cordova/media/media.md",
- "cordova/media/media.getCurrentPosition.md",
- "cordova/media/media.getDuration.md",
- "cordova/media/media.pause.md",
- "cordova/media/media.play.md",
- "cordova/media/media.release.md",
- "cordova/media/media.seekTo.md",
- "cordova/media/media.setVolume.md",
- "cordova/media/media.startRecord.md",
- "cordova/media/media.stop.md",
- "cordova/media/media.stopRecord.md",
- "cordova/media/MediaError/mediaError.md",
- "cordova/media/Parameters/mediaError.md"
- ],
- "network.md": [
- "cordova/network/network.md",
- "cordova/network/network.isReachable.md",
- "cordova/network/NetworkStatus/NetworkStatus.md",
- "cordova/network/parameters/reachableCallback.md",
- "cordova/network/parameters/reachableHostname.md",
- "cordova/network/parameters/reachableOptions.md"
- ],
- "connection.md": [
- "cordova/connection/connection.md",
- "cordova/connection/connection.type.md"
- ],
- "notification.md": [
- "cordova/notification/notification.md",
- "cordova/notification/notification.alert.md",
- "cordova/notification/notification.confirm.md",
- "cordova/notification/notification.prompt.md",
- "cordova/notification/notification.beep.md",
- "cordova/notification/notification.vibrate.md"
- ],
- "splashscreen.md": [
- "cordova/splashscreen/splashscreen.md",
- "cordova/splashscreen/splashscreen.show.md",
- "cordova/splashscreen/splashscreen.hide.md"
- ],
- "storage.md": [
- "cordova/storage/storage.md"
- ],
- "inappbrowser.md": [
- "cordova/inappbrowser/inappbrowser.md",
- "cordova/inappbrowser/window.open.md"
]
-
}
}
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/accelerometer/acceleration/acceleration.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/accelerometer/acceleration/acceleration.md b/docs/en/edge/cordova/accelerometer/acceleration/acceleration.md
deleted file mode 100644
index ac4042a..0000000
--- a/docs/en/edge/cordova/accelerometer/acceleration/acceleration.md
+++ /dev/null
@@ -1,104 +0,0 @@
----
- license: 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.
----
-
-# Acceleration
-
-Contains `Accelerometer` data captured at a specific point in time.
-
-## Properties
-
-- __x__: Amount of acceleration on the x-axis. (in m/s^2) _(Number)_
-- __y__: Amount of acceleration on the y-axis. (in m/s^2) _(Number)_
-- __z__: Amount of acceleration on the z-axis. (in m/s^2) _(Number)_
-- __timestamp__: Creation timestamp in milliseconds. _(DOMTimeStamp)_
-
-## Description
-
-An `Acceleration` object is populated and returned by any of the API's
-`Accelerometer` methods. Acceleration values include the effect of
-gravity (9.81 m/s^2), so that when a device lies flat and facing up,
-_x_, _y_, and _z_ values returned should be `0`, `0`, and `9.81`.
-
-## Supported Platforms
-
-- Amazon Fire OS
-- Android
-- BlackBerry 10
-- iOS
-- Tizen
-- Windows Phone 7 and 8
-- Windows 8
-
-## Quick Example
-
- function onSuccess(acceleration) {
- alert('Acceleration X: ' + acceleration.x + '\n' +
- 'Acceleration Y: ' + acceleration.y + '\n' +
- 'Acceleration Z: ' + acceleration.z + '\n' +
- 'Timestamp: ' + acceleration.timestamp + '\n');
- };
-
- function onError() {
- alert('onError!');
- };
-
- navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
-
-## Full Example
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Acceleration Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready", onDeviceReady, false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
- }
-
- // onSuccess: Get a snapshot of the current acceleration
- //
- function onSuccess(acceleration) {
- alert('Acceleration X: ' + acceleration.x + '\n' +
- 'Acceleration Y: ' + acceleration.y + '\n' +
- 'Acceleration Z: ' + acceleration.z + '\n' +
- 'Timestamp: ' + acceleration.timestamp + '\n');
- }
-
- // onError: Failed to get the acceleration
- //
- function onError() {
- alert('onError!');
- }
-
- </script>
- </head>
- <body>
- <h1>Example</h1>
- <p>getCurrentAcceleration</p>
- </body>
- </html>
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/accelerometer/accelerometer.clearWatch.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/accelerometer/accelerometer.clearWatch.md b/docs/en/edge/cordova/accelerometer/accelerometer.clearWatch.md
deleted file mode 100644
index 1a3c378..0000000
--- a/docs/en/edge/cordova/accelerometer/accelerometer.clearWatch.md
+++ /dev/null
@@ -1,111 +0,0 @@
----
- license: 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.
----
-
-# accelerometer.clearWatch
-
-Stop watching the `Acceleration` referenced by the `watchID` parameter.
-
- navigator.accelerometer.clearWatch(watchID);
-
-- __watchID__: The ID returned by `accelerometer.watchAcceleration`.
-
-## Supported Platforms
-
-- Amazon Fire OS
-- Android
-- BlackBerry 10
-- iOS
-- Tizen
-- Windows Phone 7 and 8
-- Windows 8
-
-## Quick Example
-
- var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
-
- // ... later on ...
-
- navigator.accelerometer.clearWatch(watchID);
-
-## Full Example
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Acceleration Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // The watch id references the current `watchAcceleration`
- var watchID = null;
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready", onDeviceReady, false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- startWatch();
- }
-
- // Start watching the acceleration
- //
- function startWatch() {
-
- // Update acceleration every 3 seconds
- var options = { frequency: 3000 };
-
- watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
- }
-
- // Stop watching the acceleration
- //
- function stopWatch() {
- if (watchID) {
- navigator.accelerometer.clearWatch(watchID);
- watchID = null;
- }
- }
-
- // onSuccess: Get a snapshot of the current acceleration
- //
- function onSuccess(acceleration) {
- var element = document.getElementById('accelerometer');
-
- element.innerHTML = 'Acceleration X: ' + acceleration.x + '<br />' +
- 'Acceleration Y: ' + acceleration.y + '<br />' +
- 'Acceleration Z: ' + acceleration.z + '<br />' +
- 'Timestamp: ' + acceleration.timestamp + '<br />';
- }
-
- // onError: Failed to get the acceleration
- //
- function onError() {
- alert('onError!');
- }
-
- </script>
- </head>
- <body>
- <div id="accelerometer">Waiting for accelerometer...</div>
- <button onclick="stopWatch();">Stop Watching</button>
- </body>
- </html>
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/accelerometer/accelerometer.getCurrentAcceleration.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/accelerometer/accelerometer.getCurrentAcceleration.md b/docs/en/edge/cordova/accelerometer/accelerometer.getCurrentAcceleration.md
deleted file mode 100644
index 19eaf15..0000000
--- a/docs/en/edge/cordova/accelerometer/accelerometer.getCurrentAcceleration.md
+++ /dev/null
@@ -1,109 +0,0 @@
----
- license: 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.
----
-
-# accelerometer.getCurrentAcceleration
-
-Get the current acceleration along the _x_, _y_, and _z_ axes.
-
- navigator.accelerometer.getCurrentAcceleration(accelerometerSuccess, accelerometerError);
-
-## Description
-
-The accelerometer is a motion sensor that detects the change (_delta_)
-in movement relative to the current device orientation, in three
-dimensions along the _x_, _y_, and _z_ axis.
-
-These acceleration values are returned to the `accelerometerSuccess`
-callback function.
-
-## Supported Platforms
-
-- Amazon Fire OS
-- Android
-- BlackBerry 10
-- iOS
-- Tizen
-- Windows Phone 7 and 8
-- Windows 8
-
-## Quick Example
-
- function onSuccess(acceleration) {
- alert('Acceleration X: ' + acceleration.x + '\n' +
- 'Acceleration Y: ' + acceleration.y + '\n' +
- 'Acceleration Z: ' + acceleration.z + '\n' +
- 'Timestamp: ' + acceleration.timestamp + '\n');
- };
-
- function onError() {
- alert('onError!');
- };
-
- navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
-
-## Full Example
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Acceleration Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready", onDeviceReady, false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
- }
-
- // onSuccess: Get a snapshot of the current acceleration
- //
- function onSuccess(acceleration) {
- alert('Acceleration X: ' + acceleration.x + '\n' +
- 'Acceleration Y: ' + acceleration.y + '\n' +
- 'Acceleration Z: ' + acceleration.z + '\n' +
- 'Timestamp: ' + acceleration.timestamp + '\n');
- }
-
- // onError: Failed to get the acceleration
- //
- function onError() {
- alert('onError!');
- }
-
- </script>
- </head>
- <body>
- <h1>Example</h1>
- <p>getCurrentAcceleration</p>
- </body>
- </html>
-
-## iOS Quirks
-
-- iOS doesn't recognize the concept of getting the current acceleration at any given point.
-
-- You must watch the acceleration and capture the data at given time intervals.
-
-- Thus, the `getCurrentAcceleration` function yields the last value reported from a `watchAccelerometer` call.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/accelerometer/accelerometer.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/accelerometer/accelerometer.md b/docs/en/edge/cordova/accelerometer/accelerometer.md
deleted file mode 100644
index 255727e..0000000
--- a/docs/en/edge/cordova/accelerometer/accelerometer.md
+++ /dev/null
@@ -1,86 +0,0 @@
----
- license: 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.
----
-
-# Accelerometer
-
-> Captures device motion in the _x_, _y_, and _z_ direction.
-
-## Methods
-
-- accelerometer.getCurrentAcceleration
-- accelerometer.watchAcceleration
-- accelerometer.clearWatch
-
-## Arguments
-
-- accelerometerSuccess
-- accelerometerError
-- accelerometerOptions
-
-## Objects (Read-Only)
-
-- Acceleration
-
-## Accessing the Feature
-
-As of version 3.0, Cordova implements device-level APIs as _plugins_.
-Use the CLI's `plugin` command, described in The Command-Line
-Interface, to add or remove this feature for a project:
-
- $ cordova plugin add org.apache.cordova.device-motion
- $ cordova plugin ls
- [ 'org.apache.cordova.device-motion' ]
- $ cordova plugin rm org.apache.cordova.device-motion
-
-These commands apply to all targeted platforms, but modify the
-platform-specific configuration settings described below:
-
-* Amazon Fire OS (in `res/xml/config.xml`)
-
- <feature name="Accelerometer">
- <param name="android-package" value="org.apache.cordova.devicemotion.AccelListener" />
- </feature>
-
-* Android (in `res/xml/config.xml`)
-
- <feature name="Accelerometer">
- <param name="android-package" value="org.apache.cordova.devicemotion.AccelListener" />
- </feature>
-
-* BlackBerry 10
-
- (in www/config.xml)
- <feature name="Accelerometer" value="Accelerometer" />
-
-* iOS (in the named application directory's `config.xml`)
-
- <feature name="Accelerometer">
- <param name="ios-package" value="CDVAccelerometer" />
- </feature>
-
-* Windows Phone (in `Properties/WPAppManifest.xml`)
-
- <Capabilities>
- <Capability Name="ID_CAP_SENSORS" />
- </Capabilities>
-
- Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
-
-Some platforms may support this feature without requiring any special
-configuration. See Platform Support for an overview.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/accelerometer/accelerometer.watchAcceleration.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/accelerometer/accelerometer.watchAcceleration.md b/docs/en/edge/cordova/accelerometer/accelerometer.watchAcceleration.md
deleted file mode 100644
index c0707c2..0000000
--- a/docs/en/edge/cordova/accelerometer/accelerometer.watchAcceleration.md
+++ /dev/null
@@ -1,142 +0,0 @@
----
- license: 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.
----
-
-# accelerometer.watchAcceleration
-
-At a regular interval, get the acceleration along the _x_, _y_, and _z_ axis.
-
- var watchID = navigator.accelerometer.watchAcceleration(accelerometerSuccess,
- accelerometerError,
- [accelerometerOptions]);
-
-## Description
-
-The accelerometer is a motion sensor that detects the change (delta)
-in movement relative to the current position. The accelerometer can
-detect 3D movement along the _x_, _y_, and _z_ axis.
-
-The `accelerometer.watchAcceleration` method retrieves the device's
-current `Acceleration` at a regular interval, executing the
-`accelerometerSuccess` callback function each time. Specify the
-interval in milliseconds via the `acceleratorOptions` object's
-`frequency` parameter.
-
-The returned watch ID references the accelerometer's watch interval,
-and can be used with `accelerometer.clearWatch` to stop watching the
-accelerometer.
-
-## Supported Platforms
-
-- Amazon Fire OS
-- Android
-- BlackBerry 10
-- iOS
-- Tizen
-- Windows Phone 7 and 8
-- Windows 8
-
-## Quick Example
-
- function onSuccess(acceleration) {
- alert('Acceleration X: ' + acceleration.x + '\n' +
- 'Acceleration Y: ' + acceleration.y + '\n' +
- 'Acceleration Z: ' + acceleration.z + '\n' +
- 'Timestamp: ' + acceleration.timestamp + '\n');
- };
-
- function onError() {
- alert('onError!');
- };
-
- var options = { frequency: 3000 }; // Update every 3 seconds
-
- var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
-
-## Full Example
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Acceleration Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // The watch id references the current `watchAcceleration`
- var watchID = null;
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready", onDeviceReady, false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- startWatch();
- }
-
- // Start watching the acceleration
- //
- function startWatch() {
-
- // Update acceleration every 3 seconds
- var options = { frequency: 3000 };
-
- watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
- }
-
- // Stop watching the acceleration
- //
- function stopWatch() {
- if (watchID) {
- navigator.accelerometer.clearWatch(watchID);
- watchID = null;
- }
- }
-
- // onSuccess: Get a snapshot of the current acceleration
- //
- function onSuccess(acceleration) {
- var element = document.getElementById('accelerometer');
- element.innerHTML = 'Acceleration X: ' + acceleration.x + '<br />' +
- 'Acceleration Y: ' + acceleration.y + '<br />' +
- 'Acceleration Z: ' + acceleration.z + '<br />' +
- 'Timestamp: ' + acceleration.timestamp + '<br />';
- }
-
- // onError: Failed to get the acceleration
- //
- function onError() {
- alert('onError!');
- }
-
- </script>
- </head>
- <body>
- <div id="accelerometer">Waiting for accelerometer...</div>
- </body>
- </html>
-
-## iOS Quirks
-
-The API calls the success callback function at the interval requested,
-but restricts the range of requests to the device between 40ms and
-1000ms. For example, if you request an interval of 3 seconds,
-(3000ms), the API requests data from the device every 1 second, but
-only executes the success callback every 3 seconds.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/accelerometer/parameters/accelerometerError.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/accelerometer/parameters/accelerometerError.md b/docs/en/edge/cordova/accelerometer/parameters/accelerometerError.md
deleted file mode 100644
index 6dda5c2..0000000
--- a/docs/en/edge/cordova/accelerometer/parameters/accelerometerError.md
+++ /dev/null
@@ -1,26 +0,0 @@
----
- license: 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.
----
-
-# accelerometerError
-
-onError callback function for acceleration functions.
-
- function() {
- // Handle the error
- }
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/accelerometer/parameters/accelerometerOptions.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/accelerometer/parameters/accelerometerOptions.md b/docs/en/edge/cordova/accelerometer/parameters/accelerometerOptions.md
deleted file mode 100644
index b9ebcb5..0000000
--- a/docs/en/edge/cordova/accelerometer/parameters/accelerometerOptions.md
+++ /dev/null
@@ -1,26 +0,0 @@
----
- license: 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.
----
-
-# accelerometerOptions
-
-An optional parameter to customize the retrieval of accelerometer values.
-
-## Options
-
-- __frequency__: How often to retrieve the `Acceleration` in milliseconds. _(Number)_ (Default: 10000)
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/accelerometer/parameters/accelerometerSuccess.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/accelerometer/parameters/accelerometerSuccess.md b/docs/en/edge/cordova/accelerometer/parameters/accelerometerSuccess.md
deleted file mode 100644
index c07a617..0000000
--- a/docs/en/edge/cordova/accelerometer/parameters/accelerometerSuccess.md
+++ /dev/null
@@ -1,39 +0,0 @@
----
- license: 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.
----
-
-# accelerometerSuccess
-
-onSuccess callback function that provides the `Acceleration` information.
-
- function(acceleration) {
- // Do something
- }
-
-## Parameters
-
-- __acceleration__: The acceleration at a single moment in time. (Acceleration)
-
-## Example
-
- function onSuccess(acceleration) {
- alert('Acceleration X: ' + acceleration.x + '\n' +
- 'Acceleration Y: ' + acceleration.y + '\n' +
- 'Acceleration Z: ' + acceleration.z + '\n' +
- 'Timestamp: ' + acceleration.timestamp + '\n');
- };
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/camera/camera.cleanup.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/camera/camera.cleanup.md b/docs/en/edge/cordova/camera/camera.cleanup.md
deleted file mode 100644
index f195e70..0000000
--- a/docs/en/edge/cordova/camera/camera.cleanup.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
- license: 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.
----
-
-# camera.cleanup
-
-Removes intermediate photos taken by the camera from temporary
-storage.
-
- navigator.camera.cleanup( cameraSuccess, cameraError );
-
-## Description
-
-Removes intermediate image files that are kept in temporary storage
-after calling `camera.getPicture`. Applies only when the value of
-`Camera.sourceType` equals `Camera.PictureSourceType.CAMERA` and the
-`Camera.destinationType` equals `Camera.DestinationType.FILE_URI`.
-
-## Supported Platforms
-
-- iOS
-
-## Example
-
- navigator.camera.cleanup(onSuccess, onFail);
-
- function onSuccess() {
- console.log("Camera cleanup success.")
- }
-
- function onFail(message) {
- alert('Failed because: ' + message);
- }
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/camera/camera.getPicture.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/camera/camera.getPicture.md b/docs/en/edge/cordova/camera/camera.getPicture.md
deleted file mode 100644
index 955870d..0000000
--- a/docs/en/edge/cordova/camera/camera.getPicture.md
+++ /dev/null
@@ -1,255 +0,0 @@
----
- license: 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.
----
-
-# camera.getPicture
-
-Takes a photo using the camera, or retrieves a photo from the device's
-image gallery. The image is passed to the success callback as a
-base64-encoded `String`, or as the URI for the image file. The method
-itself returns a `CameraPopoverHandle` object that can be used to
-reposition the file selection popover.
-
- navigator.camera.getPicture( cameraSuccess, cameraError, [ cameraOptions ] );
-
-## Description
-
-The `camera.getPicture` function opens the device's default camera
-application that allows users to snap pictures. This behavior occurs
-by default, when `Camera.sourceType` equals
-`Camera.PictureSourceType.CAMERA`. Once the user snaps the photo, the
-camera application closes and the application is restored.
-
-If `Camera.sourceType` is `Camera.PictureSourceType.PHOTOLIBRARY` or
-`Camera.PictureSourceType.SAVEDPHOTOALBUM`, then a dialog displays
-that allows users to select an existing image. The
-`camera.getPicture` function returns a `CameraPopoverHandle` object,
-which can be used to reposition the image selection dialog, for
-example, when the device orientation changes.
-
-The return value is sent to the `cameraSuccess` callback function, in
-one of the following formats, depending on the specified
-`cameraOptions`:
-
-- A `String` containing the base64-encoded photo image.
-
-- A `String` representing the image file location on local storage (default).
-
-You can do whatever you want with the encoded image or URI, for
-example:
-
-- Render the image in an `<img>` tag, as in the example below
-
-- Save the data locally (`LocalStorage`, [Lawnchair](http://brianleroux.github.com/lawnchair/), etc.)
-
-- Post the data to a remote server
-
-__NOTE__: Photo resolution on newer devices is quite good. Photos
-selected from the device's gallery are not downscaled to a lower
-quality, even if a `quality` parameter is specified. To avoid common
-memory problems, set `Camera.destinationType` to `FILE_URI` rather
-than `DATA_URL`.
-
-## Supported Platforms
-
-- Amazon Fire OS
-- Android
-- BlackBerry 10
-- iOS
-- Tizen
-- Windows Phone 7 and 8
-- Windows 8
-
-## Amazon Fire OS Quirks
-
-Amazon Fire OS uses intents to launch the camera activity on the device to capture
-images, and on phones with low memory, the Cordova activity may be killed. In this
-scenario, the image may not appear when the cordova activity is restored.
-
-## Android Quirks
-
-*Android 4.4 only*: Android 4.4 introduced a new [Storage Access Framework](https://developer.android.com/guide/topics/providers/document-provider.html) that makes it
-easier for users to browse and open documents across all of their preferred document storage providers.
-Cordova has not yet been fully integrated with this new Storage Access Framework. Because of this, the `getPicture()`
-method will not correctly return pictures when the user selects from the "Recent", "Drive", "Images", or "External
-Storage" folders when the `destinationType` is `FILE_URI`. However, the user will be able to correctly select any pictures
-if they go through the "Gallery" app first. Potential workarounds for this issue are documented on [this StackOverflow question](http://stackoverflow.com/questions/19834842/android-gallery-on-kitkat-returns-different-uri-for-intent-action-get-content/20177611). Please see [CB-5398](https://issues.apache.org/jira/browse/CB-5398) to track this issue.
-
-Android uses intents to launch the camera activity on the device to capture
-images, and on phones with low memory, the Cordova activity may be killed. In this
-scenario, the image may not appear when the Cordova activity is restored.
-
-## iOS Quirks
-
-Including a JavaScript `alert()` in either of the callback functions
-can cause problems. Wrap the alert within a `setTimeout()` to allow
-the iOS image picker or popover to fully close before the alert
-displays:
-
- setTimeout(function() {
- // do your thing here!
- }, 0);
-
-## Windows Phone 7 Quirks
-
-Invoking the native camera application while the device is connected
-via Zune does not work, and triggers an error callback.
-
-## Tizen Quirks
-
-Tizen only supports a `destinationType` of
-`Camera.DestinationType.FILE_URI` and a `sourceType` of
-`Camera.PictureSourceType.PHOTOLIBRARY`.
-
-## Quick Example
-
-Take a photo and retrieve it as a base64-encoded image:
-
- navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
- destinationType: Camera.DestinationType.DATA_URL
- });
-
- function onSuccess(imageData) {
- var image = document.getElementById('myImage');
- image.src = "data:image/jpeg;base64," + imageData;
- }
-
- function onFail(message) {
- alert('Failed because: ' + message);
- }
-
-Take a photo and retrieve the image's file location:
-
- navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
- destinationType: Camera.DestinationType.FILE_URI });
-
- function onSuccess(imageURI) {
- var image = document.getElementById('myImage');
- image.src = imageURI;
- }
-
- function onFail(message) {
- alert('Failed because: ' + message);
- }
-
-## Full Example
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Capture Photo</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- var pictureSource; // picture source
- var destinationType; // sets the format of returned value
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready",onDeviceReady,false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- pictureSource=navigator.camera.PictureSourceType;
- destinationType=navigator.camera.DestinationType;
- }
-
- // Called when a photo is successfully retrieved
- //
- function onPhotoDataSuccess(imageData) {
- // Uncomment to view the base64-encoded image data
- // console.log(imageData);
-
- // Get image handle
- //
- var smallImage = document.getElementById('smallImage');
-
- // Unhide image elements
- //
- smallImage.style.display = 'block';
-
- // Show the captured photo
- // The in-line CSS rules are used to resize the image
- //
- smallImage.src = "data:image/jpeg;base64," + imageData;
- }
-
- // Called when a photo is successfully retrieved
- //
- function onPhotoURISuccess(imageURI) {
- // Uncomment to view the image file URI
- // console.log(imageURI);
-
- // Get image handle
- //
- var largeImage = document.getElementById('largeImage');
-
- // Unhide image elements
- //
- largeImage.style.display = 'block';
-
- // Show the captured photo
- // The in-line CSS rules are used to resize the image
- //
- largeImage.src = imageURI;
- }
-
- // A button will call this function
- //
- function capturePhoto() {
- // Take picture using device camera and retrieve image as base64-encoded string
- navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50,
- destinationType: destinationType.DATA_URL });
- }
-
- // A button will call this function
- //
- function capturePhotoEdit() {
- // Take picture using device camera, allow edit, and retrieve image as base64-encoded string
- navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 20, allowEdit: true,
- destinationType: destinationType.DATA_URL });
- }
-
- // A button will call this function
- //
- function getPhoto(source) {
- // Retrieve image file location from specified source
- navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50,
- destinationType: destinationType.FILE_URI,
- sourceType: source });
- }
-
- // Called if something bad happens.
- //
- function onFail(message) {
- alert('Failed because: ' + message);
- }
-
- </script>
- </head>
- <body>
- <button onclick="capturePhoto();">Capture Photo</button> <br>
- <button onclick="capturePhotoEdit();">Capture Editable Photo</button> <br>
- <button onclick="getPhoto(pictureSource.PHOTOLIBRARY);">From Photo Library</button><br>
- <button onclick="getPhoto(pictureSource.SAVEDPHOTOALBUM);">From Photo Album</button><br>
- <img style="display:none;width:60px;height:60px;" id="smallImage" src="" />
- <img style="display:none;" id="largeImage" src="" />
- </body>
- </html>
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/camera/camera.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/camera/camera.md b/docs/en/edge/cordova/camera/camera.md
deleted file mode 100644
index a95632f..0000000
--- a/docs/en/edge/cordova/camera/camera.md
+++ /dev/null
@@ -1,103 +0,0 @@
----
- license: 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.
----
-
-# Camera
-
-> The `camera` object provides access to the device's default camera application.
-
-__WARNING__: Collection and use of images from a
-device's camera raises important privacy issues. Your app's privacy
-policy should discuss how the app uses the camera and whether the
-images recorded are shared with any other parties. In addition, if
-the app's use of the camera is not apparent in the user interface, you
-should provide a just-in-time notice before the app accesses the
-camera (if the device operating system doesn't do so already). That
-notice should provide the same information noted above, as well as
-obtaining the user's permission (e.g., by presenting choices for
-__OK__ and __No Thanks__). For more information, please see the
-Privacy Guide.
-
-## Methods
-
-- camera.getPicture
-- camera.cleanup
-
-## Accessing the Feature
-
-As of version 3.0, Cordova implements device-level APIs as _plugins_.
-Use the CLI's `plugin` command, described in The Command-Line
-Interface, to add or remove this feature for a project:
-
- $ cordova plugin add org.apache.cordova.camera
- $ cordova plugin ls
- [ 'org.apache.cordova.camera' ]
- $ cordova plugin rm org.apache.cordova.camera
-
-These commands apply to all targeted platforms, but modify the
-platform-specific configuration settings described below:
-
-* Amazon Fire OS
-
- (in app/res/xml/config.xml)
- <feature name="Camera">
- <param name="android-package" value="org.apache.cordova.camera.CameraLauncher" />
- </feature>
-
- (in app/AndroidManifest)
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-
-* Android
-
- (in app/res/xml/config.xml)
- <feature name="Camera">
- <param name="android-package" value="org.apache.cordova.camera.CameraLauncher" />
- </feature>
-
- (in app/AndroidManifest)
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-
-* BlackBerry 10
-
- (in www/config.xml)
- <feature name="Camera" value="Camera"/>
-
-* iOS (in the named application directory's `config.xml`)
-
- <feature name="Camera">
- <param name="ios-package" value="CDVCamera" />
- </feature>
-
-* Windows Phone (in `Properties/WPAppManifest.xml`)
-
- <Capabilities>
- <Capability Name="ID_CAP_ISV_CAMERA" />
- <Capability Name="ID_HW_FRONTCAMERA" />
- </Capabilities>
-
- Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
-
-* Tizen (in `config.xml`)
-
- <feature name="http://tizen.org/api/application" required="true"/>
- <feature name="http://tizen.org/api/application.launch" required="true"/>
-
- Reference: [Application Manifest for Tizen Web Application](https://developer.tizen.org/help/topic/org.tizen.help.gs/Creating%20a%20Project.html?path=0_1_1_3#8814682_CreatingaProject-EditingconfigxmlFeatures)
-
-Some platforms may support this feature without requiring any special
-configuration. See Platform Support for an overview.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/camera/parameter/CameraPopoverHandle.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/camera/parameter/CameraPopoverHandle.md b/docs/en/edge/cordova/camera/parameter/CameraPopoverHandle.md
deleted file mode 100644
index 594f30b..0000000
--- a/docs/en/edge/cordova/camera/parameter/CameraPopoverHandle.md
+++ /dev/null
@@ -1,63 +0,0 @@
----
- license: 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.
----
-
-# CameraPopoverHandle
-
-A handle to the popover dialog created by `camera.getPicture`.
-
-## Methods
-
-- __setPosition__: Set the position of the popover.
-
-## Supported Platforms
-
-- iOS
-
-## setPosition
-
-Set the position of the popover.
-
-__Parameters__:
-
-- `cameraPopoverOptions`: the `CameraPopoverOptions` that specify the new position
-
-## Quick Example
-
- var cameraPopoverOptions = new CameraPopoverOptions(300, 300, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY);
- cameraPopoverHandle.setPosition(cameraPopoverOptions);
-
-## Full Example
-
- function onSuccess(imageData) {
- // Do stuff with the image!
- }
-
- function onFail(message) {
- alert('Failed to get the picture: ' + message);
- }
-
- var cameraPopoverHandle = navigator.camera.getPicture(onSuccess, onFail,
- { destinationType: Camera.DestinationType.FILE_URI,
- sourceType: Camera.PictureSourceType.PHOTOLIBRARY });
-
- // Reposition the popover if the orientation changes.
- window.onorientationchange = function() {
- var cameraPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100, 0);
- cameraPopoverHandle.setPosition(cameraPopoverOptions);
- }
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/camera/parameter/CameraPopoverOptions.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/camera/parameter/CameraPopoverOptions.md b/docs/en/edge/cordova/camera/parameter/CameraPopoverOptions.md
deleted file mode 100644
index e5d2902..0000000
--- a/docs/en/edge/cordova/camera/parameter/CameraPopoverOptions.md
+++ /dev/null
@@ -1,77 +0,0 @@
----
- license: 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.
----
-
-# CameraPopoverOptions
-
-iOS-only parameters that specify the anchor element location and arrow
-direction of the popover when selecting images from an iPad's library
-or album.
-
- { x : 0,
- y : 32,
- width : 320,
- height : 480,
- arrowDir : Camera.PopoverArrowDirection.ARROW_ANY
- };
-
-## CameraPopoverOptions
-
-- __x__: x pixel coordinate of screen element onto which to anchor the popover. _(Number)_
-
-- __y__: y pixel coordinate of screen element onto which to anchor the popover. _(Number)_
-
-- __width__: width, in pixels, of the screen element onto which to anchor the popover. _(Number)_
-
-- __height__: height, in pixels, of the screen element onto which to anchor the popover. _(Number)_
-
-- __arrowDir__: Direction the arrow on the popover should point. Defined in `Camera.PopoverArrowDirection` _(Number)_
-
- Camera.PopoverArrowDirection = {
- ARROW_UP : 1, // matches iOS UIPopoverArrowDirection constants
- ARROW_DOWN : 2,
- ARROW_LEFT : 4,
- ARROW_RIGHT : 8,
- ARROW_ANY : 15
- };
-
-Note that the size of the popover may change to adjust to the
-direction of the arrow and orientation of the screen. Make sure to
-account for orientation changes when specifying the anchor element
-location.
-
-## Quick Example
-
- var popover = new CameraPopoverOptions(300, 300, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY);
- var options = {
- quality : 50,
- destinationType : Camera.DestinationType.DATA_URL,
- sourceType : Camera.PictureSource.SAVEDPHOTOALBUM,
- popoverOptions : popover
- };
-
- navigator.camera.getPicture(onSuccess, onFail, options);
-
- function onSuccess(imageData) {
- var image = document.getElementById('myImage');
- image.src = "data:image/jpeg;base64," + imageData;
- }
-
- function onFail(message) {
- alert('Failed because: ' + message);
- }
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/camera/parameter/cameraError.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/camera/parameter/cameraError.md b/docs/en/edge/cordova/camera/parameter/cameraError.md
deleted file mode 100644
index 33d1e32..0000000
--- a/docs/en/edge/cordova/camera/parameter/cameraError.md
+++ /dev/null
@@ -1,30 +0,0 @@
----
- license: 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.
----
-
-# cameraError
-
-onError callback function that provides an error message.
-
- function(message) {
- // Show a helpful message
- }
-
-## Parameters
-
-- __message__: The message is provided by the device's native code. _(String)_
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/camera/parameter/cameraOptions.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/camera/parameter/cameraOptions.md b/docs/en/edge/cordova/camera/parameter/cameraOptions.md
deleted file mode 100644
index b011932..0000000
--- a/docs/en/edge/cordova/camera/parameter/cameraOptions.md
+++ /dev/null
@@ -1,136 +0,0 @@
----
- license: 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.
----
-
-# cameraOptions
-
-Optional parameters to customize the camera settings.
-
- { quality : 75,
- destinationType : Camera.DestinationType.DATA_URL,
- sourceType : Camera.PictureSourceType.CAMERA,
- allowEdit : true,
- encodingType: Camera.EncodingType.JPEG,
- targetWidth: 100,
- targetHeight: 100,
- popoverOptions: CameraPopoverOptions,
- saveToPhotoAlbum: false };
-
-## Options
-
-- __quality__: Quality of the saved image, expressed as a range of 0-100, where 100 is typically full resolution with no loss from file compression. _(Number)_ (Note that information about the camera's resolution is unavailable.)
-
-- __destinationType__: Choose the format of the return value. Defined in `navigator.camera.DestinationType` _(Number)_
-
- Camera.DestinationType = {
- DATA_URL : 0, // Return image as base64-encoded string
- FILE_URI : 1, // Return image file URI
- NATIVE_URI : 2 // Return image native URI (e.g., assets-library:// on iOS or content:// on Android)
- };
-
-- __sourceType__: Set the source of the picture. Defined in `navigator.camera.PictureSourceType` _(Number)_
-
- Camera.PictureSourceType = {
- PHOTOLIBRARY : 0,
- CAMERA : 1,
- SAVEDPHOTOALBUM : 2
- };
-
-- __allowEdit__: Allow simple editing of image before selection. _(Boolean)_
-
-- __encodingType__: Choose the returned image file's encoding. Defined in `navigator.camera.EncodingType` _(Number)_
-
- Camera.EncodingType = {
- JPEG : 0, // Return JPEG encoded image
- PNG : 1 // Return PNG encoded image
- };
-
-- __targetWidth__: Width in pixels to scale image. Must be used with __targetHeight__. Aspect ratio remains constant. _(Number)_
-
-- __targetHeight__: Height in pixels to scale image. Must be used with __targetWidth__. Aspect ratio remains constant. _(Number)_
-
-- __mediaType__: Set the type of media to select from. Only works when `PictureSourceType` is `PHOTOLIBRARY` or `SAVEDPHOTOALBUM`. Defined in `nagivator.camera.MediaType` _(Number)_
-
- Camera.MediaType = {
- PICTURE: 0, // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
- VIDEO: 1, // allow selection of video only, WILL ALWAYS RETURN FILE_URI
- ALLMEDIA : 2 // allow selection from all media types
-};
-
-- __correctOrientation__: Rotate the image to correct for the orientation of the device during capture. _(Boolean)_
-
-- __saveToPhotoAlbum__: Save the image to the photo album on the device after capture. _(Boolean)_
-
-- __popoverOptions__: iOS-only options that specify popover location in iPad. Defined in `CameraPopoverOptions`.
-
-- __cameraDirection__: Choose the camera to use (front- or back-facing). Defined in `navigator.camera.Direction` _(Number)_
-
- Camera.Direction = {
- BACK : 0, // Use the back-facing camera
- FRONT : 1 // Use the front-facing camera
- };
-
-## Amazon Fire OSQuirks
-
-- Any `cameraDirection` value results in a back-facing photo.
-
-- Ignores the `allowEdit` parameter.
-
-- `Camera.PictureSourceType.PHOTOLIBRARY` and `Camera.PictureSourceType.SAVEDPHOTOALBUM` both display the same photo album.
-
-## Android Quirks
-
-- Any `cameraDirection` value results in a back-facing photo.
-
-- Ignores the `allowEdit` parameter.
-
-- `Camera.PictureSourceType.PHOTOLIBRARY` and `Camera.PictureSourceType.SAVEDPHOTOALBUM` both display the same photo album.
-
-## BlackBerry 10 Quirks
-
-- Ignores the `quality` parameter.
-
-- Ignores the `sourceType` parameter.
-
-- Ignores the `allowEdit` parameter.
-
-- `Camera.MediaType` is not supported.
-
-- Ignores the `correctOrientation` parameter.
-
-- Ignores the `cameraDirection` parameter.
-
-## iOS Quirks
-
-- Set `quality` below 50 to avoid memory errors on some devices.
-
-- When using `destinationType.FILE_URI`, photos are saved in the application's temporary directory. You may delete the contents of this directory using the `navigator.fileMgr` APIs if storage space is a concern.
-
-## Tizen Quirks
-
-- options not supported
-
-- always returns a FILE URI
-
-## Windows Phone 7 and 8 Quirks
-
-- Ignores the `allowEdit` parameter.
-
-- Ignores the `correctOrientation` parameter.
-
-- Ignores the `cameraDirection` parameter.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/camera/parameter/cameraSuccess.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/camera/parameter/cameraSuccess.md b/docs/en/edge/cordova/camera/parameter/cameraSuccess.md
deleted file mode 100644
index 89d7ece..0000000
--- a/docs/en/edge/cordova/camera/parameter/cameraSuccess.md
+++ /dev/null
@@ -1,39 +0,0 @@
----
- license: 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.
----
-
-# cameraSuccess
-
-onSuccess callback function that provides the image data.
-
- function(imageData) {
- // Do something with the image
- }
-
-## Parameters
-
-- __imageData__: Base64 encoding of the image data, _or_ the image file URI, depending on `cameraOptions` in effect. _(String)_
-
-## Example
-
- // Show image
- //
- function cameraCallback(imageData) {
- var image = document.getElementById('myImage');
- image.src = "data:image/jpeg;base64," + imageData;
- }
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/compass/compass.clearWatch.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/compass/compass.clearWatch.md b/docs/en/edge/cordova/compass/compass.clearWatch.md
deleted file mode 100755
index 32adfab..0000000
--- a/docs/en/edge/cordova/compass/compass.clearWatch.md
+++ /dev/null
@@ -1,108 +0,0 @@
----
- license: 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.
----
-
-# compass.clearWatch
-
-Stop watching the compass referenced by the watch ID parameter.
-
- navigator.compass.clearWatch(watchID);
-
-- __watchID__: The ID returned by `compass.watchHeading`.
-
-## Supported Platforms
-
-- Amazon Fire OS
-- Android
-- BlackBerry 10
-- iOS
-- Tizen
-- Windows Phone 7 and 8 (if available in hardware)
-- Windows 8
-
-## Quick Example
-
- var watchID = navigator.compass.watchHeading(onSuccess, onError, options);
-
- // ... later on ...
-
- navigator.compass.clearWatch(watchID);
-
-## Full Example
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Compass Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // The watch id references the current `watchHeading`
- var watchID = null;
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready", onDeviceReady, false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- startWatch();
- }
-
- // Start watching the compass
- //
- function startWatch() {
-
- // Update compass every 3 seconds
- var options = { frequency: 3000 };
-
- watchID = navigator.compass.watchHeading(onSuccess, onError, options);
- }
-
- // Stop watching the compass
- //
- function stopWatch() {
- if (watchID) {
- navigator.compass.clearWatch(watchID);
- watchID = null;
- }
- }
-
- // onSuccess: Get the current heading
- //
- function onSuccess(heading) {
- var element = document.getElementById('heading');
- element.innerHTML = 'Heading: ' + heading.magneticHeading;
- }
-
- // onError: Failed to get the heading
- //
- function onError(compassError) {
- alert('Compass error: ' + compassError.code);
- }
-
- </script>
- </head>
- <body>
- <div id="heading">Waiting for heading...</div>
- <button onclick="startWatch();">Start Watching</button>
- <button onclick="stopWatch();">Stop Watching</button>
- </body>
- </html>
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/compass/compass.clearWatchFilter.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/compass/compass.clearWatchFilter.md b/docs/en/edge/cordova/compass/compass.clearWatchFilter.md
deleted file mode 100644
index 3a0e58e..0000000
--- a/docs/en/edge/cordova/compass/compass.clearWatchFilter.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
- license: 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.
----
-
-# compass.clearWatchFilter
-
-No longer supported as of 1.6. See `compass.clearWatch`.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/compass/compass.getCurrentHeading.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/compass/compass.getCurrentHeading.md b/docs/en/edge/cordova/compass/compass.getCurrentHeading.md
deleted file mode 100755
index 5e64ec2..0000000
--- a/docs/en/edge/cordova/compass/compass.getCurrentHeading.md
+++ /dev/null
@@ -1,96 +0,0 @@
----
- license: 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.
----
-
-# compass.getCurrentHeading
-
-Get the current compass heading.
-
- navigator.compass.getCurrentHeading(compassSuccess, compassError, compassOptions);
-
-## Description
-
-The compass is a sensor that detects the direction or heading that the
-device is pointed, typically from the top of the device. It measures
-the heading in degrees from 0 to 359.99, where 0 is north.
-
-The compass heading information is returned via a `CompassHeading`
-object using the `compassSuccess` callback function.
-
-## Supported Platforms
-
-- Amazon Fire OS
-- Android
-- BlackBerry 10
-- iOS
-- Tizen
-- Windows Phone 7 and 8 (if available in hardware)
-- Windows 8
-
-## Quick Example
-
- function onSuccess(heading) {
- alert('Heading: ' + heading.magneticHeading);
- };
-
- function onError(error) {
- alert('CompassError: ' + error.code);
- };
-
- navigator.compass.getCurrentHeading(onSuccess, onError);
-
-## Full Example
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Compass Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready", onDeviceReady, false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- navigator.compass.getCurrentHeading(onSuccess, onError);
- }
-
- // onSuccess: Get the current heading
- //
- function onSuccess(heading) {
- alert('Heading: ' + heading.magneticHeading);
- }
-
- // onError: Failed to get the heading
- //
- function onError(compassError) {
- alert('Compass Error: ' + compassError.code);
- }
-
- </script>
- </head>
- <body>
- <h1>Example</h1>
- <p>getCurrentHeading</p>
- </body>
- </html>
-
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/97ae96ee/docs/en/edge/cordova/compass/compass.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/compass/compass.md b/docs/en/edge/cordova/compass/compass.md
deleted file mode 100755
index 90c7712..0000000
--- a/docs/en/edge/cordova/compass/compass.md
+++ /dev/null
@@ -1,100 +0,0 @@
----
- license: 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.
----
-
-# Compass
-
-> Obtains the direction that the device is pointing.
-
-## Methods
-
-- compass.getCurrentHeading
-- compass.watchHeading
-- compass.clearWatch
-- compass.watchHeadingFilter (obsolete)
-- compass.clearWatchFilter (obsolete)
-
-## Arguments
-
-- compassSuccess
-- compassError
-- compassOptions
-- compassHeading
-
-## Accessing the Feature
-
-As of version 3.0, Cordova implements device-level APIs as _plugins_.
-Use the CLI's `plugin` command, described in The Command-Line
-Interface, to add or remove this feature for a project:
-
- $ cordova plugin add org.apache.cordova.device-orientation
- $ cordova plugin ls
- [ 'org.apache.cordova.device-orientation' ]
- $ cordova plugin rm org.apache.cordova.device-orientation
-
-These commands apply to all targeted platforms, but modify the
-platform-specific configuration settings described below:
-
-* Amazon Fire OS
-
- (in `app/res/xml/config.xml`)
-
- <feature name="Compass">
- <param name="android-package" value="org.apache.cordova.deviceorientation.CompassListener" />
- </feature>
-
- (in app/AndroidManifest)
-
- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
-
-* Android
-
- (in `app/res/xml/config.xml`)
-
- <feature name="Compass">
- <param name="android-package" value="org.apache.cordova.deviceorientation.CompassListener" />
- </feature>
-
- (in app/AndroidManifest)
-
- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
-
-* BlackBerry 10
-
- (in `www/config.xml`)
-
- <feature name="Compass" value="Comapss" />
-
-* iOS (in the named application directory's `config.xml`)
-
- <feature name="Compass">
- <param name="ios-package" value="CDVLocation" />
- </feature>
-
-* Windows Phone (in `Properties/WPAppManifest.xml`)
-
- <Capabilities>
- <Capability Name="ID_CAP_SENSORS" />
- </Capabilities>
-
- Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
-
-Some platforms may support this feature without requiring any special
-configuration. See Platform Support for an overview.