You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2013/10/01 05:32:01 UTC
[12/12] docs commit: [CB-4830] create docs dir for 3.1.0
[CB-4830] create docs dir for 3.1.0
Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/4b231e9b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/4b231e9b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/4b231e9b
Branch: refs/heads/master
Commit: 4b231e9b2f3a4a6f09f61abc4e4613f3a7bebdb6
Parents: f46855b
Author: Marcel Kinard <cm...@gmail.com>
Authored: Mon Sep 30 23:30:28 2013 -0400
Committer: Marcel Kinard <cm...@gmail.com>
Committed: Mon Sep 30 23:30:28 2013 -0400
----------------------------------------------------------------------
README.md | 12 +
VERSION | 2 +-
docs/en/3.1.0/config.json | 201 +++++
docs/en/3.1.0/config_ref/index.md | 179 +++++
.../accelerometer/acceleration/acceleration.md | 103 +++
.../accelerometer/accelerometer.clearWatch.md | 110 +++
.../accelerometer.getCurrentAcceleration.md | 108 +++
.../cordova/accelerometer/accelerometer.md | 86 +++
.../accelerometer.watchAcceleration.md | 141 ++++
.../parameters/accelerometerError.md | 26 +
.../parameters/accelerometerOptions.md | 26 +
.../parameters/accelerometerSuccess.md | 39 +
docs/en/3.1.0/cordova/camera/camera.cleanup.md | 48 ++
.../3.1.0/cordova/camera/camera.getPicture.md | 241 ++++++
docs/en/3.1.0/cordova/camera/camera.md | 102 +++
.../camera/parameter/CameraPopoverHandle.md | 63 ++
.../camera/parameter/CameraPopoverOptions.md | 77 ++
.../cordova/camera/parameter/cameraError.md | 30 +
.../cordova/camera/parameter/cameraOptions.md | 132 ++++
.../cordova/camera/parameter/cameraSuccess.md | 39 +
.../3.1.0/cordova/compass/compass.clearWatch.md | 107 +++
.../cordova/compass/compass.clearWatchFilter.md | 22 +
.../compass/compass.getCurrentHeading.md | 95 +++
docs/en/3.1.0/cordova/compass/compass.md | 74 ++
.../cordova/compass/compass.watchHeading.md | 147 ++++
.../compass/compass.watchHeadingFilter.md | 22 +
.../compass/compassError/compassError.md | 36 +
.../cordova/compass/parameters/compassError.md | 28 +
.../compass/parameters/compassHeading.md | 48 ++
.../compass/parameters/compassOptions.md | 41 +
.../compass/parameters/compassSuccess.md | 36 +
docs/en/3.1.0/cordova/connection/connection.md | 93 +++
.../3.1.0/cordova/connection/connection.type.md | 124 ++++
.../3.1.0/cordova/contacts/Contact/contact.md | 256 +++++++
.../contacts/ContactAddress/contactaddress.md | 168 +++++
.../contacts/ContactError/contactError.md | 42 ++
.../contacts/ContactField/contactfield.md | 155 ++++
.../ContactFindOptions/contactfindoptions.md | 109 +++
.../cordova/contacts/ContactName/contactname.md | 143 ++++
.../ContactOrganization/contactorganization.md | 151 ++++
.../3.1.0/cordova/contacts/contacts.create.md | 72 ++
docs/en/3.1.0/cordova/contacts/contacts.find.md | 124 ++++
docs/en/3.1.0/cordova/contacts/contacts.md | 118 +++
.../cordova/contacts/parameters/contactError.md | 26 +
.../contacts/parameters/contactFields.md | 24 +
.../contacts/parameters/contactFindOptions.md | 34 +
.../contacts/parameters/contactSuccess.md | 38 +
docs/en/3.1.0/cordova/device/device.cordova.md | 74 ++
docs/en/3.1.0/cordova/device/device.md | 95 +++
docs/en/3.1.0/cordova/device/device.model.md | 92 +++
docs/en/3.1.0/cordova/device/device.name.md | 95 +++
docs/en/3.1.0/cordova/device/device.platform.md | 89 +++
docs/en/3.1.0/cordova/device/device.uuid.md | 103 +++
docs/en/3.1.0/cordova/device/device.version.md | 79 ++
.../3.1.0/cordova/events/events.backbutton.md | 80 ++
.../cordova/events/events.batterycritical.md | 90 +++
.../3.1.0/cordova/events/events.batterylow.md | 89 +++
.../cordova/events/events.batterystatus.md | 96 +++
.../3.1.0/cordova/events/events.deviceready.md | 89 +++
.../cordova/events/events.endcallbutton.md | 78 ++
docs/en/3.1.0/cordova/events/events.md | 93 +++
.../3.1.0/cordova/events/events.menubutton.md | 79 ++
docs/en/3.1.0/cordova/events/events.offline.md | 98 +++
docs/en/3.1.0/cordova/events/events.online.md | 99 +++
docs/en/3.1.0/cordova/events/events.pause.md | 100 +++
docs/en/3.1.0/cordova/events/events.resume.md | 113 +++
.../3.1.0/cordova/events/events.searchbutton.md | 79 ++
.../cordova/events/events.startcallbutton.md | 79 ++
.../cordova/events/events.volumedownbutton.md | 79 ++
.../cordova/events/events.volumeupbutton.md | 79 ++
.../file/directoryentry/directoryentry.md | 410 ++++++++++
.../file/directoryreader/directoryreader.md | 66 ++
docs/en/3.1.0/cordova/file/file.md | 104 +++
.../3.1.0/cordova/file/fileentry/fileentry.md | 336 +++++++++
.../3.1.0/cordova/file/fileerror/fileerror.md | 47 ++
docs/en/3.1.0/cordova/file/fileobj/fileobj.md | 82 ++
.../3.1.0/cordova/file/filereader/filereader.md | 254 +++++++
.../3.1.0/cordova/file/filesystem/filesystem.md | 90 +++
.../cordova/file/filetransfer/filetransfer.md | 299 ++++++++
.../file/filetransfererror/filetransfererror.md | 44 ++
.../file/fileuploadoptions/fileuploadoptions.md | 48 ++
.../file/fileuploadresult/fileuploadresult.md | 40 +
.../3.1.0/cordova/file/filewriter/filewriter.md | 234 ++++++
docs/en/3.1.0/cordova/file/flags/flags.md | 46 ++
.../file/localfilesystem/localfilesystem.md | 125 ++++
docs/en/3.1.0/cordova/file/metadata/metadata.md | 49 ++
.../geolocation/Coordinates/coordinates.md | 125 ++++
.../cordova/geolocation/Position/position.md | 113 +++
.../geolocation/PositionError/positionError.md | 57 ++
.../geolocation/geolocation.clearWatch.md | 113 +++
.../geolocation.getCurrentPosition.md | 125 ++++
.../en/3.1.0/cordova/geolocation/geolocation.md | 121 +++
.../geolocation/geolocation.watchPosition.md | 127 ++++
.../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 ++
.../cordova/globalization/globalization.md | 73 ++
.../globalization.numberToString.md | 85 +++
.../globalization/globalization.stringToDate.md | 114 +++
.../globalization.stringToNumber.md | 88 +++
.../3.1.0/cordova/inappbrowser/inappbrowser.md | 485 ++++++++++++
.../3.1.0/cordova/inappbrowser/window.open.md | 102 +++
.../cordova/media/MediaError/mediaError.md | 42 ++
.../cordova/media/Parameters/mediaError.md | 31 +
.../en/3.1.0/cordova/media/capture/CaptureCB.md | 44 ++
.../3.1.0/cordova/media/capture/CaptureError.md | 38 +
.../cordova/media/capture/CaptureErrorCB.md | 41 +
.../cordova/media/capture/ConfigurationData.md | 61 ++
.../media/capture/MediaFile.getFormatData.md | 58 ++
.../en/3.1.0/cordova/media/capture/MediaFile.md | 38 +
.../cordova/media/capture/MediaFileData.md | 78 ++
docs/en/3.1.0/cordova/media/capture/capture.md | 143 ++++
.../3.1.0/cordova/media/capture/captureAudio.md | 144 ++++
.../media/capture/captureAudioOptions.md | 47 ++
.../3.1.0/cordova/media/capture/captureImage.md | 137 ++++
.../media/capture/captureImageOptions.md | 37 +
.../3.1.0/cordova/media/capture/captureVideo.md | 137 ++++
.../media/capture/captureVideoOptions.md | 44 ++
.../cordova/media/media.getCurrentPosition.md | 176 +++++
.../en/3.1.0/cordova/media/media.getDuration.md | 162 ++++
docs/en/3.1.0/cordova/media/media.md | 150 ++++
docs/en/3.1.0/cordova/media/media.pause.md | 162 ++++
docs/en/3.1.0/cordova/media/media.play.md | 193 +++++
docs/en/3.1.0/cordova/media/media.release.md | 154 ++++
docs/en/3.1.0/cordova/media/media.seekTo.md | 154 ++++
docs/en/3.1.0/cordova/media/media.setVolume.md | 171 +++++
.../en/3.1.0/cordova/media/media.startRecord.md | 148 ++++
docs/en/3.1.0/cordova/media/media.stop.md | 167 +++++
docs/en/3.1.0/cordova/media/media.stopRecord.md | 136 ++++
.../cordova/notification/notification.alert.md | 114 +++
.../cordova/notification/notification.beep.md | 105 +++
.../notification/notification.confirm.md | 125 ++++
.../3.1.0/cordova/notification/notification.md | 76 ++
.../cordova/notification/notification.prompt.md | 123 +++
.../notification/notification.vibrate.md | 103 +++
.../cordova/splashscreen/splashscreen.hide.md | 77 ++
.../3.1.0/cordova/splashscreen/splashscreen.md | 101 +++
.../cordova/splashscreen/splashscreen.show.md | 66 ++
.../3.1.0/cordova/storage/database/database.md | 114 +++
.../storage/localstorage/localstorage.md | 119 +++
.../cordova/storage/parameters/display_name.md | 22 +
.../en/3.1.0/cordova/storage/parameters/name.md | 22 +
.../en/3.1.0/cordova/storage/parameters/size.md | 22 +
.../3.1.0/cordova/storage/parameters/version.md | 22 +
.../3.1.0/cordova/storage/sqlerror/sqlerror.md | 43 ++
.../storage/sqlresultset/sqlresultset.md | 149 ++++
.../sqlresultsetrowlist/sqlresultsetrowlist.md | 135 ++++
.../storage/sqltransaction/sqltransaction.md | 108 +++
docs/en/3.1.0/cordova/storage/storage.md | 81 ++
.../cordova/storage/storage.opendatabase.md | 68 ++
docs/en/3.1.0/guide/appdev/privacy/index.md | 117 +++
docs/en/3.1.0/guide/appdev/whitelist/index.md | 175 +++++
docs/en/3.1.0/guide/cli/index.md | 372 ++++++++++
docs/en/3.1.0/guide/hybrid/plugins/index.md | 137 ++++
docs/en/3.1.0/guide/hybrid/webviews/index.md | 26 +
docs/en/3.1.0/guide/overview/index.md | 383 ++++++++++
docs/en/3.1.0/guide/platforms/android/config.md | 66 ++
docs/en/3.1.0/guide/platforms/android/index.md | 211 ++++++
docs/en/3.1.0/guide/platforms/android/plugin.md | 206 ++++++
docs/en/3.1.0/guide/platforms/android/tools.md | 81 ++
.../3.1.0/guide/platforms/android/upgrading.md | 431 +++++++++++
.../en/3.1.0/guide/platforms/android/webview.md | 122 +++
.../3.1.0/guide/platforms/blackberry/index.md | 213 ++++++
.../3.1.0/guide/platforms/blackberry/plugin.md | 144 ++++
.../3.1.0/guide/platforms/blackberry/tools.md | 84 +++
.../guide/platforms/blackberry/upgrading.md | 431 +++++++++++
.../guide/platforms/blackberry10/config.md | 51 ++
.../3.1.0/guide/platforms/blackberry10/index.md | 199 +++++
.../guide/platforms/blackberry10/plugin.md | 202 +++++
.../3.1.0/guide/platforms/blackberry10/tools.md | 179 +++++
.../guide/platforms/blackberry10/upgrading.md | 476 ++++++++++++
docs/en/3.1.0/guide/platforms/index.md | 89 +++
docs/en/3.1.0/guide/platforms/ios/config.md | 126 ++++
docs/en/3.1.0/guide/platforms/ios/index.md | 231 ++++++
docs/en/3.1.0/guide/platforms/ios/plugin.md | 220 ++++++
docs/en/3.1.0/guide/platforms/ios/tools.md | 59 ++
docs/en/3.1.0/guide/platforms/ios/upgrading.md | 741 +++++++++++++++++++
docs/en/3.1.0/guide/platforms/ios/webview.md | 157 ++++
docs/en/3.1.0/guide/platforms/tizen/index.md | 116 +++
docs/en/3.1.0/guide/platforms/win8/index.md | 115 +++
docs/en/3.1.0/guide/platforms/win8/tools.md | 46 ++
docs/en/3.1.0/guide/platforms/win8/upgrading.md | 49 ++
docs/en/3.1.0/guide/platforms/wp7/index.md | 108 +++
docs/en/3.1.0/guide/platforms/wp8/index.md | 138 ++++
docs/en/3.1.0/guide/platforms/wp8/plugin.md | 212 ++++++
docs/en/3.1.0/guide/platforms/wp8/tools.md | 103 +++
docs/en/3.1.0/guide/platforms/wp8/upgrading.md | 412 +++++++++++
docs/en/3.1.0/index.md | 130 ++++
docs/en/3.1.0/plugin_ref/plugman.md | 110 +++
docs/en/3.1.0/plugin_ref/spec.md | 572 ++++++++++++++
200 files changed, 23923 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/4b231e9b/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 81a3cea..3bb79e9 100644
--- a/README.md
+++ b/README.md
@@ -133,6 +133,10 @@ Generate a specific language and version
bin/generate en edge
+or as a shortcut
+
+ bin/generate --edge
+
### Quick Preview
When making minor edits, it is usually safe to simply render the edited from
@@ -150,6 +154,14 @@ There is a Rake task to increment the version, generate the version directory, a
# generate version 1.7.0
rake version[1.7.0]
+If while running rake you get the error
+
+ no such file to load -- spec/rake/spectask
+
+then run
+
+ sudo gem install rspec -v 1.3.0
+
FAQ
---
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/4b231e9b/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index 56fea8a..a0cd9f0 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0.0
\ No newline at end of file
+3.1.0
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/4b231e9b/docs/en/3.1.0/config.json
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/config.json b/docs/en/3.1.0/config.json
new file mode 100644
index 0000000..76be7b7
--- /dev/null
+++ b/docs/en/3.1.0/config.json
@@ -0,0 +1,201 @@
+{
+ "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",
+ "cordova/storage/storage.opendatabase.md",
+ "cordova/storage/parameters/name.md",
+ "cordova/storage/parameters/version.md",
+ "cordova/storage/parameters/display_name.md",
+ "cordova/storage/parameters/size.md",
+ "cordova/storage/database/database.md",
+ "cordova/storage/sqltransaction/sqltransaction.md",
+ "cordova/storage/sqlresultset/sqlresultset.md",
+ "cordova/storage/sqlresultsetrowlist/sqlresultsetrowlist.md",
+ "cordova/storage/sqlerror/sqlerror.md",
+ "cordova/storage/localstorage/localstorage.md"
+ ],
+ "inappbrowser.md": [
+ "cordova/inappbrowser/inappbrowser.md",
+ "cordova/inappbrowser/window.open.md"
+ ]
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/4b231e9b/docs/en/3.1.0/config_ref/index.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/config_ref/index.md b/docs/en/3.1.0/config_ref/index.md
new file mode 100644
index 0000000..eab4545
--- /dev/null
+++ b/docs/en/3.1.0/config_ref/index.md
@@ -0,0 +1,179 @@
+---
+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.
+---
+
+# The config.xml File
+
+Many aspects of an app's behavior can be controlled with a global
+configuration file, `config.xml`, that is placed in the top-level web
+asset directory along with the app's home page. This
+platform-agnostic XML file is formatted based on the W3C's [Packaged
+Web Apps (Widgets)](http://www.w3.org/TR/widgets/) specification, and
+extended to specify core Cordova API features, plugins, and
+platform-specific settings.
+
+For projects created with the Cordova CLI (described in The
+Command-line Interface), this file can be found in the top-level `www`
+directory. Using the CLI to build a project regenerates versions of
+this file in various subdirectories within `platforms`. If you use the
+CLI to create a project, but then shift your workflow to an SDK, the
+platform-specific file serves as a source.
+
+This section details global and cross-platform configuration options.
+See the following sections for platform-specific options:
+
+- iOS Configuration
+- Android Configuration
+- BlackBerry Configuration
+
+## Core Configuration Elements
+
+This example shows the default `config.xml` generated by the CLI's
+`create` command, described in The Command-line Interface:
+
+ <widget id="com.example.hello" version="0.0.1">
+ <name>HelloWorld</name>
+ <description>
+ A sample Apache Cordova application that responds to the deviceready event.
+ </description>
+ <author email="dev@callback.apache.org" href="http://cordova.io">
+ Apache Cordova Team
+ </author>
+ <content src="index.html" />
+ <access origin="*" />
+ <preference name="Fullscreen" value="true" />
+ <preference name="WebViewBounce" value="true" />
+ </widget>
+
+<!-- QUERY: is WebViewBounce superseded by DisallowOverscroll? -->
+
+The following configuration elements appear in the top-level
+`config.xml` file, and are supported across all supported Cordova
+platforms:
+
+- The `<widget>` element's `id` attribute provides the app's
+ reverse-domain identifier, and the `version` its full version number
+ expressed in major/minor/patch notation.
+
+- The `<name>` element specifies the app's formal name, as it appears
+ on the device's home screen and within app-store interfaces.
+
+- The `<description>` and `<author>` elements specify metadata and
+ contact information that may appear within app-store listings.
+
+- The optional `<content>` element defines your application's starting
+ page in the top-level web assets directory. The default value is
+ `index.html`, which customarily appears in a project's top-level
+ `www` directory.
+
+- `<access>` elements define the set of external domains the app is
+ allowed to communicate with. The default value shown above allows it
+ to access any server. See the Domain Whitelist Guide for details.
+
+- The `<preference>` tag sets various options as pairs of
+ `name`/`value` attributes. Each preference's `name` is
+ case-insensitive. Many preferences are unique to specific
+ platforms, as listed at the top of this page. The following sections
+ detail preferences that apply to more than one platform.
+
+## Global Preferences
+
+The following global preferences apply to all platforms:
+
+- `Fullscreen` allows you to hide the status bar at the top of the
+ screen. The default value is `false`. Example:
+
+ <preference name="Fullscreen" value="true" />
+
+- `Orientation` allows you to lock orientation and prevent the
+ interface from rotating in response to changes in orientation.
+ Possible values are `default`, `landscape`, or `portrait`. Example:
+
+ <preference name="Orientation" value="landscape" />
+
+ __NOTE:__ The `default` value means _both_ landscape and portrait
+ orientations are enabled. If you want to use each platform's
+ default settings (usually portrait-only), leave this tag out of the
+ `config.xml` file. Also, BlackBerry uses `auto` instead of `default`
+ in its `config.xml` file. If you specify `default` in the global
+ `config.xml`, it translates to `auto` in the BlackBerry build.
+
+## Multi-platform Preferences
+
+The following preferences apply to more than one platform, but not to
+all of them:
+
+- `DisallowOverscroll` (boolean, defaults to `false`): set to `true`
+ if you don't want the interface to display any feedback when users
+ scroll past the beginning or end of content.
+
+ <preference name="DisallowOverscroll" value="true"/>
+
+ Applies to Android and iOS. On iOS, overscroll gestures cause
+ content to bounce back to its original position. On Android, they
+ produce a more subtle glowing effect along the top or bottom edge of
+ the content.
+
+- `BackgroundColor`: Set the app's background color. Supports a
+ four-byte hex value, with the first byte representing the alpha
+ channel, and standard RGB values for the following three bytes. This
+ example specifies blue:
+
+ <preference name="BackgroundColor" value="0xff0000ff"/>
+
+ Applies to Android and BlackBerry. Overrides CSS otherwise available
+ across _all_ platforms, for example: `body{background-color:blue}`.
+
+- `HideKeyboardFormAccessoryBar` (boolean, defaults to `false`): set
+ to `true` to hide the additional toolbar that appears above the
+ keyboard, helping users navigate from one form input to another.
+
+ <preference name="HideKeyboardFormAccessoryBar" value="true"/>
+
+ Applies to iOS and BlackBerry.
+
+ __NOTE:__ For BlackBerry, valid values are `enable` or `disable`.
+
+## The `<feature>` Element
+
+If you use the CLI to build applications, you use the `plugin` command
+to enable device APIs. This does not modify the top-level `config.xml`
+file, so the `<feature>` element does not apply to your workflow. If
+you are working directly in an SDK and using the platform-specific
+`config.xml` file as source, you use the `<feature>` tag to enable
+device-level APIs and external plugins. They typically appear in this
+form:
+
+ <feature name="Plugin" value="PluginID" />
+
+They often appear with custom values in platform-specific `config.xml`
+files. For example, here is how to specify the Device API for Android
+projects:
+
+ <feature name="Device">
+ <param name="android-package" value="org.apache.cordova.device.Device" />
+ </feature>
+
+Here is how the element appears for iOS projects:
+
+ <feature name="Device">
+ <param name="ios-package" value="CDVDevice" />
+ </feature>
+
+See the API Reference for details on how to specify each feature. See
+the Plugin Development Guide for more information on plugins.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/4b231e9b/docs/en/3.1.0/cordova/accelerometer/acceleration/acceleration.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/accelerometer/acceleration/acceleration.md b/docs/en/3.1.0/cordova/accelerometer/acceleration/acceleration.md
new file mode 100644
index 0000000..7717105
--- /dev/null
+++ b/docs/en/3.1.0/cordova/accelerometer/acceleration/acceleration.md
@@ -0,0 +1,103 @@
+---
+ 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
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- 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/4b231e9b/docs/en/3.1.0/cordova/accelerometer/accelerometer.clearWatch.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/accelerometer/accelerometer.clearWatch.md b/docs/en/3.1.0/cordova/accelerometer/accelerometer.clearWatch.md
new file mode 100644
index 0000000..10aa84a
--- /dev/null
+++ b/docs/en/3.1.0/cordova/accelerometer/accelerometer.clearWatch.md
@@ -0,0 +1,110 @@
+---
+ 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
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- 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/4b231e9b/docs/en/3.1.0/cordova/accelerometer/accelerometer.getCurrentAcceleration.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/accelerometer/accelerometer.getCurrentAcceleration.md b/docs/en/3.1.0/cordova/accelerometer/accelerometer.getCurrentAcceleration.md
new file mode 100644
index 0000000..66055f3
--- /dev/null
+++ b/docs/en/3.1.0/cordova/accelerometer/accelerometer.getCurrentAcceleration.md
@@ -0,0 +1,108 @@
+---
+ 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
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- 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/4b231e9b/docs/en/3.1.0/cordova/accelerometer/accelerometer.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/accelerometer/accelerometer.md b/docs/en/3.1.0/cordova/accelerometer/accelerometer.md
new file mode 100644
index 0000000..4b909b8
--- /dev/null
+++ b/docs/en/3.1.0/cordova/accelerometer/accelerometer.md
@@ -0,0 +1,86 @@
+---
+ 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:
+
+* Android (in `app/res/xml/config.xml`)
+
+ <feature name="Accelerometer">
+ <param name="android-package" value="org.apache.cordova.AccelListener" />
+ </feature>
+
+* BlackBerry WebWorks
+
+ (in www/plugins.xml)
+ <feature name="Accelerometer">
+ <param name="blackberry-package" value="org.apache.cordova.accelerometer.Accelerometer" />
+ </feature>
+
+ (in www/config.xml)
+ <feature id="blackberry.system" required="true" version="1.0.0.0" />
+ <feature id="org.apache.cordova" required="true" version="1.0.0" />
+
+* iOS (in `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_ in the Overview section.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/4b231e9b/docs/en/3.1.0/cordova/accelerometer/accelerometer.watchAcceleration.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/accelerometer/accelerometer.watchAcceleration.md b/docs/en/3.1.0/cordova/accelerometer/accelerometer.watchAcceleration.md
new file mode 100644
index 0000000..e929828
--- /dev/null
+++ b/docs/en/3.1.0/cordova/accelerometer/accelerometer.watchAcceleration.md
@@ -0,0 +1,141 @@
+---
+ 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
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- 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/4b231e9b/docs/en/3.1.0/cordova/accelerometer/parameters/accelerometerError.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/accelerometer/parameters/accelerometerError.md b/docs/en/3.1.0/cordova/accelerometer/parameters/accelerometerError.md
new file mode 100644
index 0000000..6dda5c2
--- /dev/null
+++ b/docs/en/3.1.0/cordova/accelerometer/parameters/accelerometerError.md
@@ -0,0 +1,26 @@
+---
+ 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/4b231e9b/docs/en/3.1.0/cordova/accelerometer/parameters/accelerometerOptions.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/accelerometer/parameters/accelerometerOptions.md b/docs/en/3.1.0/cordova/accelerometer/parameters/accelerometerOptions.md
new file mode 100644
index 0000000..b9ebcb5
--- /dev/null
+++ b/docs/en/3.1.0/cordova/accelerometer/parameters/accelerometerOptions.md
@@ -0,0 +1,26 @@
+---
+ 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/4b231e9b/docs/en/3.1.0/cordova/accelerometer/parameters/accelerometerSuccess.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/accelerometer/parameters/accelerometerSuccess.md b/docs/en/3.1.0/cordova/accelerometer/parameters/accelerometerSuccess.md
new file mode 100644
index 0000000..c07a617
--- /dev/null
+++ b/docs/en/3.1.0/cordova/accelerometer/parameters/accelerometerSuccess.md
@@ -0,0 +1,39 @@
+---
+ 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/4b231e9b/docs/en/3.1.0/cordova/camera/camera.cleanup.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/camera/camera.cleanup.md b/docs/en/3.1.0/cordova/camera/camera.cleanup.md
new file mode 100644
index 0000000..f195e70
--- /dev/null
+++ b/docs/en/3.1.0/cordova/camera/camera.cleanup.md
@@ -0,0 +1,48 @@
+---
+ 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/4b231e9b/docs/en/3.1.0/cordova/camera/camera.getPicture.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/camera/camera.getPicture.md b/docs/en/3.1.0/cordova/camera/camera.getPicture.md
new file mode 100644
index 0000000..9cdc30c
--- /dev/null
+++ b/docs/en/3.1.0/cordova/camera/camera.getPicture.md
@@ -0,0 +1,241 @@
+---
+ 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
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+## Android Quirks
+
+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 your 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 inline 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 inline 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/4b231e9b/docs/en/3.1.0/cordova/camera/camera.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/camera/camera.md b/docs/en/3.1.0/cordova/camera/camera.md
new file mode 100644
index 0000000..beeeab0
--- /dev/null
+++ b/docs/en/3.1.0/cordova/camera/camera.md
@@ -0,0 +1,102 @@
+---
+ 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.
+
+__Important privacy note:__ 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 prior to your app accessing 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:
+
+* Android
+
+ (in app/res/xml/config.xml)
+ <feature name="Camera">
+ <param name="android-package" value="org.apache.cordova.CameraLauncher" />
+ </feature>
+
+ (in app/AndroidManifest)
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+
+* BlackBerry WebWorks
+
+ (in www/plugins.xml)
+ <feature name="Camera">
+ <param name="blackberry-package" value="org.apache.cordova.camera.Camera" />
+ </feature>
+
+ (in www/config.xml)
+ <feature id="blackberry.media.camera" />
+
+ <rim:permissions>
+ <rim:permit>use_camera</rim:permit>
+ </rim:permissions>
+
+* iOS (in `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_ in the Overview section.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/4b231e9b/docs/en/3.1.0/cordova/camera/parameter/CameraPopoverHandle.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/camera/parameter/CameraPopoverHandle.md b/docs/en/3.1.0/cordova/camera/parameter/CameraPopoverHandle.md
new file mode 100644
index 0000000..66ccbf6
--- /dev/null
+++ b/docs/en/3.1.0/cordova/camera/parameter/CameraPopoverHandle.md
@@ -0,0 +1,63 @@
+---
+ 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/4b231e9b/docs/en/3.1.0/cordova/camera/parameter/CameraPopoverOptions.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/camera/parameter/CameraPopoverOptions.md b/docs/en/3.1.0/cordova/camera/parameter/CameraPopoverOptions.md
new file mode 100644
index 0000000..e5d2902
--- /dev/null
+++ b/docs/en/3.1.0/cordova/camera/parameter/CameraPopoverOptions.md
@@ -0,0 +1,77 @@
+---
+ 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/4b231e9b/docs/en/3.1.0/cordova/camera/parameter/cameraError.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/camera/parameter/cameraError.md b/docs/en/3.1.0/cordova/camera/parameter/cameraError.md
new file mode 100644
index 0000000..33d1e32
--- /dev/null
+++ b/docs/en/3.1.0/cordova/camera/parameter/cameraError.md
@@ -0,0 +1,30 @@
+---
+ 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/4b231e9b/docs/en/3.1.0/cordova/camera/parameter/cameraOptions.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/camera/parameter/cameraOptions.md b/docs/en/3.1.0/cordova/camera/parameter/cameraOptions.md
new file mode 100644
index 0000000..e9b7fbb
--- /dev/null
+++ b/docs/en/3.1.0/cordova/camera/parameter/cameraOptions.md
@@ -0,0 +1,132 @@
+---
+ 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
+ };
+
+## 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 Quirks
+
+- Ignores the `quality` parameter.
+
+- Ignores the `sourceType` parameter.
+
+- Ignores the `allowEdit` parameter.
+
+- Application must have key injection permissions to close the native Camera application after the user snaps the photo.
+
+- Using large image sizes may result in the inability to encode images on later-model devices (e.g., Torch 9800) that feature high-resolution cameras.
+
+- `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/4b231e9b/docs/en/3.1.0/cordova/camera/parameter/cameraSuccess.md
----------------------------------------------------------------------
diff --git a/docs/en/3.1.0/cordova/camera/parameter/cameraSuccess.md b/docs/en/3.1.0/cordova/camera/parameter/cameraSuccess.md
new file mode 100644
index 0000000..89d7ece
--- /dev/null
+++ b/docs/en/3.1.0/cordova/camera/parameter/cameraSuccess.md
@@ -0,0 +1,39 @@
+---
+ 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;
+ }