You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mw...@apache.org on 2013/08/02 00:11:40 UTC
[6/6] docs commit: Update 3.0.0 from edge directory.
Update 3.0.0 from edge directory.
Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/3fb6feae
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/3fb6feae
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/3fb6feae
Branch: refs/heads/master
Commit: 3fb6feae415b9bdd1f71f3556a5ede1a9f4e1628
Parents: 932e8c6
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Thu Aug 1 14:48:53 2013 -0700
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Thu Aug 1 14:48:53 2013 -0700
----------------------------------------------------------------------
docs/en/3.0.0/config_ref/index.md | 45 +-
.../accelerometer.getCurrentAcceleration.md | 2 +
.../cordova/accelerometer/accelerometer.md | 56 +-
.../3.0.0/cordova/camera/camera.getPicture.md | 3 +
docs/en/3.0.0/cordova/camera/camera.md | 74 +-
.../camera/parameter/CameraPopoverHandle.md | 1 +
.../cordova/camera/parameter/cameraOptions.md | 17 +
.../3.0.0/cordova/compass/compass.clearWatch.md | 3 +-
.../compass/compass.getCurrentHeading.md | 3 +-
docs/en/3.0.0/cordova/compass/compass.md | 44 +-
.../cordova/compass/compass.watchHeading.md | 1 +
.../compass/parameters/compassHeading.md | 10 +-
.../compass/parameters/compassOptions.md | 4 +
docs/en/3.0.0/cordova/connection/connection.md | 63 +-
.../3.0.0/cordova/connection/connection.type.md | 1 +
.../3.0.0/cordova/contacts/Contact/contact.md | 37 +
.../contacts/ContactAddress/contactaddress.md | 17 +
.../contacts/ContactField/contactfield.md | 5 +
.../ContactFindOptions/contactfindoptions.md | 1 +
.../cordova/contacts/ContactName/contactname.md | 10 +
.../ContactOrganization/contactorganization.md | 15 +-
.../3.0.0/cordova/contacts/contacts.create.md | 1 -
docs/en/3.0.0/cordova/contacts/contacts.find.md | 3 +
docs/en/3.0.0/cordova/contacts/contacts.md | 67 +-
.../contacts/parameters/contactFindOptions.md | 1 +
docs/en/3.0.0/cordova/device/device.md | 70 +-
docs/en/3.0.0/cordova/device/device.model.md | 1 +
docs/en/3.0.0/cordova/device/device.name.md | 2 +-
.../3.0.0/cordova/events/events.backbutton.md | 1 -
.../cordova/events/events.batterycritical.md | 1 +
.../3.0.0/cordova/events/events.batterylow.md | 1 +
.../cordova/events/events.batterystatus.md | 1 +
docs/en/3.0.0/cordova/events/events.md | 62 +-
docs/en/3.0.0/cordova/events/events.pause.md | 3 +-
.../file/directoryentry/directoryentry.md | 94 ++-
.../file/directoryreader/directoryreader.md | 1 +
docs/en/3.0.0/cordova/file/file.md | 94 ++-
.../3.0.0/cordova/file/fileentry/fileentry.md | 66 +-
docs/en/3.0.0/cordova/file/fileobj/fileobj.md | 5 +
.../3.0.0/cordova/file/filereader/filereader.md | 17 +-
.../3.0.0/cordova/file/filesystem/filesystem.md | 1 +
.../cordova/file/filetransfer/filetransfer.md | 39 +-
.../file/filetransfererror/filetransfererror.md | 3 +
.../file/fileuploadoptions/fileuploadoptions.md | 5 +
.../file/fileuploadresult/fileuploadresult.md | 2 +
.../3.0.0/cordova/file/filewriter/filewriter.md | 12 +
docs/en/3.0.0/cordova/file/flags/flags.md | 1 +
.../file/localfilesystem/localfilesystem.md | 2 +
.../geolocation/Coordinates/coordinates.md | 6 +
.../cordova/geolocation/Position/position.md | 1 +
.../geolocation/PositionError/positionError.md | 1 +
.../geolocation.getCurrentPosition.md | 2 +
.../en/3.0.0/cordova/geolocation/geolocation.md | 68 +-
.../geolocation/geolocation.watchPosition.md | 2 +
.../parameters/geolocation.options.md | 2 +
.../globalization.getCurrencyPattern.md | 5 +
.../globalization.getDatePattern.md | 6 +
.../globalization.getLocaleName.md | 2 +-
.../globalization.getNumberPattern.md | 9 +
.../globalization.getPreferredLanguage.md | 2 +-
.../cordova/globalization/globalization.md | 22 +-
.../globalization/globalization.stringToDate.md | 18 +-
.../3.0.0/cordova/inappbrowser/inappbrowser.md | 55 +-
.../3.0.0/cordova/inappbrowser/window.open.md | 6 +-
.../cordova/media/MediaError/mediaError.md | 1 +
.../3.0.0/cordova/media/capture/CaptureError.md | 4 +
.../cordova/media/capture/ConfigurationData.md | 2 +
.../en/3.0.0/cordova/media/capture/MediaFile.md | 4 +
.../cordova/media/capture/MediaFileData.md | 16 +
docs/en/3.0.0/cordova/media/capture/capture.md | 70 +-
.../3.0.0/cordova/media/capture/captureAudio.md | 2 +-
.../media/capture/captureAudioOptions.md | 1 +
.../3.0.0/cordova/media/capture/captureImage.md | 2 +-
.../3.0.0/cordova/media/capture/captureVideo.md | 2 +-
.../media/capture/captureVideoOptions.md | 1 +
.../cordova/media/media.getCurrentPosition.md | 6 +
docs/en/3.0.0/cordova/media/media.md | 80 +-
docs/en/3.0.0/cordova/media/media.setVolume.md | 1 -
.../en/3.0.0/cordova/media/media.startRecord.md | 2 +
.../cordova/notification/notification.alert.md | 3 +
.../cordova/notification/notification.beep.md | 3 +-
.../notification/notification.confirm.md | 3 +
.../3.0.0/cordova/notification/notification.md | 54 +-
.../cordova/notification/notification.prompt.md | 8 +-
.../cordova/splashscreen/splashscreen.hide.md | 2 +
.../3.0.0/cordova/splashscreen/splashscreen.md | 28 +-
.../cordova/splashscreen/splashscreen.show.md | 2 +
.../3.0.0/cordova/storage/database/database.md | 1 +
.../storage/localstorage/localstorage.md | 20 +-
.../3.0.0/cordova/storage/sqlerror/sqlerror.md | 1 +
.../storage/sqlresultset/sqlresultset.md | 2 +
docs/en/3.0.0/cordova/storage/storage.md | 57 +-
docs/en/3.0.0/guide/cli/index.md | 169 ++--
docs/en/3.0.0/guide/hybrid/plugins/index.md | 58 +-
docs/en/3.0.0/guide/overview/index.md | 98 ++-
docs/en/3.0.0/guide/platforms/android/config.md | 53 +-
docs/en/3.0.0/guide/platforms/android/index.md | 15 +-
docs/en/3.0.0/guide/platforms/android/plugin.md | 34 +-
docs/en/3.0.0/guide/platforms/android/tools.md | 1 +
.../3.0.0/guide/platforms/android/upgrading.md | 470 +++++++----
.../en/3.0.0/guide/platforms/android/webview.md | 13 +-
.../3.0.0/guide/platforms/blackberry/index.md | 105 +--
.../3.0.0/guide/platforms/blackberry/plugin.md | 24 +-
.../3.0.0/guide/platforms/blackberry/tools.md | 2 +-
.../guide/platforms/blackberry/upgrading.md | 437 ++++++----
.../3.0.0/guide/platforms/blackberry10/index.md | 115 ++-
.../guide/platforms/blackberry10/plugin.md | 42 +-
.../3.0.0/guide/platforms/blackberry10/tools.md | 27 +-
.../guide/platforms/blackberry10/upgrading.md | 453 +++++++----
docs/en/3.0.0/guide/platforms/ios/config.md | 108 ++-
docs/en/3.0.0/guide/platforms/ios/index.md | 4 +-
docs/en/3.0.0/guide/platforms/ios/plugin.md | 49 +-
docs/en/3.0.0/guide/platforms/ios/upgrading.md | 799 ++++++++++++-------
docs/en/3.0.0/guide/platforms/ios/webview.md | 92 ++-
docs/en/3.0.0/guide/platforms/tizen/index.md | 4 +
docs/en/3.0.0/guide/platforms/win8/index.md | 8 +-
docs/en/3.0.0/guide/platforms/win8/tools.md | 4 +-
docs/en/3.0.0/guide/platforms/win8/upgrading.md | 11 +-
docs/en/3.0.0/guide/platforms/wp7/index.md | 13 +-
docs/en/3.0.0/guide/platforms/wp8/index.md | 16 +-
docs/en/3.0.0/guide/platforms/wp8/plugin.md | 43 +-
docs/en/3.0.0/guide/platforms/wp8/tools.md | 4 +-
docs/en/3.0.0/guide/platforms/wp8/upgrading.md | 253 ++++--
docs/en/3.0.0/index.md | 2 +-
docs/en/3.0.0/plugin_ref/spec.md | 69 +-
125 files changed, 3391 insertions(+), 1757 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/config_ref/index.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/config_ref/index.md b/docs/en/3.0.0/config_ref/index.md
index 51af63d..311a0ec 100644
--- a/docs/en/3.0.0/config_ref/index.md
+++ b/docs/en/3.0.0/config_ref/index.md
@@ -19,24 +19,26 @@ license: Licensed to the Apache Software Foundation (ASF) under one
# Configuration Reference
-You can set various application configuration parameters using a platform-agnostic configuration file, `config.xml`.
-This file is based on the W3C [Packaged Web Apps (Widgets)](http://www.w3.org/TR/widgets/) specification.
-
-The location of the `config.xml` file is different depending on the platform. The contents, in general, are not.
-
-## Platform-Specific Properties
-
-As with any abstraction layer, Apache Cordova cannot be a perfect silver bullet. As such, some native and platform-specific
-properties, characteristics and behaviours are encapsulated as much as possible as `<preference>` elements inside the
-`config.xml` file. The following sub-sections linked to are guides which go into more details about these preferences.
+Many aspects of an application's behavior can be controlled with a
+platform-agnostic configuration file, `config.xml`, which is formatted
+based on the W3C's
+[Packaged Web Apps (Widgets)](http://www.w3.org/TR/widgets/)
+specification.
+
+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 projects regenerates versions of
+this file in various subdirectories within `platforms`. For non-CLI
+projects, each platform-specific file serves as a source.
+
+While the location of the `config.xml` file may change depending on
+the platform, its contents generally do not. Some platform-specific
+features are also specified in the same configuration file. Details
+are listed below:
- iOS Configuration
- Android Configuration
- BlackBerry Configuration
-- Windows Phone 7 Configuration
-- Windows Phone 8 Configuration
-- Windows 8 Configuration
-- FirefoxOS Configuration
## config.xml Elements
@@ -49,22 +51,19 @@ An example:
<widget>
<preference name="MySetting" value="true" />
- <plugins>
- <plugin name="MyPlugin" value="MyPluginClass" />
- </plugins>
+ <feature name="MyPlugin" value="MyPluginClass" />
<access origin="*" />
<content src="index.html" />
</widget>
A list of supported elements across major platforms which are supported in Apache Cordova follow.
-### `<plugin>`
+### `<feature>`
These elements map to native APIs that the application accesses. At
-runtime, the Apache Cordova framework checks the `<plugin>` elements
-and maps them to native code to enable your Cordova application to
-access device APIs otherwise unavailable to typical web-based
-applications.
+runtime, the Apache Cordova framework maps `<feature>` elements to
+native code to enable your Cordova application to access device APIs
+otherwise unavailable to typical web-based applications.
### `<access>`
@@ -74,5 +73,5 @@ Domain Whitelist Guide for more information.
### `<content>`
This element defines your application's start page relative to the
-project's standard web assets root folder. This element is optional,
+project's standard web assets root directory. This element is optional,
the default is `index.html`.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/accelerometer/accelerometer.getCurrentAcceleration.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/accelerometer/accelerometer.getCurrentAcceleration.md b/docs/en/3.0.0/cordova/accelerometer/accelerometer.getCurrentAcceleration.md
index 22cb2c8..c623b95 100644
--- a/docs/en/3.0.0/cordova/accelerometer/accelerometer.getCurrentAcceleration.md
+++ b/docs/en/3.0.0/cordova/accelerometer/accelerometer.getCurrentAcceleration.md
@@ -108,5 +108,7 @@ 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/3fb6feae/docs/en/3.0.0/cordova/accelerometer/accelerometer.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/accelerometer/accelerometer.md b/docs/en/3.0.0/cordova/accelerometer/accelerometer.md
index 31d6012..820a021 100644
--- a/docs/en/3.0.0/cordova/accelerometer/accelerometer.md
+++ b/docs/en/3.0.0/cordova/accelerometer/accelerometer.md
@@ -41,42 +41,48 @@ Objects (Read-Only)
- Acceleration
-Permissions
------------
+## Accessing the Feature
-### Android
+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:
-#### app/res/xml/config.xml
+ $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion.git
+ $ cordova plugin rm org.apache.cordova.core.device-motion
- <plugin name="Accelerometer" value="org.apache.cordova.AccelListener" />
+These commands apply to all targeted platforms, but modify the
+platform-specific configuration settings described below:
-### BlackBerry WebWorks
+* Android (in `app/res/xml/config.xml`)
-#### www/plugins.xml
+ <feature name="Accelerometer">
+ <param name="android-package" value="org.apache.cordova.AccelListener" />
+ </feature>
- <plugin name="Accelerometer" value="org.apache.cordova.accelerometer.Accelerometer" />
+* BlackBerry WebWorks
-#### www/config.xml
+ (in www/plugins.xml)
+ <feature name="Accelerometer">
+ <param name="blackberry-package" value="org.apache.cordova.accelerometer.Accelerometer" />
+ </feature>
- <feature id="blackberry.system" required="true" version="1.0.0.0" />
- <feature id="org.apache.cordova" required="true" version="1.0.0" />
+ (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
+* iOS (in `config.xml`)
-#### config.xml
+ <feature name="Accelerometer">
+ <param name="ios-package" value="CDVAccelerometer" />
+ </feature>
- <plugin name="Accelerometer" value="CDVAccelerometer" />
+* Windows Phone (in `Properties/WPAppManifest.xml`)
-### Windows Phone
+ <Capabilities>
+ <Capability Name="ID_CAP_SENSORS" />
+ </Capabilities>
-#### Properties/WPAppManifest.xml
+ Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
- <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)
-
-### Tizen
-
- No permissions are required.
+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/3fb6feae/docs/en/3.0.0/cordova/camera/camera.getPicture.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/camera/camera.getPicture.md b/docs/en/3.0.0/cordova/camera/camera.getPicture.md
index c8f65bf..8e2f8cd 100644
--- a/docs/en/3.0.0/cordova/camera/camera.getPicture.md
+++ b/docs/en/3.0.0/cordova/camera/camera.getPicture.md
@@ -49,13 +49,16 @@ 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
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/camera/camera.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/camera/camera.md b/docs/en/3.0.0/cordova/camera/camera.md
index 9b100e4..3e944c8 100644
--- a/docs/en/3.0.0/cordova/camera/camera.md
+++ b/docs/en/3.0.0/cordova/camera/camera.md
@@ -30,55 +30,63 @@ Methods
- camera.getPicture
- camera.cleanup
-Permissions
------------
+## Accessing the Feature
-### Android
+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:
-#### app/res/xml/config.xml
+ $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
+ $ cordova plugin rm org.apache.cordova.core.camera
- <plugin name="Camera" value="org.apache.cordova.CameraLauncher" />
+These commands apply to all targeted platforms, but modify the
+platform-specific configuration settings described below:
-#### app/AndroidManifest
+* Android
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+ (in app/res/xml/config.xml)
+ <feature name="Camera">
+ <param name="android-package" value="org.apache.cordova.CameraLauncher" />
+ </feature>
-### BlackBerry WebWorks
+ (in app/AndroidManifest)
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-#### www/plugins.xml
+* BlackBerry WebWorks
- <plugin name="Camera" value="org.apache.cordova.camera.Camera" />
+ (in www/plugins.xml)
+ <feature name="Camera">
+ <param name="blackberry-package" value="org.apache.cordova.camera.Camera" />
+ </feature>
-#### www/config.xml
+ (in www/config.xml)
+ <feature id="blackberry.media.camera" />
- <feature id="blackberry.media.camera" />
+ <rim:permissions>
+ <rim:permit>use_camera</rim:permit>
+ </rim:permissions>
- <rim:permissions>
- <rim:permit>use_camera</rim:permit>
- </rim:permissions>
+* iOS (in `config.xml`)
-### iOS
+ <feature name="Camera">
+ <param name="ios-package" value="CDVCamera" />
+ </feature>
-#### config.xml
+* Windows Phone (in `Properties/WPAppManifest.xml`)
- <plugin name="Camera" value="CDVCamera" />
+ <Capabilities>
+ <Capability Name="ID_CAP_ISV_CAMERA" />
+ <Capability Name="ID_HW_FRONTCAMERA" />
+ </Capabilities>
-### Windows Phone
+ Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
-#### Properties/WPAppManifest.xml
+* Tizen (in `config.xml`)
- <Capabilities>
- <Capability Name="ID_CAP_ISV_CAMERA" />
- <Capability Name="ID_HW_FRONTCAMERA" />
- </Capabilities>
+ <feature name="http://tizen.org/api/application" required="true"/>
+ <feature name="http://tizen.org/api/application.launch" required="true"/>
-Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
+ 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)
-### Tizen
-
-#### 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/3fb6feae/docs/en/3.0.0/cordova/camera/parameter/CameraPopoverHandle.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/camera/parameter/CameraPopoverHandle.md b/docs/en/3.0.0/cordova/camera/parameter/CameraPopoverHandle.md
index ff5a9dd..c8e07d2 100644
--- a/docs/en/3.0.0/cordova/camera/parameter/CameraPopoverHandle.md
+++ b/docs/en/3.0.0/cordova/camera/parameter/CameraPopoverHandle.md
@@ -38,6 +38,7 @@ setPosition
Set the position of the popover.
__Parameters:__
+
- `cameraPopoverOptions`: the `CameraPopoverOptions` that specify the new position
Quick Example
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/camera/parameter/cameraOptions.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/camera/parameter/cameraOptions.md b/docs/en/3.0.0/cordova/camera/parameter/cameraOptions.md
index a3a7542..f428459 100644
--- a/docs/en/3.0.0/cordova/camera/parameter/cameraOptions.md
+++ b/docs/en/3.0.0/cordova/camera/parameter/cameraOptions.md
@@ -63,6 +63,7 @@ Options
};
- __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)_
@@ -74,8 +75,11 @@ Options
};
- __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 = {
@@ -87,34 +91,47 @@ Android Quirks
--------------
- 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/3fb6feae/docs/en/3.0.0/cordova/compass/compass.clearWatch.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/compass/compass.clearWatch.md b/docs/en/3.0.0/cordova/compass/compass.clearWatch.md
index dd70cc5..831ca87 100755
--- a/docs/en/3.0.0/cordova/compass/compass.clearWatch.md
+++ b/docs/en/3.0.0/cordova/compass/compass.clearWatch.md
@@ -30,9 +30,10 @@ Supported Platforms
-------------------
- Android
+- BlackBerry 10
- iOS
- Tizen
-- Windows Phone 7 and 8 ( if available in hardware )
+- Windows Phone 7 and 8 (if available in hardware)
- Windows 8
Quick Example
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/compass/compass.getCurrentHeading.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/compass/compass.getCurrentHeading.md b/docs/en/3.0.0/cordova/compass/compass.getCurrentHeading.md
index 8ce3f5e..9678c66 100755
--- a/docs/en/3.0.0/cordova/compass/compass.getCurrentHeading.md
+++ b/docs/en/3.0.0/cordova/compass/compass.getCurrentHeading.md
@@ -38,9 +38,10 @@ Supported Platforms
-------------------
- Android
+- BlackBerry 10
- iOS
- Tizen
-- Windows Phone 7 and 8 ( if available in hardware )
+- Windows Phone 7 and 8 (if available in hardware)
- Windows 8
Quick Example
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/compass/compass.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/compass/compass.md b/docs/en/3.0.0/cordova/compass/compass.md
index 43ca2bc..fd59c2e 100755
--- a/docs/en/3.0.0/cordova/compass/compass.md
+++ b/docs/en/3.0.0/cordova/compass/compass.md
@@ -39,35 +39,37 @@ Arguments
- compassOptions
- compassHeading
-Permissions
------------
+## Accessing the Feature
-### Android
+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:
-#### app/res/xml/config.xml
+ $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation.git
+ $ cordova plugin rm org.apache.cordova.core.device-orientation
- <plugin name="Compass" value="org.apache.cordova.CompassListener" />
+These commands apply to all targeted platforms, but modify the
+platform-specific configuration settings described below:
-### BlackBerry WebWorks
+* Android (in `app/res/xml/config.xml`)
- No permissions are required.
+ <feature name="Compass">
+ <param name="android-package" value="org.apache.cordova.CompassListener" />
+ </feature>
-### iOS
+* iOS (in `config.xml`)
-#### config.xml
+ <feature name="Compass">
+ <param name="ios-package" value="CDVLocation" />
+ </feature>
- <plugin name="Compass" value="CDVLocation" />
+* Windows Phone (in `Properties/WPAppManifest.xml`)
-### Windows Phone
+ <Capabilities>
+ <Capability Name="ID_CAP_SENSORS" />
+ </Capabilities>
-#### Properties/WPAppManifest.xml
+ Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
- <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)
-
-### Tizen
-
- No permissions are required.
+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/3fb6feae/docs/en/3.0.0/cordova/compass/compass.watchHeading.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/compass/compass.watchHeading.md b/docs/en/3.0.0/cordova/compass/compass.watchHeading.md
index 5f2c8b0..f88c82d 100755
--- a/docs/en/3.0.0/cordova/compass/compass.watchHeading.md
+++ b/docs/en/3.0.0/cordova/compass/compass.watchHeading.md
@@ -44,6 +44,7 @@ Supported Platforms
-------------------
- Android
+- BlackBerry 10
- iOS
- Tizen
- Windows Phone 7 and 8 (if available in hardware)
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/compass/parameters/compassHeading.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/compass/parameters/compassHeading.md b/docs/en/3.0.0/cordova/compass/parameters/compassHeading.md
index 7e541b1..bcf1c25 100644
--- a/docs/en/3.0.0/cordova/compass/parameters/compassHeading.md
+++ b/docs/en/3.0.0/cordova/compass/parameters/compassHeading.md
@@ -25,9 +25,12 @@ A `CompassHeading` object is returned to the `compassSuccess` callback function.
Properties
----------
-- __magneticHeading__: The heading in degrees from 0 - 359.99 at a single moment in time. _(Number)_
-- __trueHeading__: The heading relative to the geographic North Pole in degrees 0 - 359.99 at a single moment in time. A negative value indicates that the true heading cannot be determined. _(Number)_
+- __magneticHeading__: The heading in degrees from 0-359.99 at a single moment in time. _(Number)_
+
+- __trueHeading__: The heading relative to the geographic North Pole in degrees 0-359.99 at a single moment in time. A negative value indicates that the true heading cannot be determined. _(Number)_
+
- __headingAccuracy__: The deviation in degrees between the reported heading and the true heading. _(Number)_
+
- __timestamp__: The time at which this heading was determined. _(milliseconds)_
Description
@@ -37,11 +40,14 @@ The `CompassHeading` object is returned to the `compassSuccess` callback functio
Android Quirks
--------------
+
- `trueHeading` is not supported, but reports the same value as `magneticHeading`
+
- `headingAccuracy` is always 0 because there is no difference between the `magneticHeading` and `trueHeading`.
iOS Quirks
----------
- `trueHeading` is only returned when location services are enabled via `navigator.geolocation.watchLocation()`
+
- For iOS 4 devices and above, heading factors in the device's current orientation, not in reference to its absolute position, for apps that supports that orientation.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/compass/parameters/compassOptions.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/compass/parameters/compassOptions.md b/docs/en/3.0.0/cordova/compass/parameters/compassOptions.md
index aed37ca..75f4922 100755
--- a/docs/en/3.0.0/cordova/compass/parameters/compassOptions.md
+++ b/docs/en/3.0.0/cordova/compass/parameters/compassOptions.md
@@ -26,16 +26,20 @@ Options
-------
- __frequency__: How often to retrieve the compass heading in milliseconds. _(Number)_ (Default: 100)
+
- __filter__: The change in degrees required to initiate a watchHeading success callback. _(Number)_
Android Quirks
______________
+
- `filter` is not supported.
Tizen Quirks
-----------
+
- `filter` is not supported.
Windows Phone 7 and 8 Quirks
--------------
+
- `filter` is not supported.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/connection/connection.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/connection/connection.md b/docs/en/3.0.0/cordova/connection/connection.md
index 8831dcf..f259d83 100644
--- a/docs/en/3.0.0/cordova/connection/connection.md
+++ b/docs/en/3.0.0/cordova/connection/connection.md
@@ -39,47 +39,56 @@ Constants
- Connection.CELL
- Connection.NONE
-Permissions
------------
+## Accessing the Feature
-### Android
+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:
-#### app/res/xml/config.xml
+ $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information.git
+ $ cordova plugin rm org.apache.cordova.core.network-information
- <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager" />
+These commands apply to all targeted platforms, but modify the
+platform-specific configuration settings described below:
-#### app/AndroidManifest.xml
+* Android
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+ (in app/res/xml/config.xml)
+ <feature name="NetworkStatus">
+ <param name="android-package" value="org.apache.cordova.NetworkManager" />
+ </feature>
-### BlackBerry WebWorks
+ (in app/AndroidManifest.xml)
+ <uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-#### www/plugins.xml
+* BlackBerry WebWorks
- <plugin name="Network Status" value="org.apache.cordova.network.Network" />
+ (in www/plugins.xml)
+ <feature name="Network Status">
+ <param name="blackberry-package" value="org.apache.cordova.network.Network" />
+ </feature>
-### iOS
+* iOS (in `config.xml`)
-#### config.xml
+ <feature name="NetworkStatus">
+ <param name="ios-package" value="CDVConnection" />
+ </feature>
- <plugin name="NetworkStatus" value="CDVConnection" />
+* Windows Phone (in `Properties/WPAppManifest.xml`)
-### Windows Phone
+ <Capabilities>
+ <Capability Name="ID_CAP_NETWORKING" />
+ </Capabilities>
-#### Properties/WPAppManifest.xml
+ Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
- <Capabilities>
- <Capability Name="ID_CAP_NETWORKING" />
- </Capabilities>
+* Tizen (in `config.xml`)
-Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
+ <feature name="http://tizen.org/api/systeminfo" required="true"/>
-### Tizen
+ 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)
-#### config.xml
-
- <feature name="http://tizen.org/api/systeminfo" 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/3fb6feae/docs/en/3.0.0/cordova/connection/connection.type.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/connection/connection.type.md b/docs/en/3.0.0/cordova/connection/connection.type.md
index 5a51756..c6de634 100644
--- a/docs/en/3.0.0/cordova/connection/connection.type.md
+++ b/docs/en/3.0.0/cordova/connection/connection.type.md
@@ -122,6 +122,7 @@ Windows Phone Quirks
--------------------
- When running in the emulator, always detects `navigator.connection.type` as `Connection.UNKNOWN`.
+
- Windows Phone cannot detect the type of cellular network connection.
- `navigator.connection.type` is set to `Connection.CELL` for all cellular data.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/contacts/Contact/contact.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/contacts/Contact/contact.md b/docs/en/3.0.0/cordova/contacts/Contact/contact.md
index 574912e..9e953f4 100644
--- a/docs/en/3.0.0/cordova/contacts/Contact/contact.md
+++ b/docs/en/3.0.0/cordova/contacts/Contact/contact.md
@@ -26,25 +26,40 @@ Properties
----------
- __id__: A globally unique identifier. _(DOMString)_
+
- __displayName__: The name of this Contact, suitable for display to end-users. _(DOMString)_
+
- __name__: An object containing all components of a persons name. _(ContactName)_
+
- __nickname__: A casual name by which to address the contact. _(DOMString)_
+
- __phoneNumbers__: An array of all the contact's phone numbers. _(ContactField[])_
+
- __emails__: An array of all the contact's email addresses. _(ContactField[])_
+
- __addresses__: An array of all the contact's addresses. _(ContactAddress[])_
+
- __ims__: An array of all the contact's IM addresses. _(ContactField[])_
+
- __organizations__: An array of all the contact's organizations. _(ContactOrganization[])_
+
- __birthday__: The birthday of the contact. _(Date)_
+
- __note__: A note about the contact. _(DOMString)_
+
- __photos__: An array of the contact's photos. _(ContactField[])_
+
- __categories__: An array of all the user-defined categories associated with the contact. _(ContactField[])_
+
- __urls__: An array of web pages associated with the contact. _(ContactField[])_
Methods
-------
- __clone__: Returns a new `Contact` object that is a deep copy of the calling object, with the `id` property set to `null`.
+
- __remove__: Removes the contact from the device contacts database, otherwise executes an error callback with a `ContactError` object.
+
- __save__: Saves a new contact to the device contacts database, or updates an existing contact if a contact with the same __id__ already exists.
Details
@@ -197,36 +212,58 @@ BlackBerry WebWorks (OS 5.0 and higher) Quirks
---------------------------------------------
- __id__: Supported. Assigned by the device when saving the contact.
+
- __displayName__: Supported. Stored in BlackBerry __user1__ field.
+
- __nickname__: Not supported, returning `null`.
+
- __phoneNumbers__: Partially supported. Phone numbers are stored in BlackBerry fields __homePhone1__ and __homePhone2__ if _type_ is 'home', __workPhone1__ and __workPhone2__ if _type_ is 'work', __mobilePhone__ if _type_ is 'mobile', __faxPhone__ if _type_ is 'fax', __pagerPhone__ if _type_ is 'pager', and __otherPhone__ if _type_ is none of the above.
+
- __emails__: Partially supported. The first three email addresses are stored in the BlackBerry __email1__, __email2__, and __email3__ fields, respectively.
+
- __addresses__: Partially supported. The first and second addresses are stored in the BlackBerry __homeAddress__ and __workAddress__ fields, respectively.
+
- __ims__: Not supported, returning `null`.
+
- __organizations__: Partially supported. The __name__ and __title__ of the first organization are stored in the BlackBerry __company__ and __title__ fields, respectively.
+
- __photos__: Partially supported. A single thumbnail-sized photo is supported. To set a contact's photo, pass in a either a base64-encoded image, or a URL pointing to the image. The image is scaled down before saving to the BlackBerry contacts database. The contact photo is returned as a base64-encoded image.
+
- __categories__: Partially supported. Only _Business_ and _Personal_ categories are supported.
+
- __urls__: Partially supported. The first URL is stored in BlackBerry __webpage__ field.
iOS Quirks
----------
- __displayName__: Not supported on iOS, returning `null` unless there is no `ContactName` specified, in which case it returns the composite name, __nickname__ or `""`, respectively.
+
- __birthday__: Must be input as a JavaScript `Date` object, the same way it is returned.
+
- __photos__: Returns a File URL to the image, which is stored in the application's temporary directory. Contents of the temporary directory are removed when the application exits.
+
- __categories__: This property is currently not supported, returning `null`.
Windows Phone 7 and 8 Quirks
-----------
- __displayName__: When creating a contact, the value provided for the display name parameter differs from the display name retrieved when finding the contact.
+
- __urls__: When creating a contact, users can input and save more than one web address, but only one is available is available when searching the contact.
+
- __phoneNumbers__: The _pref_ option is not supported. The _type_ is not supported in a _find_ operation. Only one `phoneNumber` is allowed for each _type_.
+
- __emails__: The _pref_ option is not supported. Home and personal references same email entry. Only one entry is allowed for each _type_.
+
- __addresses__: Supports only work, and home/personal _type_. The home and personal _type_ reference the same address entry. Only one entry is allowed for each _type_.
+
- __organizations__: Only one is allowed, and does not support the _pref_, _type_, and _department_ attributes.
+
- __note__: Not supported, returning `null`.
+
- __ims__: Not supported, returning `null`.
+
- __birthdays__: Not supported, returning `null`.
+
- __categories__: Not supported, returning `null`.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/contacts/ContactAddress/contactaddress.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/contacts/ContactAddress/contactaddress.md b/docs/en/3.0.0/cordova/contacts/ContactAddress/contactaddress.md
index 0258c55..f60ae07 100644
--- a/docs/en/3.0.0/cordova/contacts/ContactAddress/contactaddress.md
+++ b/docs/en/3.0.0/cordova/contacts/ContactAddress/contactaddress.md
@@ -26,12 +26,19 @@ Properties
----------
- __pref__: Set to `true` if this `ContactAddress` contains the user's preferred value. _(boolean)_
+
- __type__: A string indicating what type of field this is, _home_ for example. _(DOMString)_
+
- __formatted__: The full address formatted for display. _(DOMString)_
+
- __streetAddress__: The full street address. _(DOMString)_
+
- __locality__: The city or locality. _(DOMString)_
+
- __region__: The state or region. _(DOMString)_
+
- __postalCode__: The zip code or postal code. _(DOMString)_
+
- __country__: The country name. _(DOMString)_
Details
@@ -144,17 +151,27 @@ Android 2.X Quirks
BlackBerry WebWorks (OS 5.0 and higher) Quirks
--------------------------------------------
+
- __pref__: Not supported on BlackBerry devices, returning `false`.
+
- __type__: Partially supported. Only one each of _Work_ and _Home_ type addresses can be stored per contact.
+
- __formatted__: Partially supported. Returns a concatenation of all BlackBerry address fields.
+
- __streetAddress__: Supported. Returns a concatenation of BlackBerry __address1__ and __address2__ address fields.
+
- __locality__: Supported. Stored in BlackBerry __city__ address field.
+
- __region__: Supported. Stored in BlackBerry __stateProvince__ address field.
+
- __postalCode__: Supported. Stored in BlackBerry __zipPostal__ address field.
+
- __country__: Supported.
iOS Quirks
----------
+
- __pref__: Not supported on iOS devices, returning `false`.
+
- __formatted__: Currently not supported.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/contacts/ContactField/contactfield.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/contacts/ContactField/contactfield.md b/docs/en/3.0.0/cordova/contacts/ContactField/contactfield.md
index 2bb0f38..6507146 100644
--- a/docs/en/3.0.0/cordova/contacts/ContactField/contactfield.md
+++ b/docs/en/3.0.0/cordova/contacts/ContactField/contactfield.md
@@ -28,7 +28,9 @@ Properties
----------
- __type__: A string that indicates what type of field this is, _home_ for example. _(DOMString)_
+
- __value__: The value of the field, such as a phone number or email address. _(DOMString)_
+
- __pref__: Set to `true` if this `ContactField` contains the user's preferred value. _(boolean)_
Details
@@ -150,10 +152,13 @@ BlackBerry WebWorks (OS 5.0 and higher) Quirks
--------------------------------------------
- __type__: Partially supported. Used for phone numbers.
+
- __value__: Supported.
+
- __pref__: Not supported, returning `false`.
iOS Quirks
-----------
+
- __pref__: Not supported, returning `false`.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/contacts/ContactFindOptions/contactfindoptions.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/contacts/ContactFindOptions/contactfindoptions.md b/docs/en/3.0.0/cordova/contacts/ContactFindOptions/contactfindoptions.md
index 5a027f5..7cd76dc 100644
--- a/docs/en/3.0.0/cordova/contacts/ContactFindOptions/contactfindoptions.md
+++ b/docs/en/3.0.0/cordova/contacts/ContactFindOptions/contactfindoptions.md
@@ -26,6 +26,7 @@ Properties
----------
- __filter__: The search string used to find contacts. _(DOMString)_ (Default: `""`)
+
- __multiple__: Determines if the find operation returns multiple contacts. _(Boolean)_ (Default: false)
Supported Platforms
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/contacts/ContactName/contactname.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/contacts/ContactName/contactname.md b/docs/en/3.0.0/cordova/contacts/ContactName/contactname.md
index 85751d9..9dc6c70 100644
--- a/docs/en/3.0.0/cordova/contacts/ContactName/contactname.md
+++ b/docs/en/3.0.0/cordova/contacts/ContactName/contactname.md
@@ -26,10 +26,15 @@ Properties
----------
- __formatted__: The complete name of the contact. _(DOMString)_
+
- __familyName__: The contact's family name. _(DOMString)_
+
- __givenName__: The contact's given name. _(DOMString)_
+
- __middleName__: The contact's middle name. _(DOMString)_
+
- __honorificPrefix__: The contact's prefix (example _Mr._ or _Dr._) _(DOMString)_
+
- __honorificSuffix__: The contact's suffix (example _Esq._). _(DOMString)_
Details
@@ -129,10 +134,15 @@ BlackBerry WebWorks (OS 5.0 and higher) Quirks
---------------------------------------------
- __formatted__: Partially supported. Returns a concatenation of BlackBerry __firstName__ and __lastName__ fields.
+
- __familyName__: Supported. Stored in BlackBerry __lastName__ field.
+
- __givenName__: Supported. Stored in BlackBerry __firstName__ field.
+
- __middleName__: Not supported, returning `null`.
+
- __honorificPrefix__: Not supported, returning `null`.
+
- __honorificSuffix__: Not supported, returning `null`.
iOS Quirks
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/contacts/ContactOrganization/contactorganization.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/contacts/ContactOrganization/contactorganization.md b/docs/en/3.0.0/cordova/contacts/ContactOrganization/contactorganization.md
index 0e2dba7..76f7b86 100644
--- a/docs/en/3.0.0/cordova/contacts/ContactOrganization/contactorganization.md
+++ b/docs/en/3.0.0/cordova/contacts/ContactOrganization/contactorganization.md
@@ -26,9 +26,13 @@ Properties
----------
- __pref__: Set to `true` if this `ContactOrganization` contains the user's preferred value. _(boolean)_
+
- __type__: A string that indicates what type of field this is, _home_ for example. _(DOMString)
+
- __name__: The name of the organization. _(DOMString)_
+
- __department__: The department the contract works for. _(DOMString)_
+
- __title__: The contact's title at the organization. _(DOMString)_
Details
@@ -123,7 +127,6 @@ Full Example
</body>
</html>
-
Android 2.X Quirks
------------------
@@ -131,17 +134,27 @@ Android 2.X Quirks
BlackBerry WebWorks (OS 5.0 and higher) Quirks
--------------------------------------------
+
- __pref__: Not supported by BlackBerry devices, returning `false`.
+
- __type__: Not supported by BlackBerry devices, returning `null`.
+
- __name__: Partially supported. The first organization name is stored in the BlackBerry __company__ field.
+
- __department__: Not supported, returning `null`.
+
- __title__: Partially supported. The first organization title is stored in the BlackBerry __jobTitle__ field.
iOS Quirks
-----------
+
- __pref__: Not supported on iOS devices, returning `false`.
+
- __type__: Not supported on iOS devices, returning `null`.
+
- __name__: Partially supported. The first organization name is stored in the iOS __kABPersonOrganizationProperty__ field.
+
- __department__: Partially supported. The first department name is stored in the iOS __kABPersonDepartmentProperty__ field.
+
- __title__: Partially supported. The first title is stored in the iOS __kABPersonJobTitleProperty__ field.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/contacts/contacts.create.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/contacts/contacts.create.md b/docs/en/3.0.0/cordova/contacts/contacts.create.md
index 93be1aa..aab67d3 100644
--- a/docs/en/3.0.0/cordova/contacts/contacts.create.md
+++ b/docs/en/3.0.0/cordova/contacts/contacts.create.md
@@ -68,7 +68,6 @@ Full Example
console.log("The contact, " + myContact.displayName + ", note: " + myContact.note);
}
-
</script>
</head>
<body>
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/contacts/contacts.find.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/contacts/contacts.find.md b/docs/en/3.0.0/cordova/contacts/contacts.find.md
index 9976f46..ed0129e 100644
--- a/docs/en/3.0.0/cordova/contacts/contacts.find.md
+++ b/docs/en/3.0.0/cordova/contacts/contacts.find.md
@@ -50,8 +50,11 @@ Parameters
----------
- __contactFields__: Contact fields to use as a search qualifier. The resulting `Contact` object only features values for these fields. _(DOMString[])_ [Required]
+
- __contactSuccess__: Success callback function invoked with the contacts returned from the database. [Required]
+
- __contactError__: Error callback function, invoked when an error occurs. [Optional]
+
- __contactFindOptions__: Search options to filter contacts. [Optional]
Supported Platforms
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/contacts/contacts.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/contacts/contacts.md b/docs/en/3.0.0/cordova/contacts/contacts.md
index ec50fd7..9bfb848 100644
--- a/docs/en/3.0.0/cordova/contacts/contacts.md
+++ b/docs/en/3.0.0/cordova/contacts/contacts.md
@@ -49,46 +49,57 @@ Objects
- ContactFindOptions
- ContactError
-Permissions
------------
+## Accessing the Feature
-### Android
+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:
-#### app/res/xml/config.xml
+ $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts.git
+ $ cordova plugin rm org.apache.cordova.core.contacts
- <plugin name="Contacts" value="org.apache.cordova.ContactManager" />
+These commands apply to all targeted platforms, but modify the
+platform-specific configuration settings described below:
-#### app/AndroidManifest.xml
+* Android
- <uses-permission android:name="android.permission.GET_ACCOUNTS" />
- <uses-permission android:name="android.permission.READ_CONTACTS" />
- <uses-permission android:name="android.permission.WRITE_CONTACTS" />
+ (in app/res/xml/config.xml)
+ <feature name="Contacts">
+ <param name="android-package" value="org.apache.cordova.ContactManager" />
+ </feature>
-### BlackBerry WebWorks
+ (in app/AndroidManifest.xml)
+ <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+ <uses-permission android:name="android.permission.READ_CONTACTS" />
+ <uses-permission android:name="android.permission.WRITE_CONTACTS" />
-#### www/plugins.xml
+* BlackBerry WebWorks
- <plugin name="Contact" value="org.apache.cordova.pim.Contact" />
+ (in www/plugins.xml)
+ <feature name="Contact">
+ <param name="blackberry-package" value="org.apache.cordova.pim.Contact" />
+ </feature>
-#### www/config.xml
+ (in www/config.xml)
+ <feature id="blackberry.find" required="true" version="1.0.0.0" />
+ <feature id="blackberry.identity" required="true" version="1.0.0.0" />
+ <feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
+ <feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
- <feature id="blackberry.find" required="true" version="1.0.0.0" />
- <feature id="blackberry.identity" required="true" version="1.0.0.0" />
- <feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
- <feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
+* iOS (in `config.xml`)
-### iOS
+ <feature name="Contacts">
+ <param name="ios-package" value="CDVContacts" />
+ </feature>
-#### config.xml
+* Windows Phone
- <plugin name="Contacts" value="CDVContacts" />
+ (in Properties/WPAppManifest.xml)
+ <Capabilities>
+ <Capability Name="ID_CAP_CONTACTS" />
+ </Capabilities>
-### Windows Phone
+ Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
-#### Properties/WPAppManifest.xml
-
- <Capabilities>
- <Capability Name="ID_CAP_CONTACTS" />
- </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/3fb6feae/docs/en/3.0.0/cordova/contacts/parameters/contactFindOptions.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/contacts/parameters/contactFindOptions.md b/docs/en/3.0.0/cordova/contacts/parameters/contactFindOptions.md
index 758531c..65ef9d7 100644
--- a/docs/en/3.0.0/cordova/contacts/parameters/contactFindOptions.md
+++ b/docs/en/3.0.0/cordova/contacts/parameters/contactFindOptions.md
@@ -32,4 +32,5 @@ Options
-------
- __filter__: The search string used to filter contacts. _(DOMString)_ (Default: `""`)
+
- __multiple__: Determines if the find operation returns multiple contacts. _(Boolean)_ (Default: `false`)
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/device/device.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/device/device.md b/docs/en/3.0.0/cordova/device/device.md
index 38abb0c..0c9e5f0 100644
--- a/docs/en/3.0.0/cordova/device/device.md
+++ b/docs/en/3.0.0/cordova/device/device.md
@@ -41,52 +41,56 @@ Since `device` is assigned to the `window` object, it is implicitly in the globa
var phoneName = window.device.name;
var phoneName = device.name;
-Permissions
------------
+## Accessing the Feature
-### Android
+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:
-#### app/res/xml/config.xml
+ $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
+ $ cordova plugin rm org.apache.cordova.core.device
- <plugin name="Device" value="org.apache.cordova.Device" />
+These commands apply to all targeted platforms, but modify the
+platform-specific configuration settings described below:
-#### app/AndroidManifest.xml
+* Android
- <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+ (in app/res/xml/config.xml)
+ <feature name="Device">
+ <param name="android-package" value="org.apache.cordova.Device" />
+ </feature>
-### BlackBerry WebWorks
+ (in app/AndroidManifest.xml)
+ <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-#### www/plugins.xml
+* BlackBerry WebWorks
- <plugin name="Device" value="org.apache.cordova.device.Device" />
+ (in www/plugins.xml)
+ <feature name="Device">
+ <param name="blackberry-package" value="org.apache.cordova.device.Device" />
+ </feature>
-#### www/config.xml
+ (in www/config.xml)
+ <feature id="blackberry.app" required="true" version="1.0.0.0" />
+ <rim:permissions>
+ <rim:permit>read_device_identifying_information</rim:permit>
+ </rim:permissions>
- <feature id="blackberry.app" required="true" version="1.0.0.0" />
- <rim:permissions>
- <rim:permit>read_device_identifying_information</rim:permit>
- </rim:permissions>
+* Windows Phone (in `Properties/WPAppManifest.xml`)
-### iOS
+ <Capabilities>
+ <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
+ <Capability Name="ID_CAP_IDENTITY_DEVICE" />
+ <Capability Name="ID_CAP_IDENTITY_USER" />
+ </Capabilities>
- No permissions are required.
+ Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
-### Windows Phone
+* Tizen (in `config.xml`)
-#### Properties/WPAppManifest.xml
+ <feature name="http://tizen.org/api/systeminfo" required="true"/>
- <Capabilities>
- <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
- <Capability Name="ID_CAP_IDENTITY_DEVICE" />
- <Capability Name="ID_CAP_IDENTITY_USER" />
- </Capabilities>
+ 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)
-Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
-
-### Tizen
-
-#### config.xml
-
- <feature name="http://tizen.org/api/systeminfo" 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/3fb6feae/docs/en/3.0.0/cordova/device/device.model.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/device/device.model.md b/docs/en/3.0.0/cordova/device/device.model.md
index 9ebd1d9..6073fa4 100644
--- a/docs/en/3.0.0/cordova/device/device.model.md
+++ b/docs/en/3.0.0/cordova/device/device.model.md
@@ -92,6 +92,7 @@ Android Quirks
Tizen Quirks
-----------
+
- Returns the device model assigned by the vendor, for example, `TIZEN`
Windows Phone 7 and 8 Quirks
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/device/device.name.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/device/device.name.md b/docs/en/3.0.0/cordova/device/device.name.md
index 1f75f27..73a9fe4 100644
--- a/docs/en/3.0.0/cordova/device/device.name.md
+++ b/docs/en/3.0.0/cordova/device/device.name.md
@@ -97,7 +97,7 @@ Windows Phone 7 and 8 Quirks
- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`.
-
Tizen Quirks
-----------
+
- Returns the device model assigned by the vendor, for example, `TIZEN`
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/events/events.backbutton.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/events/events.backbutton.md b/docs/en/3.0.0/cordova/events/events.backbutton.md
index ce99243..346ef95 100644
--- a/docs/en/3.0.0/cordova/events/events.backbutton.md
+++ b/docs/en/3.0.0/cordova/events/events.backbutton.md
@@ -60,7 +60,6 @@ Full Example
<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
//
function onLoad() {
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/events/events.batterycritical.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/events/events.batterycritical.md b/docs/en/3.0.0/cordova/events/events.batterycritical.md
index ff79908..c229ec0 100644
--- a/docs/en/3.0.0/cordova/events/events.batterycritical.md
+++ b/docs/en/3.0.0/cordova/events/events.batterycritical.md
@@ -35,6 +35,7 @@ The `batterycritical` handler is passed an object that contains two
properties:
- __level__: The percentage of battery charge (0-100). _(Number)_
+
- __isPlugged__: A boolean that indicates whether the device is plugged in. _(Boolean)_
Applications typically should use `window.addEventListener` to attach
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/events/events.batterylow.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/events/events.batterylow.md b/docs/en/3.0.0/cordova/events/events.batterylow.md
index 5147e05..24af3b6 100644
--- a/docs/en/3.0.0/cordova/events/events.batterylow.md
+++ b/docs/en/3.0.0/cordova/events/events.batterylow.md
@@ -34,6 +34,7 @@ The `batterylow` handler is passed an object that contains two
properties:
- __level__: The percentage of battery charge (0-100). _(Number)_
+
- __isPlugged__: A boolean that indicates whether the device is plugged in. _(Boolean)_
Applications typically should use `document.addEventListener` to
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/events/events.batterystatus.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/events/events.batterystatus.md b/docs/en/3.0.0/cordova/events/events.batterystatus.md
index 7904f2e..2d38a20 100644
--- a/docs/en/3.0.0/cordova/events/events.batterystatus.md
+++ b/docs/en/3.0.0/cordova/events/events.batterystatus.md
@@ -34,6 +34,7 @@ The battery status handler is passed an object that contains two
properties:
- __level__: The percentage of battery charge (0-100). _(Number)_
+
- __isPlugged__: A boolean that indicates whether the device is plugged in. _(Boolean)_
Applications typically should use `window.addEventListener` to
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/events/events.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/events/events.md b/docs/en/3.0.0/cordova/events/events.md
index bdecd16..e159ba8 100644
--- a/docs/en/3.0.0/cordova/events/events.md
+++ b/docs/en/3.0.0/cordova/events/events.md
@@ -41,45 +41,53 @@ Event Types
- volumedownbutton
- volumeupbutton
-Permissions
------------
-
-### Android
-
-#### app/res/xml/config.xml
-
- <plugin name="Battery" value="org.apache.cordova.BatteryListener" />
-
-#### app/AndroidManifest.xml
+## Accessing the Feature
- <uses-permission android:name="android.permission.BROADCAST_STICKY" />
+As of version 3.0, Cordova implements battery status and other
+device-level APIs as _plugins_. Access to all other events not related
+to battery status are enabled by default. Use the CLI's `plugin`
+command, described in The Command-line Interface, to enable or disable
+battery events:
-### BlackBerry WebWorks
+ $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status.git
+ $ cordova plugin rm org.apache.cordova.core.battery-status
-#### www/plugins.xml
+These commands apply to all targeted platforms, but modify the
+platform-specific configuration settings described below:
- <plugin name="Battery" value="org.apache.cordova.battery.Battery" />
+* Android
-#### www/config.xml
+ (in app/res/xml/config.xml)
+ <feature name="Battery">
+ <param name="android-package" value="org.apache.cordova.BatteryListener" />
+ </feature>
- <feature id="blackberry.app" required="true" version="1.0.0.0" />
- <feature id="blackberry.app.event" required="true" version="1.0.0.0" />
- <feature id="blackberry.system.event" required="true" version="1.0.0.0" />
+ (in app/AndroidManifest.xml)
+ <uses-permission android:name="android.permission.BROADCAST_STICKY" />
-### iOS
+* BlackBerry WebWorks
-#### config.xml
+ (in www/plugins.xml)
+ <feature name="Battery">
+ <param name="blackberry-package" value="org.apache.cordova.battery.Battery" />
+ </feature>
- <plugin name="Battery" value="CDVBattery" />
+ (in www/config.xml)
+ <feature id="blackberry.app" required="true" version="1.0.0.0" />
+ <feature id="blackberry.app.event" required="true" version="1.0.0.0" />
+ <feature id="blackberry.system.event" required="true" version="1.0.0.0" />
-### Windows Phone
+* iOS (in `config.xml`)
- No permissions are required.
+ <feature name="Battery">
+ <param name="ios-package" value="CDVBattery" />
+ </feature>
-### Tizen
+* Tizen (in `config.xml`)
-#### config.xml
+ <feature name="http://tizen.org/api/systeminfo" required="true"/>
- <feature name="http://tizen.org/api/systeminfo" 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)
-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/3fb6feae/docs/en/3.0.0/cordova/events/events.pause.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/events/events.pause.md b/docs/en/3.0.0/cordova/events/events.pause.md
index 2559e89..3cf7e30 100644
--- a/docs/en/3.0.0/cordova/events/events.pause.md
+++ b/docs/en/3.0.0/cordova/events/events.pause.md
@@ -27,7 +27,6 @@ The event fires when an application is put into the background.
Details
-------
-
The `pause` event fires when the native platform puts the application
into the background, typically when the user switches to a different
application.
@@ -91,7 +90,7 @@ iOS Quirks
--------------------------
In the `pause` handler, any calls to the Cordova API or to native
-plug-ins that go through Objective-C do not work, along with any
+plugins that go through Objective-C do not work, along with any
interactive calls, such as alerts or `console.log()`. They are only
processed when the app resumes, on the next run loop.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/file/directoryentry/directoryentry.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/file/directoryentry/directoryentry.md b/docs/en/3.0.0/cordova/file/directoryentry/directoryentry.md
index e21aa5f..cb4c6e6 100644
--- a/docs/en/3.0.0/cordova/file/directoryentry/directoryentry.md
+++ b/docs/en/3.0.0/cordova/file/directoryentry/directoryentry.md
@@ -28,8 +28,11 @@ Properties
----------
- __isFile__: Always false. _(boolean)_
+
- __isDirectory__: Always true. _(boolean)_
+
- __name__: The name of the `DirectoryEntry`, excluding the path leading to it. _(DOMString)_
+
- __fullPath__: The full absolute path from the root to the `DirectoryEntry`. _(DOMString)_
__NOTE:__ The following attribute is defined by the W3C specification,
@@ -43,15 +46,25 @@ Methods
The following methods can be invoked on a `DirectoryEntry` object:
- __getMetadata__: Look up metadata about a directory.
+
- __setMetadata__: Set metadata on a directory.
+
- __moveTo__: Move a directory to a different location on the file system.
+
- __copyTo__: Copy a directory to a different location on the file system.
+
- __toURL__: Return a URL to help locate a directory.
+
- __remove__: Delete a directory. The directory must be empty.
+
- __getParent__: Look up the parent directory.
+
- __createReader__: Create a new `DirectoryReader` that can read entries from a directory.
+
- __getDirectory__: Create or look up a directory.
+
- __getFile__: Create or look up a file.
+
- __removeRecursively__: Delete a directory and all of its contents.
Supported Platforms
@@ -71,6 +84,7 @@ Look up metadata about a directory.
__Parameters:__
- __successCallback__: A callback function to execute with a `Metadata` object. _(Function)_
+
- __errorCallback__: A callback function to execute if an error occurs when retrieving the `Metadata`. Invoked with a `FileError` object. _(Function)_
__Quick Example__
@@ -89,13 +103,15 @@ __Quick Example__
setMetadata
----------------
-Set metadata on a directory.
-__Currently works only on iOS.__ - this will set the extended attributes of a directory.
+Sets a directory's extended attributes, or metadata. _Currently works
+only on iOS._
__Parameters:__
- __successCallback__: A callback that executes when the metadata is successfully set. _(Function)_
+
- __errorCallback__: A callback that executes when the metadata fails to be set. _(Function)_
+
- __metadataObject__: An object that contains the metadata's keys and values. _(Object)_
__Quick Example__
@@ -119,31 +135,31 @@ __Quick Example__
function setFolderMetadata(localFileSystem, subFolder, metadataKey, metadataValue)
{
- var onSetMetadataWin = function() {
- console.log("success setting metadata")
- }
+ var onSetMetadataWin = function() {
+ console.log("success setting metadata")
+ }
var onSetMetadataFail = function() {
- console.log("error setting metadata")
+ console.log("error setting metadata")
}
- var onGetDirectoryWin = function(parent) {
- var data = {};
- data[metadataKey] = metadataValue;
- parent.setMetadata(onSetMetadataWin, onSetMetadataFail, data);
- }
- var onGetDirectoryFail = function() {
- console.log("error getting dir")
- }
+ var onGetDirectoryWin = function(parent) {
+ var data = {};
+ data[metadataKey] = metadataValue;
+ parent.setMetadata(onSetMetadataWin, onSetMetadataFail, data);
+ }
+ var onGetDirectoryFail = function() {
+ console.log("error getting dir")
+ }
- var onFSWin = function(fileSystem) {
- fileSystem.root.getDirectory(subFolder, {create: true, exclusive: false}, onGetDirectoryWin, onGetDirectoryFail);
- }
+ var onFSWin = function(fileSystem) {
+ fileSystem.root.getDirectory(subFolder, {create: true, exclusive: false}, onGetDirectoryWin, onGetDirectoryFail);
+ }
- var onFSFail = function(evt) {
- console.log(evt.target.error.code);
- }
+ var onFSFail = function(evt) {
+ console.log(evt.target.error.code);
+ }
- window.requestFileSystem(localFileSystem, 0, onFSWin, onFSFail);
+ window.requestFileSystem(localFileSystem, 0, onFSWin, onFSFail);
}
setFolderMetadata(LocalFileSystem.PERSISTENT, "Backups", "com.apple.MobileBackup", 1);
@@ -154,8 +170,11 @@ moveTo
Move a directory to a different location on the file system. An error results if the app attempts to:
- move a directory inside itself or to any child at any depth.
+
- move a directory into its parent if a name different from its current directory is not provided.
+
- move a directory to a path occupied by a file.
+
- move a directory to a path occupied by a directory that is not empty.
Moving a directory on top of an existing empty directory attempts to
@@ -164,8 +183,11 @@ delete and replace that directory.
__Parameters:__
- __parent__: The parent directory to which to move the directory. _(DirectoryEntry)_
+
- __newName__: The new name of the directory. Defaults to the current name if unspecified. _(DOMString)_
+
- __successCallback__: A callback that executes with the `DirectoryEntry` object for the new directory. _(Function)_
+
- __errorCallback__: A callback that executes if an error occurs when attempting to move the directory. Invoked with a `FileError` object. _(Function)_
__Quick Example__
@@ -178,7 +200,7 @@ __Quick Example__
alert(error.code);
}
- function moveDir(entry) {
+ function moveDir(entry) {
var parent = document.getElementById('parent').value,
parentName = parent.substring(parent.lastIndexOf('/')+1),
newName = document.getElementById('newName').value,
@@ -194,6 +216,7 @@ copyTo
Copy a directory to a different location on the file system. An error results if the app attempts to:
- copy a directory inside itself at any depth.
+
- copy a directory into its parent if a name different from its current directory is not provided.
Directory copies are always recursive, and copy all contents of the directory.
@@ -201,21 +224,24 @@ Directory copies are always recursive, and copy all contents of the directory.
__Parameters:__
- __parent__: The parent directory to which to copy the directory. _(DirectoryEntry)_
+
- __newName__: The new name of the directory. Defaults to the current name if unspecified. _(DOMString)_
+
- __successCallback__: A callback that executes with the `DirectoryEntry` object for the new directory. _(Function)_
+
- __errorCallback__: A callback that executes if an error occurs when attempting to copy the underlying directory. Invoked with a `FileError` object. _(Function)_
__Quick Example__
- function win(entry) {
- console.log("New Path: " + entry.fullPath);
- }
+ function win(entry) {
+ console.log("New Path: " + entry.fullPath);
+ }
- function fail(error) {
- alert(error.code);
- }
+ function fail(error) {
+ alert(error.code);
+ }
- function copyDir(entry) {
+ function copyDir(entry) {
var parent = document.getElementById('parent').value,
parentName = parent.substring(parent.lastIndexOf('/')+1),
newName = document.getElementById('newName').value,
@@ -242,11 +268,13 @@ remove
Deletes a directory. An error results if the app attempts to:
- delete a directory that is not empty.
+
- delete the root directory of a filesystem.
__Parameters:__
- __successCallback__: A callback that executes after the directory is deleted. Invoked with no parameters. _(Function)_
+
- __errorCallback__: A callback that executes if an error occurs when attempting to delete the directory. Invoked with a `FileError` object. _(Function)_
__Quick Example__
@@ -270,6 +298,7 @@ Look up the parent `DirectoryEntry` containing the directory.
__Parameters:__
- __successCallback__: A callback that is passed the directory's parent `DirectoryEntry`. _(Function)_
+
- __errorCallback__: A callback that executes if an error occurs when attempting to retrieve the parent `DirectoryEntry`. Invoked with a `FileError` object. _(Function)_
__Quick Example__
@@ -305,8 +334,11 @@ Creates or looks up an existing directory. An error results if the app attempts
__Parameters:__
- __path__: The path to the directory to be looked up or created. Either an absolute path, or a relative path from this `DirectoryEntry`. _(DOMString)_
+
- __options__: Options to specify whether the directory is to be created if it doesn't exist. _(Flags)_
+
- __successCallback__: A callback that executes with a `DirectoryEntry` object. _(Function)_
+
- __errorCallback__: A callback that executes if an error occurs when creating or looking up the directory. Invoked with a `FileError` object. _(Function)_
__Quick Example__
@@ -332,8 +364,11 @@ Creates or looks up a file. An error results if the app attempts to:
__Parameters:__
- __path__: The path to the file to be looked up or created. Either an absolute path, or a relative path from this `DirectoryEntry`. _(DOMString)_
+
- __options__: Options to specify whether the file is created if it doesn't exist. _(Flags)_
+
- __successCallback__: A callback that is passed a `FileEntry` object. _(Function)_
+
- __errorCallback__: A callback that executes if an error occurs when creating or looking up the file. Invoked with a `FileError` object. _(Function)_
__Quick Example__
@@ -361,6 +396,7 @@ be deleted. An error results if the app attempts to:
__Parameters:__
- __successCallback__: A callback that executes after the `DirectoryEntry` has been deleted. Invoked with no parameters. _(Function)_
+
- __errorCallback__: A callback that executes if an error occurs when attempting to delete the `DirectoryEntry`. Invoked with a `FileError` object. _(Function)_
__Quick Example__
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/file/directoryreader/directoryreader.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/file/directoryreader/directoryreader.md b/docs/en/3.0.0/cordova/file/directoryreader/directoryreader.md
index b37edb9..8146726 100644
--- a/docs/en/3.0.0/cordova/file/directoryreader/directoryreader.md
+++ b/docs/en/3.0.0/cordova/file/directoryreader/directoryreader.md
@@ -47,6 +47,7 @@ Read the entries in this directory.
__Parameters:__
- __successCallback__: A callback that is passed an array of `FileEntry` and `DirectoryEntry` objects. _(Function)_
+
- __errorCallback__: A callback that executes if an error occurs when retrieving the directory listing. Invoked with a `FileError` object. _(Function)_
__Quick Example__
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/3fb6feae/docs/en/3.0.0/cordova/file/file.md
----------------------------------------------------------------------
diff --git a/docs/en/3.0.0/cordova/file/file.md b/docs/en/3.0.0/cordova/file/file.md
index 52c24ba..64ad381 100644
--- a/docs/en/3.0.0/cordova/file/file.md
+++ b/docs/en/3.0.0/cordova/file/file.md
@@ -41,43 +41,57 @@ Objects
- LocalFileSystem
- Metadata
-Permissions
------------
-
-### Android
-
-#### app/res/xml/config.xml
-
- <plugin name="File" value="org.apache.cordova.FileUtils" />
- <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer" />
-
-#### app/AndroidManifest.xml
-
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-
-### BlackBerry WebWorks
-
-#### www/plugins.xml
-
- <plugin name="File" value="org.apache.cordova.file.FileManager" />
- <plugin name="FileTransfer" value="org.apache.cordova.http.FileTransfer" />
-
-#### www/config.xml
-
- <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
- <feature id="blackberry.utils" required="true" version="1.0.0.0" />
- <feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
- <rim:permissions>
- <rim:permit>access_shared</rim:permit>
- </rim:permissions>
-
-### iOS
-
-#### config.xml
-
- <plugin name="File" value="CDVFile" />
- <plugin name="FileTransfer" value="CDVFileTransfer" />
-
-### Windows Phone
-
- No permissions are required.
+## 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 https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git
+ $ cordova plugin rm org.apache.cordova.core.file
+
+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="File">
+ <param name="android-package" value="org.apache.cordova.FileUtils" />
+ </feature>
+ <feature name="FileTransfer">
+ <param name="android-package" value="org.apache.cordova.FileTransfer" />
+ </feature>
+
+ (in app/AndroidManifest.xml)
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+
+* BlackBerry WebWorks
+
+ (in www/plugins.xml)
+ <feature name="File">
+ <param name="blackberry-package" value="org.apache.cordova.file.FileManager" />
+ </feature>
+ <feature name="FileTransfer">
+ <param name="blackberry-package" value="org.apache.cordova.http.FileTransfer" />
+ </feature>
+
+ (in www/config.xml)
+ <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
+ <feature id="blackberry.utils" required="true" version="1.0.0.0" />
+ <feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
+ <rim:permissions>
+ <rim:permit>access_shared</rim:permit>
+ </rim:permissions>
+
+* iOS (in `config.xml`)
+
+ <feature name="File">
+ <param name="ios-package" value="CDVFile" />
+ </feature>
+ <feature name="FileTransfer">
+ <param name="ios-package" value="CDVFileTransfer" />
+ </feature>
+
+Some platforms may support this feature without requiring any special
+configuration. See Platform Support for an overview.