Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 6195996..0000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-# http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
--->
-# Release Notes
-
-
diff --git a/README.md b/README.md
index ddfd8d2..793db47 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,22 @@
-cordova-plugin-media-capture
-----------------------------
-To install this plugin, follow the [Command-line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface).
+<!---
+ 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
 
-If you are not using the Cordova Command-line Interface, follow [Using Plugman to Manage Plugins](http://cordova.apache.org/docs/en/edge/plugin_ref_plugman.md.html).
+           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.
+-->
+
+# org.apache.cordova.media-capture
+
+Plugin documentation: [doc/index.md](doc/index.md)
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
new file mode 100644
index 0000000..4eff9e2
--- /dev/null
+++ b/RELEASENOTES.md
@@ -0,0 +1,56 @@
+<!--
+#
+# 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.
+#
+-->
+# Release Notes
+
+### 0.2.2 (Sept 25, 2013)
+* CB-4889 bumping&resetting version
+* [windows8] commandProxy was moved
+* [windows8] commandProxy was moved
+* CB-4889
+* CB-4889 renaming org.apache.cordova.core.media-capture to org.apache.cordova.media-capture and updating dependency
+* Rename CHANGELOG.md -> RELEASENOTES.md
+* [CB-4847] iOS 7 microphone access requires user permission - if denied, CDVCapture, CDVSound does not handle it properly
+* [CB-4826] Fix warning using UITextAlignmentCenter
+* [CB-4826] Fix XCode 5 capture plugin warnings
+* [CB-4488] - added manual capture test
+* [CB-4764] Remove reference to DirectoryManager from Capture.java
+* [CB-4763] Use own version of FileHelper.
+* [CB-4752] Incremented plugin version on dev branch.
+
+### 0.2.3 (Oct 9, 2013)
+* CB-4720: fixed incorrect feature tag in plugin.xml for wp
+* [CB-4915] Incremented plugin version on dev branch.
+
+ ### 0.2.4 (Oct 28, 2013)
+* CB-5199 - ios - Media Capture - UI issues under iOS 7
+* CB-5128: added repo + issue tag to plugin.xml for media capture plugin
+* [CB-5010] Incremented plugin version on dev branch. 
+
+### 0.2.5 (Dec 4, 2013)
+* add ubuntu platform
+* Added amazon-fireos platform. Change to use amazon-fireos as a platform if user agent string contains 'cordova-amazon-fireos'
+* CB-5291 - ios - Media Capture Audio - status bar issues under iOS 7
+* CB-5275: CaptureImage and CaptureVideo have runnables and CaptureVideo works on 4.2.  Still doesn't work for 4.3
+
+### 0.2.6 (Jan 02, 2014)
+* CB-5658 Add doc/index.md for Media Capture plugin
+* CB-5569 Windows8. MediaFile constructor does not exist
+* CB-5517 Fix the audio capture IO exception by putting it in a runnable
diff --git a/doc/index.md b/doc/index.md
new file mode 100644
index 0000000..8a29718
--- /dev/null
+++ b/doc/index.md
@@ -0,0 +1,597 @@
+<!---
+    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.
+-->
+
+# org.apache.cordova.media-capture
+
+This plugin provides access to the device's audio, image, and video capture capabilities.
+
+__WARNING__: Collection and use of images, video, or
+audio from the device's camera or microphone raises important privacy
+issues.  Your app's privacy policy should discuss how the app uses
+such sensors and whether the data recorded is shared with any other
+parties.  In addition, if the app's use of the camera or microphone is
+not apparent in the user interface, you should provide a just-in-time
+notice before the app accesses the camera or microphone (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__).  Note that some app marketplaces may require your app to
+provide just-in-time notice and obtain permission from the user prior
+to accessing the camera or microphone.  For more information, please
+see the Privacy Guide.
+
+## Installation
+
+    cordova plugin add org.apache.cordova.media-capture
+
+## Supported Platforms
+
+- Amazon Fire OS
+- Android
+- BlackBerry 10
+- iOS
+- Windows Phone 7 and 8
+- Windows 8
+
+## Objects
+
+- Capture
+- CaptureAudioOptions
+- CaptureImageOptions
+- CaptureVideoOptions
+- CaptureCallback
+- CaptureErrorCB
+- ConfigurationData
+- MediaFile
+- MediaFileData
+
+## Methods
+
+- capture.captureAudio
+- capture.captureImage
+- capture.captureVideo
+- MediaFile.getFormatData
+
+## Properties
+
+- __supportedAudioModes__: The audio recording formats supported by the device. (ConfigurationData[])
+
+- __supportedImageModes__: The recording image sizes and formats supported by the device. (ConfigurationData[])
+
+- __supportedVideoModes__: The recording video resolutions and formats supported by the device. (ConfigurationData[])
+
+## capture.captureAudio
+
+> Start the audio recorder application and return information about captured audio clip files.
+
+    navigator.device.capture.captureAudio(
+        CaptureCB captureSuccess, CaptureErrorCB captureError,  [CaptureAudioOptions options]
+    );
+
+### Description
+
+Starts an asynchronous operation to capture audio recordings using the
+device's default audio recording application.  The operation allows
+the device user to capture multiple recordings in a single session.
+
+The capture operation ends when either the user exits the audio
+recording application, or the maximum number of recordings specified
+by `CaptureAudioOptions.limit` is reached.  If no `limit` parameter
+value is specified, it defaults to one (1), and the capture operation
+terminates after the user records a single audio clip.
+
+When the capture operation finishes, the `CaptureCallback` executes
+with an array of `MediaFile` objects describing each captured audio
+clip file.  If the user terminates the operation before an audio clip
+is captured, the `CaptureErrorCallback` executes with a `CaptureError`
+object, featuring the `CaptureError.CAPTURE_NO_MEDIA_FILES` error
+code.
+
+### Supported Platforms
+
+- Amazon Fire OS
+- Android
+- BlackBerry 10
+- iOS
+- Windows Phone 7 and 8
+- Windows 8
+
+### Example
+
+    // capture callback
+    var captureSuccess = function(mediaFiles) {
+        var i, path, len;
+        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
+            path = mediaFiles[i].fullPath;
+            // do something interesting with the file
+        }
+    };
+
+    // capture error callback
+    var captureError = function(error) {
+        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
+    };
+
+    // start audio capture
+    navigator.device.capture.captureAudio(captureSuccess, captureError, {limit:2});
+
+
+### BlackBerry 10 Quirks
+
+- Cordova for BlackBerry 10 attempts to launch the __Voice Notes Recorder__ application, provided by RIM, to capture audio recordings. The app receives a `CaptureError.CAPTURE_NOT_SUPPORTED` error code if the application is not installed on the device.
+
+### iOS Quirks
+
+- iOS does not have a default audio recording application, so a simple user interface is provided.
+
+### Windows Phone 7 and 8 Quirks
+
+- Windows Phone 7 does not have a default audio recording application, so a simple user interface is provided.
+
+## CaptureAudioOptions
+
+> Encapsulates audio capture configuration options.
+
+### Properties
+
+- __limit__: The maximum number of audio clips the device user can record in a single capture operation.  The value must be greater than or equal to 1 (defaults to 1).
+
+- __duration__: The maximum duration of an audio sound clip, in seconds.
+
+### Example
+
+    // limit capture operation to 3 media files, no longer than 10 seconds each
+    var options = { limit: 3, duration: 10 };
+
+    navigator.device.capture.captureAudio(captureSuccess, captureError, options);
+
+### Amazon Fire OS Quirks
+
+- The `duration` parameter is not supported.  Recording lengths cannot be limited programmatically.
+
+### Android Quirks
+
+- The `duration` parameter is not supported.  Recording lengths can't be limited programmatically.
+
+### BlackBerry 10 Quirks
+
+- The `duration` parameter is not supported.  Recording lengths can't be limited programmatically.
+
+### iOS Quirks
+
+- The `limit` parameter is not supported, so only one recording can be created for each invocation.
+
+## capture.captureImage
+
+> Start the camera application and return information about captured image files.
+
+    navigator.device.capture.captureImage(
+        CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureImageOptions options]
+    );
+
+### Description
+
+Starts an asynchronous operation to capture images using the device's
+camera application.  The operation allows users to capture more than
+one image in a single session.
+
+The capture operation ends either when the user closes the camera
+application, or the maximum number of recordings specified by
+`CaptureAudioOptions.limit` is reached.  If no `limit` value is
+specified, it defaults to one (1), and the capture operation
+terminates after the user captures a single image.
+
+When the capture operation finishes, it invokes the `CaptureCB`
+callback with an array of `MediaFile` objects describing each captured
+image file.  If the user terminates the operation before capturing an
+image, the `CaptureErrorCB` callback executes with a `CaptureError`
+object featuring a `CaptureError.CAPTURE_NO_MEDIA_FILES` error code.
+
+### Supported Platforms
+
+- Amazon Fire OS
+- Android
+- BlackBerry 10
+- iOS
+- Windows Phone 7 and 8
+- Windows 8
+
+### Windows Phone 7 Quirks
+
+Invoking the native camera application while your device is connected
+via Zune does not work, and the error callback executes.
+
+### Example
+
+    // capture callback
+    var captureSuccess = function(mediaFiles) {
+        var i, path, len;
+        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
+            path = mediaFiles[i].fullPath;
+            // do something interesting with the file
+        }
+    };
+
+    // capture error callback
+    var captureError = function(error) {
+        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
+    };
+
+    // start image capture
+    navigator.device.capture.captureImage(captureSuccess, captureError, {limit:2});
+
+
+
+## CaptureImageOptions
+
+> Encapsulates image capture configuration options.
+
+### Properties
+
+- __limit__: The maximum number of images the user can capture in a single capture operation. The value must be greater than or equal to 1 (defaults to 1).
+
+### Example
+
+    // limit capture operation to 3 images
+    var options = { limit: 3 };
+
+    navigator.device.capture.captureImage(captureSuccess, captureError, options);
+
+### iOS Quirks
+
+- The __limit__ parameter is not supported, and only one image is taken per invocation.
+
+## capture.captureVideo
+
+> Start the video recorder application and return information about captured video clip files.
+
+    navigator.device.capture.captureVideo(
+        CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureVideoOptions options]
+    );
+
+### Description
+
+Starts an asynchronous operation to capture video recordings using the
+device's video recording application.  The operation allows the user
+to capture more than one recordings in a single session.
+
+The capture operation ends when either the user exits the video
+recording application, or the maximum number of recordings specified
+by `CaptureVideoOptions.limit` is reached.  If no `limit` parameter
+value is specified, it defaults to one (1), and the capture operation
+terminates after the user records a single video clip.
+
+When the capture operation finishes, it the `CaptureCB` callback
+executes with an array of `MediaFile` objects describing each captured
+video clip file.  If the user terminates the operation before
+capturing a video clip, the `CaptureErrorCB` callback executes with a
+`CaptureError` object featuring a
+`CaptureError.CAPTURE_NO_MEDIA_FILES` error code.
+
+### Supported Platforms
+
+- Amazon Fire OS
+- Android
+- BlackBerry 10
+- iOS
+- Windows Phone 7 and 8
+- Windows 8
+
+### Example
+
+    // capture callback
+    var captureSuccess = function(mediaFiles) {
+        var i, path, len;
+        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
+            path = mediaFiles[i].fullPath;
+            // do something interesting with the file
+        }
+    };
+
+    // capture error callback
+    var captureError = function(error) {
+        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
+    };
+
+    // start video capture
+    navigator.device.capture.captureVideo(captureSuccess, captureError, {limit:2});
+
+
+### BlackBerry 10 Quirks
+
+- Cordova for BlackBerry 10 attempts to launch the __Video Recorder__ application, provided by RIM, to capture video recordings. The app receives a `CaptureError.CAPTURE_NOT_SUPPORTED` error code if the application is not installed on the device.
+
+
+## CaptureVideoOptions
+
+> Encapsulates video capture configuration options.
+
+### Properties
+
+- __limit__: The maximum number of video clips the device's user can capture in a single capture operation.  The value must be greater than or equal to 1 (defaults to 1).
+
+- __duration__: The maximum duration of a video clip, in seconds.
+
+### Example
+
+    // limit capture operation to 3 video clips
+    var options = { limit: 3 };
+
+    navigator.device.capture.captureVideo(captureSuccess, captureError, options);
+
+### BlackBerry 10 Quirks
+
+- The __duration__ parameter is not supported, so the length of recordings can't be limited programmatically.
+
+### iOS Quirks
+
+- The __limit__ parameter is not supported.  Only one video is recorded per invocation.
+
+
+## CaptureCB
+
+> Invoked upon a successful media capture operation.
+
+    function captureSuccess( MediaFile[] mediaFiles ) { ... };
+
+### Description
+
+This function executes after a successful capture operation completes.
+At this point a media file has been captured, and either the user has
+exited the media capture application, or the capture limit has been
+reached.
+
+Each `MediaFile` object describes a captured media file.
+
+### Example
+
+    // capture callback
+    function captureSuccess(mediaFiles) {
+        var i, path, len;
+        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
+            path = mediaFiles[i].fullPath;
+            // do something interesting with the file
+        }
+    };
+
+## CaptureError
+
+> Encapsulates the error code resulting from a failed media capture operation.
+
+### Properties
+
+- __code__: One of the pre-defined error codes listed below.
+
+### Constants
+
+- `CaptureError.CAPTURE_INTERNAL_ERR`: The camera or microphone failed to capture image or sound.
+
+- `CaptureError.CAPTURE_APPLICATION_BUSY`: The camera or audio capture application is currently serving another capture request.
+
+- `CaptureError.CAPTURE_INVALID_ARGUMENT`: Invalid use of the API (e.g., the value of `limit` is less than one).
+
+- `CaptureError.CAPTURE_NO_MEDIA_FILES`: The user exits the camera or audio capture application before capturing anything.
+
+- `CaptureError.CAPTURE_NOT_SUPPORTED`: The requested capture operation is not supported.
+
+## CaptureErrorCB
+
+> Invoked if an error occurs during a media capture operation.
+
+    function captureError( CaptureError error ) { ... };
+
+### Description
+
+This function executes if an error occurs when trying to launch a
+media capture operation. Failure scenarios include when the capture
+application is busy, a capture operation is already taking place, or
+the user cancels the operation before any media files are captured.
+
+This function executes with a `CaptureError` object containing an
+appropriate error `code`.
+
+### Example
+
+    // capture error callback
+    var captureError = function(error) {
+        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
+    };
+
+## ConfigurationData
+
+> Encapsulates a set of media capture parameters that a device supports.
+
+### Description
+
+Describes media capture modes supported by the device.  The
+configuration data includes the MIME type, and capture dimensions for
+video or image capture.
+
+The MIME types should adhere to [RFC2046](http://www.ietf.org/rfc/rfc2046.txt).  Examples:
+
+- `video/3gpp`
+- `video/quicktime`
+- `image/jpeg`
+- `audio/amr`
+- `audio/wav`
+
+### Properties
+
+- __type__: The ASCII-encoded lowercase string representing the media type. (DOMString)
+
+- __height__: The height of the image or video in pixels.  The value is zero for sound clips. (Number)
+
+- __width__: The width of the image or video in pixels.  The value is zero for sound clips. (Number)
+
+### Example
+
+    // retrieve supported image modes
+    var imageModes = navigator.device.capture.supportedImageModes;
+
+    // Select mode that has the highest horizontal resolution
+    var width = 0;
+    var selectedmode;
+    for each (var mode in imageModes) {
+        if (mode.width > width) {
+            width = mode.width;
+            selectedmode = mode;
+        }
+    }
+
+Not supported by any platform.  All configuration data arrays are empty.
+
+## MediaFile.getFormatData
+
+> Retrieves format information about the media capture file.
+
+    mediaFile.getFormatData(
+        MediaFileDataSuccessCB successCallback,
+        [MediaFileDataErrorCB errorCallback]
+    );
+
+### Description
+
+This function asynchronously attempts to retrieve the format
+information for the media file.  If successful, it invokes the
+`MediaFileDataSuccessCB` callback with a `MediaFileData` object.  If
+the attempt fails, this function invokes the `MediaFileDataErrorCB`
+callback.
+
+### Supported Platforms
+
+- Amazon Fire OS
+- Android
+- BlackBerry 10
+- iOS
+- Windows Phone 7 and 8
+- Windows 8
+
+### Amazon Fire OS Quirks
+
+The API to access media file format information is limited, so not all
+`MediaFileData` properties are supported.
+
+### BlackBerry 10 Quirks
+
+Does not provide an API for information about media files, so all
+`MediaFileData` objects return with default values.
+
+### Android Quirks
+
+The API to access media file format information is limited, so not all
+`MediaFileData` properties are supported.
+
+### iOS Quirks
+
+The API to access media file format information is limited, so not all
+`MediaFileData` properties are supported.
+
+## MediaFile
+
+> Encapsulates properties of a media capture file.
+
+### Properties
+
+- __name__: The name of the file, without path information. (DOMString)
+
+- __fullPath__: The full path of the file, including the name. (DOMString)
+
+- __type__: The file's mime type (DOMString)
+
+- __lastModifiedDate__: The date and time when the file was last modified. (Date)
+
+- __size__: The size of the file, in bytes. (Number)
+
+### Methods
+
+- __MediaFile.getFormatData__: Retrieves the format information of the media file.
+
+## MediaFileData
+
+> Encapsulates format information about a media file.
+
+### Properties
+
+- __codecs__: The actual format of the audio and video content. (DOMString)
+
+- __bitrate__: The average bitrate of the content.  The value is zero for images. (Number)
+
+- __height__: The height of the image or video in pixels. The value is zero for audio clips. (Number)
+
+- __width__: The width of the image or video in pixels. The value is zero for audio clips. (Number)
+
+- __duration__: The length of the video or sound clip in seconds. The value is zero for images. (Number)
+
+### BlackBerry 10 Quirks
+
+No API provides format information for media files, so the
+`MediaFileData` object returned by `MediaFile.getFormatData` features
+the following default values:
+
+- __codecs__: Not supported, and returns `null`.
+
+- __bitrate__: Not supported, and returns zero.
+
+- __height__: Not supported, and returns zero.
+
+- __width__: Not supported, and returns zero.
+
+- __duration__: Not supported, and returns zero.
+
+### Amazon Fire OS Quirks
+
+Supports the following `MediaFileData` properties:
+
+- __codecs__: Not supported, and returns `null`.
+
+- __bitrate__: Not supported, and returns zero.
+
+- __height__: Supported: image and video files only.
+
+- __width__: Supported: image and video files only.
+
+- __duration__: Supported: audio and video files only
+
+### Android Quirks
+
+Supports the following `MediaFileData` properties:
+
+- __codecs__: Not supported, and returns `null`.
+
+- __bitrate__: Not supported, and returns zero.
+
+- __height__: Supported: image and video files only.
+
+- __width__: Supported: image and video files only.
+
+- __duration__: Supported: audio and video files only.
+
+### iOS Quirks
+
+Supports the following `MediaFileData` properties:
+
+- __codecs__: Not supported, and returns `null`.
+
+- __bitrate__: Supported on iOS4 devices for audio only. Returns zero for images and videos.
+
+- __height__: Supported: image and video files only.
+
+- __width__: Supported: image and video files only.
+
+- __duration__: Supported: audio and video files only.
diff --git a/docs/MediaError/mediaError.md b/docs/MediaError/mediaError.md
deleted file mode 100644
index 5652a27..0000000
--- a/docs/MediaError/mediaError.md
+++ /dev/null
@@ -1,45 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-MediaError
-==========
-
-A `MediaError` object is returned to the `mediaError` callback
-function when an error occurs.
-
-Properties
-----------
-
-- __code__: One of the predefined error codes listed below.
-- __message__: An error message describing the details of the error.
-
-Constants
----------
-
-- `MediaError.MEDIA_ERR_ABORTED`
-- `MediaError.MEDIA_ERR_NETWORK`
-- `MediaError.MEDIA_ERR_DECODE`
-- `MediaError.MEDIA_ERR_NONE_SUPPORTED`
-
-Description
------------
-
-The `MediaError` object is passed to a `mediaError` callback function
-when an error occurs.
-
diff --git a/docs/Parameters/mediaError.md b/docs/Parameters/mediaError.md
deleted file mode 100644
index 08b4400..0000000
--- a/docs/Parameters/mediaError.md
+++ /dev/null
@@ -1,33 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-mediaError
-==========
-
-A user-specified callback function that executes when there is an
-error in media functions.
-
-    function(error) {
-        // Handle the error
-    }
-
-Parameters
-----------
-
-- __error__: The error returned by the device. _(MediaError)_
diff --git a/docs/capture/CaptureCB.md b/docs/capture/CaptureCB.md
deleted file mode 100644
index d1d7599..0000000
--- a/docs/capture/CaptureCB.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-CaptureCB
-=========
-
-> Invoked upon a successful media capture operation.
-
-    function captureSuccess( MediaFile[] mediaFiles ) { ... };
-
-Description
------------
-
-This function executes after a successful capture operation completes.
-At this point a media file has been captured, and either the user has
-exited the media capture application, or the capture limit has been
-reached.
-
-Each `MediaFile` object describes a captured media file.
-
-Quick Example
--------------
-
-    // capture callback
-    function captureSuccess(mediaFiles) {
-        var i, path, len;
-        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
-            path = mediaFiles[i].fullPath;
-            // do something interesting with the file
-        }
-    };
diff --git a/docs/capture/CaptureError.md b/docs/capture/CaptureError.md
deleted file mode 100644
index 0268f06..0000000
--- a/docs/capture/CaptureError.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-CaptureError
-============
-
-> Encapsulates the error code resulting from a failed media capture operation.
-
-Properties
-----------
-
-- __code__: One of the pre-defined error codes listed below.
-
-Constants
----------
-
-- `CaptureError.CAPTURE_INTERNAL_ERR`: The camera or microphone failed to capture image or sound.
-- `CaptureError.CAPTURE_APPLICATION_BUSY`: The camera or audio capture application is currently serving another capture request.
-- `CaptureError.CAPTURE_INVALID_ARGUMENT`: Invalid use of the API (e.g. the value of `limit` is less than one).
-- `CaptureError.CAPTURE_NO_MEDIA_FILES`: The user exits the camera or audio capture application before capturing anything.
-- `CaptureError.CAPTURE_NOT_SUPPORTED`: The requested capture operation is not supported.
diff --git a/docs/capture/CaptureErrorCB.md b/docs/capture/CaptureErrorCB.md
deleted file mode 100644
index f3771e6..0000000
--- a/docs/capture/CaptureErrorCB.md
+++ /dev/null
@@ -1,44 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-CaptureErrorCB
-==============
-
-> Invoked if an error occurs during a media capture operation.
-
-    function captureError( CaptureError error ) { ... };
-
-Description
------------
-
-This function executes if an error occurs when trying to launch a
-media capture operation. Failure scenarios include when the capture
-application is busy, a capture operation is already taking place, or
-the user cancels the operation before any media files are captured.
-
-This function executes with a `CaptureError` object containing an
-appropriate error `code`.
-
-Quick Example
--------------
-
-    // capture error callback
-    var captureError = function(error) {
-        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
-    };
diff --git a/docs/capture/ConfigurationData.md b/docs/capture/ConfigurationData.md
deleted file mode 100644
index 361f45a..0000000
--- a/docs/capture/ConfigurationData.md
+++ /dev/null
@@ -1,63 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-ConfigurationData
-=================
-
-> Encapsulates a set of media capture parameters that a device supports.
-
-Description
------------
-
-Describes media capture modes supported by the device.  The
-configuration data includes the MIME type, and capture dimensions for
-video or image capture.
-
-The MIME types should adhere to [RFC2046](http://www.ietf.org/rfc/rfc2046.txt).  Examples:
-
-- `video/3gpp`
-- `video/quicktime`
-- `image/jpeg`
-- `audio/amr`
-- `audio/wav`
-
-Properties
-----------
-
-- __type__: The ASCII-encoded lowercase string representing the media type. (DOMString)
-- __height__: The height of the image or video in pixels.  The value is zero for sound clips. (Number)
-- __width__: The width of the image or video in pixels.  The value is zero for sound clips. (Number)
-
-Quick Example
--------------
-
-    // retrieve supported image modes
-    var imageModes = navigator.device.capture.supportedImageModes;
-
-    // Select mode that has the highest horizontal resolution
-    var width = 0;
-    var selectedmode;
-    for each (var mode in imageModes) {
-        if (mode.width > width) {
-            width = mode.width;
-            selectedmode = mode;
-        }
-    }
-
-Not supported by any platform.  All configuration data arrays are empty.
diff --git a/docs/capture/MediaFile.getFormatData.md b/docs/capture/MediaFile.getFormatData.md
deleted file mode 100644
index e922329..0000000
--- a/docs/capture/MediaFile.getFormatData.md
+++ /dev/null
@@ -1,64 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-MediaFile.getFormatData
-=======================
-
-> Retrieves format information about the media capture file.
-
-    mediaFile.getFormatData(
-        MediaFileDataSuccessCB successCallback,
-        [MediaFileDataErrorCB errorCallback]
-    );
-
-Description
------------
-
-This function asynchronously attempts to retrieve the format
-information for the media file.  If successful, it invokes the
-`MediaFileDataSuccessCB` callback with a `MediaFileData` object.  If
-the attempt fails, this function invokes the `MediaFileDataErrorCB`
-callback.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Windows 8
-
-BlackBerry WebWorks Quirks
---------------------------
-
-Does not provide an API for information about media files, so all
-`MediaFileData` objects return with default values.
-
-Android Quirks
---------------
-
-The API to access media file format information is limited, so not all
-`MediaFileData` properties are supported.
-
-iOS Quirks
-----------
-
-The API to access media file format information is limited, so not all
-`MediaFileData` properties are supported.
diff --git a/docs/capture/MediaFile.md b/docs/capture/MediaFile.md
deleted file mode 100644
index 3bca7aa..0000000
--- a/docs/capture/MediaFile.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-MediaFile
-=========
-
-> Encapsulates properties of a media capture file.
-
-Properties
-----------
-
-- __name__: The name of the file, without path information. (DOMString)
-- __fullPath__: The full path of the file, including the name. (DOMString)
-- __type__: The file's mime type (DOMString)
-- __lastModifiedDate__: The date and time when the file was last modified. (Date)
-- __size__: The size of the file, in bytes. (Number)
-
-Methods
--------
-
-- __MediaFile.getFormatData__: Retrieves the format information of the media file.
diff --git a/docs/capture/MediaFileData.md b/docs/capture/MediaFileData.md
deleted file mode 100644
index 545b549..0000000
--- a/docs/capture/MediaFileData.md
+++ /dev/null
@@ -1,65 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-MediaFileData
-=============
-
-> Encapsulates format information about a media file.
-
-Properties
-----------
-
-- __codecs__: The actual format of the audio and video content. (DOMString)
-- __bitrate__: The average bitrate of the content.  The value is zero for images. (Number)
-- __height__: The height of the image or video in pixels. The value is zero for audio clips. (Number)
-- __width__: The width of the image or video in pixels. The value is zero for audio clips. (Number)
-- __duration__: The length of the video or sound clip in seconds. The value is zero for images. (Number)
-
-BlackBerry WebWorks Quirks
---------------------------
-
-No API provides format information for media files, so the
-`MediaFileData` object returned by `MediaFile.getFormatData` features
-the following default values:
-
-- __codecs__: Not supported, and returns `null`.
-- __bitrate__: Not supported, and returns zero.
-- __height__: Not supported, and returns zero.
-- __width__: Not supported, and returns zero.
-- __duration__: Not supported, and returns zero.
-
-Android Quirks
---------------
-Supports the following `MediaFileData` properties:
-
-- __codecs__: Not supported, and returns `null`.
-- __bitrate__: Not supported, and returns zero.
-- __height__: Supported: image and video files only.
-- __width__: Supported: image and video files only.
-- __duration__: Supported: audio and video files only.
-
-iOS Quirks
-----------
-Supports the following `MediaFileData` properties:
-
-- __codecs__: Not supported, and returns null.
-- __bitrate__: Supported on iOS4 devices for audio only. Returns zero for images and videos.
-- __height__: Supported: image and video files only.
-- __width__: Supported: image and video files only.
-- __duration__: Supported: audio and video files only.
diff --git a/docs/capture/capture.md b/docs/capture/capture.md
deleted file mode 100644
index b503965..0000000
--- a/docs/capture/capture.md
+++ /dev/null
@@ -1,133 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-Capture
-=======
-
-> Provides access to the device's audio, image, and video capture capabilities.
-
-**Important privacy note:** Collection and use of images, video, or audio from the device's camera or microphone raises important privacy issues.  Your app's [privacy policy](guide_getting-started_index.md.html) should discuss how the app uses such sensors and whether the data recorded is shared with any other parties.  In addition, if the app's use of the camera or microphone is not apparent in the user interface, you should provide a just-in-time notice prior to your app accessing the camera or microphone (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").  Note that some app marketplaces may require your app to provide just-in-time notice and obtain permission from the user prior to accessing the camera or microphone.  For more information, please see the Privacy Guide.
-
-Objects
--------
-
-- Capture
-- CaptureAudioOptions
-- CaptureImageOptions
-- CaptureVideoOptions
-- CaptureCallback
-- CaptureErrorCB
-- ConfigurationData
-- MediaFile
-- MediaFileData
-
-Methods
--------
-
-- capture.captureAudio
-- capture.captureImage
-- capture.captureVideo
-- MediaFile.getFormatData
-
-Scope
------
-
-The `capture` object is assigned to the `navigator.device` object, and
-therefore has global scope.
-
-    // The global capture object
-    var capture = navigator.device.capture;
-
-Properties
-----------
-
-- __supportedAudioModes__: The audio recording formats supported by the device. (ConfigurationData[])
-- __supportedImageModes__: The recording image sizes and formats supported by the device. (ConfigurationData[])
-- __supportedVideoModes__: The recording video resolutions and formats supported by the device. (ConfigurationData[])
-
-Methods
--------
-
-- `capture.captureAudio`: Launch the device's audio recording application to record audio clips.
-- `capture.captureImage`: Launch the device's camera application to take photos.
-- `capture.captureVideo`: Launch the device's video recorder application to record videos.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Windows 8
-
-Permissions
------------
-
-### Android
-
-#### app/res/xml/plugins.xml
-
-    <plugin name="Capture" value="org.apache.cordova.Capture"/>
-
-#### app/AndroidManifest.xml
-
-    <uses-permission android:name="android.permission.RECORD_AUDIO" />
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-
-### Bada
-
-#### manifest.xml
-
-    <Privilege>
-        <Name>RECORDING</Name>
-    </Privilege>
-
-### BlackBerry WebWorks
-
-#### www/plugins.xml
-
-    <plugin name="Capture" value="org.apache.cordova.capture.MediaCapture" />
-
-#### www/config.xml
-
-    <feature id="blackberry.system"  required="true" version="1.0.0.0" />
-    <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
-
-### iOS
-
-#### config.xml
-
-    <plugin name="Capture" value="CDVCapture" />
-
-### webOS
-
-    No permissions are required.
-
-### Windows Phone
-
-#### Properties/WPAppManifest.xml
-
-    <Capabilities>
-        <Capability Name="ID_CAP_MEDIALIB" />
-        <Capability Name="ID_CAP_MICROPHONE" />
-        <Capability Name="ID_HW_FRONTCAMERA" />
-        <Capability Name="ID_CAP_ISV_CAMERA" />
-        <Capability Name="ID_CAP_CAMERA" />
-    </Capabilities>
diff --git a/docs/capture/captureAudio.md b/docs/capture/captureAudio.md
deleted file mode 100644
index 30ad560..0000000
--- a/docs/capture/captureAudio.md
+++ /dev/null
@@ -1,152 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-capture.captureAudio
-====================
-
-> Start the audio recorder application and return information about the captured audio clip file(s).
-
-    navigator.device.capture.captureAudio(
-        CaptureCB captureSuccess, CaptureErrorCB captureError,  [CaptureAudioOptions options]
-    );
-
-Description
------------
-
-Starts an asynchronous operation to capture audio recordings using the
-device's default audio recording application.  The operation allows
-the device user to capture multiple recordings in a single session.
-
-The capture operation ends when either the user exits the audio
-recording application, or the maximum number of recordings specified
-by `CaptureAudioOptions.limit` is reached.  If no `limit` parameter
-value is specified, it defaults to one (1), and the capture operation
-terminates after the user records a single audio clip.
-
-When the capture operation finishes, the `CaptureCallback` executes
-with an array of `MediaFile` objects describing each captured audio
-clip file.  If the user terminates the operation before an audio clip
-is captured, the `CaptureErrorCallback` executes with a `CaptureError`
-object, featuring the `CaptureError.CAPTURE_NO_MEDIA_FILES` error
-code.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Windows 8
-
-Quick Example
--------------
-
-    // capture callback
-    var captureSuccess = function(mediaFiles) {
-        var i, path, len;
-        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
-            path = mediaFiles[i].fullPath;
-            // do something interesting with the file
-        }
-    };
-
-    // capture error callback
-    var captureError = function(error) {
-        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
-    };
-
-    // start audio capture
-    navigator.device.capture.captureAudio(captureSuccess, captureError, {limit:2});
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Capture Audio</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
-        <script type="text/javascript" charset="utf-8" src="json2.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Called when capture operation is finished
-        //
-        function captureSuccess(mediaFiles) {
-            var i, len;
-            for (i = 0, len = mediaFiles.length; i < len; i += 1) {
-                uploadFile(mediaFiles[i]);
-            }
-        }
-
-        // Called if something bad happens.
-        //
-        function captureError(error) {
-            var msg = 'An error occurred during capture: ' + error.code;
-            navigator.notification.alert(msg, null, 'Uh oh!');
-        }
-
-        // A button will call this function
-        //
-        function captureAudio() {
-            // Launch device audio recording application,
-            // allowing user to capture up to 2 audio clips
-            navigator.device.capture.captureAudio(captureSuccess, captureError, {limit: 2});
-        }
-
-        // Upload files to server
-        function uploadFile(mediaFile) {
-            var ft = new FileTransfer(),
-                path = mediaFile.fullPath,
-                name = mediaFile.name;
-
-            ft.upload(path,
-                "http://my.domain.com/upload.php",
-                function(result) {
-                    console.log('Upload success: ' + result.responseCode);
-                    console.log(result.bytesSent + ' bytes sent');
-                },
-                function(error) {
-                    console.log('Error uploading file ' + path + ': ' + error.code);
-                },
-                { fileName: name });
-        }
-
-        </script>
-        </head>
-        <body>
-            <button onclick="captureAudio();">Capture Audio</button> <br>
-        </body>
-    </html>
-
-BlackBerry WebWorks Quirks
---------------------------
-
-- Cordova for BlackBerry WebWorks attempts to launch the __Voice Notes Recorder__ application, provided by RIM, to capture audio recordings. The app receives a `CaptureError.CAPTURE_NOT_SUPPORTED` error code if the application is not installed on the device.
-
-iOS Quirks
-----------
-
-- iOS does not have a default audio recording application, so a simple user interface is provided.
-
-Windows Phone 7 and 8 Quirks
-----------
-
-- Windows Phone 7 does not have a default audio recording application, so a simple user interface is provided.
diff --git a/docs/capture/captureAudioOptions.md b/docs/capture/captureAudioOptions.md
deleted file mode 100644
index c7d7ac2..0000000
--- a/docs/capture/captureAudioOptions.md
+++ /dev/null
@@ -1,52 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-CaptureAudioOptions
-===================
-
-> Encapsulates audio capture configuration options.
-
-Properties
-----------
-
-- __limit__: The maximum number of audio clips the device user can record in a single capture operation.  The value must be greater than or equal to 1 (defaults to 1).
-- __duration__: The maximum duration of an audio sound clip, in seconds.
-
-Quick Example
--------------
-
-    // limit capture operation to 3 media files, no longer than 10 seconds each
-    var options = { limit: 3, duration: 10 };
-
-    navigator.device.capture.captureAudio(captureSuccess, captureError, options);
-
-Android Quirks
---------------
-
-- The `duration` parameter is not supported.  Recording lengths cannot be limited programmatically.
-
-BlackBerry WebWorks Quirks
---------------------------
-
-- The `duration` parameter is not supported.  Recording lengths cannot be limited programmatically.
-
-iOS Quirks
-----------
-
-- The `limit` parameter is not supported, so only one recording can be created for each invocation.
diff --git a/docs/capture/captureImage.md b/docs/capture/captureImage.md
deleted file mode 100644
index dbd79ae..0000000
--- a/docs/capture/captureImage.md
+++ /dev/null
@@ -1,168 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-capture.captureImage
-====================
-
-> Start the camera application and return information about captured image file(s).
-
-    navigator.device.capture.captureImage(
-        CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureImageOptions options]
-    );
-
-Description
------------
-
-Starts an asynchronous operation to capture images using the device's
-camera application.  The operation allows users to capture more than
-one image in a single session.
-
-The capture operation ends either when the user closes the camera
-application, or the maximum number of recordings specified by
-`CaptureAudioOptions.limit` is reached.  If no `limit` value is
-specified, it defaults to one (1), and the capture operation
-terminates after the user captures a single image.
-
-When the capture operation finishes, it invokes the `CaptureCB`
-callback with an array of `MediaFile` objects describing each captured
-image file.  If the user terminates the operation before capturing an
-image, the `CaptureErrorCB` callback executes with a `CaptureError`
-object featuring a `CaptureError.CAPTURE_NO_MEDIA_FILES` error code.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 2.x
-- Windows 8
-
-Windows Phone 7 Quirks
-----------------------
-
-Invoking the native camera application while your device is connected
-via Zune does not work, and the error callback executes.
-
-Quick Example
--------------
-
-    // capture callback
-    var captureSuccess = function(mediaFiles) {
-        var i, path, len;
-        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
-            path = mediaFiles[i].fullPath;
-            // do something interesting with the file
-        }
-    };
-
-    // capture error callback
-    var captureError = function(error) {
-        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
-    };
-
-    // start image capture
-    navigator.device.capture.captureImage(captureSuccess, captureError, {limit:2});
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Capture Image</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
-        <script type="text/javascript" charset="utf-8" src="json2.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Called when capture operation is finished
-        //
-        function captureSuccess(mediaFiles) {
-            var i, len;
-            for (i = 0, len = mediaFiles.length; i < len; i += 1) {
-                uploadFile(mediaFiles[i]);
-            }
-        }
-
-        // Called if something bad happens.
-        //
-        function captureError(error) {
-            var msg = 'An error occurred during capture: ' + error.code;
-            navigator.notification.alert(msg, null, 'Uh oh!');
-        }
-
-        // A button will call this function
-        //
-        function captureImage() {
-            // Launch device camera application,
-            // allowing user to capture up to 2 images
-            navigator.device.capture.captureImage(captureSuccess, captureError, {limit: 2});
-        }
-
-        // Upload files to server
-        function uploadFile(mediaFile) {
-            var ft = new FileTransfer(),
-                path = mediaFile.fullPath,
-                name = mediaFile.name;
-
-            ft.upload(path,
-                "http://my.domain.com/upload.php",
-                function(result) {
-                    console.log('Upload success: ' + result.responseCode);
-                    console.log(result.bytesSent + ' bytes sent');
-                },
-                function(error) {
-                    console.log('Error uploading file ' + path + ': ' + error.code);
-                },
-                { fileName: name });
-        }
-
-        </script>
-        </head>
-        <body>
-            <button onclick="captureImage();">Capture Image</button> <br>
-        </body>
-    </html>
-
-Bada Quirks
------------
-
-Bada supports `captureImage` just like the other platforms, but
-features _another_ mode allowing video or image capture straight into
-the WebView without launching any camera app. Here's how:
-
-1. Create an element with an `id` attribute somewhere in the HTML:
-
-        <div id="preview"></div>
-
-2. Initialize the camera preview as follows:
-
-        navigator.camera.showPreview("preview");
-
-3. Once you the preview displays, capture the image with code such as the following:
-
-        var options = { destinationFilename: "images/cam01.jpg", highRes: false};
-        navigator.capture.captureImage(success, fail, options);
-
-4. Dismiss the camera preview as follows:
-
-        navigator.camera.hidePreview("preview");
-
diff --git a/docs/capture/captureImageOptions.md b/docs/capture/captureImageOptions.md
deleted file mode 100644
index b751bd1..0000000
--- a/docs/capture/captureImageOptions.md
+++ /dev/null
@@ -1,41 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-CaptureImageOptions
-===================
-
-> Encapsulates image capture configuration options.
-
-Properties
-----------
-
-- __limit__: The maximum number of images the user can capture in a single capture operation. The value must be greater than or equal to 1 (defaults to 1).
-
-Quick Example
--------------
-
-    // limit capture operation to 3 images
-    var options = { limit: 3 };
-
-    navigator.device.capture.captureImage(captureSuccess, captureError, options);
-
-iOS Quirks
-----------
-
-- The __limit__ parameter is not supported, and only one image is taken per invocation.
diff --git a/docs/capture/captureVideo.md b/docs/capture/captureVideo.md
deleted file mode 100644
index 6e80b3a..0000000
--- a/docs/capture/captureVideo.md
+++ /dev/null
@@ -1,171 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-capture.captureVideo
-====================
-
-> Start the video recorder application and return information about captured video clip file(s).
-
-    navigator.device.capture.captureVideo(
-        CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureVideoOptions options]
-    );
-
-Description
------------
-
-Starts an asynchronous operation to capture video recordings using the
-device's video recording application.  The operation allows the user
-to capture more than one recordings in a single session.
-
-The capture operation ends when either the user exits the video
-recording application, or the maximum number of recordings specified
-by `CaptureVideoOptions.limit` is reached.  If no `limit` parameter
-value is specified, it defaults to one (1), and the capture operation
-terminates after the user records a single video clip.
-
-When the capture operation finishes, it the `CaptureCB` callback
-executes with an array of `MediaFile` objects describing each captured
-video clip file.  If the user terminates the operation before
-capturing a video clip, the `CaptureErrorCB` callback executes with a
-`CaptureError` object featuring a
-`CaptureError.CAPTURE_NO_MEDIA_FILES` error code.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 2.x
-- Windows 8
-
-Quick Example
--------------
-
-    // capture callback
-    var captureSuccess = function(mediaFiles) {
-        var i, path, len;
-        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
-            path = mediaFiles[i].fullPath;
-            // do something interesting with the file
-        }
-    };
-
-    // capture error callback
-    var captureError = function(error) {
-        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
-    };
-
-    // start video capture
-    navigator.device.capture.captureVideo(captureSuccess, captureError, {limit:2});
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Capture Video</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
-        <script type="text/javascript" charset="utf-8" src="json2.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Called when capture operation is finished
-        //
-        function captureSuccess(mediaFiles) {
-            var i, len;
-            for (i = 0, len = mediaFiles.length; i < len; i += 1) {
-                uploadFile(mediaFiles[i]);
-            }
-        }
-
-        // Called if something bad happens.
-        //
-        function captureError(error) {
-            var msg = 'An error occurred during capture: ' + error.code;
-            navigator.notification.alert(msg, null, 'Uh oh!');
-        }
-
-        // A button will call this function
-        //
-        function captureVideo() {
-            // Launch device video recording application,
-            // allowing user to capture up to 2 video clips
-            navigator.device.capture.captureVideo(captureSuccess, captureError, {limit: 2});
-        }
-
-        // Upload files to server
-        function uploadFile(mediaFile) {
-            var ft = new FileTransfer(),
-                path = mediaFile.fullPath,
-                name = mediaFile.name;
-
-            ft.upload(path,
-                "http://my.domain.com/upload.php",
-                function(result) {
-                    console.log('Upload success: ' + result.responseCode);
-                    console.log(result.bytesSent + ' bytes sent');
-                },
-                function(error) {
-                    console.log('Error uploading file ' + path + ': ' + error.code);
-                },
-                { fileName: name });
-        }
-
-        </script>
-        </head>
-        <body>
-            <button onclick="captureVideo();">Capture Video</button> <br>
-        </body>
-    </html>
-
-BlackBerry WebWorks Quirks
---------------------------
-
-- Cordova for BlackBerry WebWorks attempts to launch the __Video Recorder__ application, provided by RIM, to capture video recordings. The app receives a `CaptureError.CAPTURE_NOT_SUPPORTED` error code if the application is not installed on the device.
-
-Bada 2.x Quirks
----------------
-
-Bada supports `captureVideo` just like the other platforms, but
-features _another_ mode allowing video or image capture straight into
-the WebView without launching any camera app. Here's how:
-
-1. Create an element with an `id` attribute somewhere in the HTML:
-
-        <div id="preview"></div>
-
-2. Initialize the camera preview as follows:
-
-        navigator.camera.showPreview("preview");
-
-3. Once the preview is available, use code such as this to start capturing a video:
-
-        navigator.capture.startVideoCapture(success, fail, {duration: 5000, destinationFilename: "videos/a.3gp"});
-
-4. Use this to stop the video capture:
-
-        navigator.capture.stopVideoCapture();
-
-5. Dismiss the camera preview as follows:
-
-        navigator.camera.hidePreview("preview");
-
diff --git a/docs/capture/captureVideoOptions.md b/docs/capture/captureVideoOptions.md
deleted file mode 100644
index fd3b761..0000000
--- a/docs/capture/captureVideoOptions.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-CaptureVideoOptions
-===================
-
-> Encapsulates video capture configuration options.
-
-Properties
-----------
-
-- __limit__: The maximum number of video clips the device's user can capture in a single capture operation.  The value must be greater than or equal to 1 (defaults to 1).
-- __duration__: The maximum duration of a video clip, in seconds.
-
-Quick Example
--------------
-
-    // limit capture operation to 3 video clips
-    var options = { limit: 3 };
-
-    navigator.device.capture.captureVideo(captureSuccess, captureError, options);
-
-BlackBerry WebWorks Quirks
---------------------------
-
-- The __duration__ parameter is not supported, so the length of recordings cannot be limited programmatically.
-
-iOS Quirks
-----------
-
-- The __limit__ parameter is not supported.  Only one video is recorded per invocation.
diff --git a/docs/media.getCurrentPosition.md b/docs/media.getCurrentPosition.md
deleted file mode 100644
index 171bec6..0000000
--- a/docs/media.getCurrentPosition.md
+++ /dev/null
@@ -1,176 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-media.getCurrentPosition
-========================
-
-Returns the current position within an audio file.
-
-    media.getCurrentPosition(mediaSuccess, [mediaError]);
-
-Parameters
-----------
-
-- __mediaSuccess__: The callback that is passed the current position in seconds.
-- __mediaError__: (Optional) The callback to execute if an error occurs.
-
-Description
------------
-
-An asynchronous function that returns the current position of the
-underlying audio file of a `Media` object. Also updates the `Media`
-object's `position` parameter.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    // Audio player
-    //
-    var my_media = new Media(src, onSuccess, onError);
-
-    // Update media position every second
-    var mediaTimer = setInterval(function () {
-        // get media position
-        my_media.getCurrentPosition(
-            // success callback
-            function (position) {
-                if (position > -1) {
-                    console.log((position) + " sec");
-                }
-            },
-            // error callback
-            function (e) {
-                console.log("Error getting pos=" + e);
-            }
-        );
-    }, 1000);
-
-Full Example
-------------
-
-        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-                      "http://www.w3.org/TR/html4/strict.dtd">
-        <html>
-          <head>
-            <title>Media Example</title>
-
-            <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.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() {
-                playAudio("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3");
-            }
-
-            // Audio player
-            //
-            var my_media = null;
-            var mediaTimer = null;
-
-            // Play audio
-            //
-            function playAudio(src) {
-                // Create Media object from src
-                my_media = new Media(src, onSuccess, onError);
-
-                // Play audio
-                my_media.play();
-
-                // Update my_media position every second
-                if (mediaTimer == null) {
-                    mediaTimer = setInterval(function() {
-                        // get my_media position
-                        my_media.getCurrentPosition(
-                            // success callback
-                            function(position) {
-                                if (position > -1) {
-                                    setAudioPosition((position) + " sec");
-                                }
-                            },
-                            // error callback
-                            function(e) {
-                                console.log("Error getting pos=" + e);
-                                setAudioPosition("Error: " + e);
-                            }
-                        );
-                    }, 1000);
-                }
-            }
-
-            // Pause audio
-            //
-            function pauseAudio() {
-                if (my_media) {
-                    my_media.pause();
-                }
-            }
-
-            // Stop audio
-            //
-            function stopAudio() {
-                if (my_media) {
-                    my_media.stop();
-                }
-                clearInterval(mediaTimer);
-                mediaTimer = null;
-            }
-
-            // onSuccess Callback
-            //
-            function onSuccess() {
-                console.log("playAudio():Audio Success");
-            }
-
-            // onError Callback
-            //
-            function onError(error) {
-                alert('code: '    + error.code    + '\n' +
-                      'message: ' + error.message + '\n');
-            }
-
-            // Set audio position
-            //
-            function setAudioPosition(position) {
-                document.getElementById('audio_position').innerHTML = position;
-            }
-
-            </script>
-          </head>
-          <body>
-            <a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');">Play Audio</a>
-            <a href="#" class="btn large" onclick="pauseAudio();">Pause Playing Audio</a>
-            <a href="#" class="btn large" onclick="stopAudio();">Stop Playing Audio</a>
-            <p id="audio_position"></p>
-          </body>
-        </html>
diff --git a/docs/media.getDuration.md b/docs/media.getDuration.md
deleted file mode 100644
index f48f9a0..0000000
--- a/docs/media.getDuration.md
+++ /dev/null
@@ -1,167 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-media.getDuration
-=================
-
-Returns the duration of an audio file.
-
-    media.getDuration();
-
-Description
------------
-
-The `media.getDuration` method executes synchronously, returning the
-duration of the audio file in seconds, if known.  If the duration is
-unknown, it returns a value of -1.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    // Audio player
-    //
-    var my_media = new Media(src, onSuccess, onError);
-
-    // Get duration
-    var counter = 0;
-    var timerDur = setInterval(function() {
-        counter = counter + 100;
-        if (counter > 2000) {
-            clearInterval(timerDur);
-        }
-        var dur = my_media.getDuration();
-        if (dur > 0) {
-            clearInterval(timerDur);
-            document.getElementById('audio_duration').innerHTML = (dur) + " sec";
-        }
-    }, 100);
-
-Full Example
-------------
-
-        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-                              "http://www.w3.org/TR/html4/strict.dtd">
-        <html>
-          <head>
-            <title>Media Example</title>
-
-            <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.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() {
-                playAudio("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3");
-            }
-
-            // Audio player
-            //
-            var my_media = null;
-            var mediaTimer = null;
-
-            // Play audio
-            //
-            function playAudio(src) {
-                // Create Media object from src
-                my_media = new Media(src, onSuccess, onError);
-
-                // Play audio
-                my_media.play();
-
-                // Update my_media position every second
-                if (mediaTimer == null) {
-                    mediaTimer = setInterval(function() {
-                        // get my_media position
-                        my_media.getCurrentPosition(
-                            // success callback
-                            function(position) {
-                                if (position > -1) {
-                                    setAudioPosition((position) + " sec");
-                                }
-                            },
-                            // error callback
-                            function(e) {
-                                console.log("Error getting pos=" + e);
-                                setAudioPosition("Error: " + e);
-                            }
-                        );
-                    }, 1000);
-                }
-            }
-
-            // Pause audio
-            //
-            function pauseAudio() {
-                if (my_media) {
-                    my_media.pause();
-                }
-            }
-
-            // Stop audio
-            //
-            function stopAudio() {
-                if (my_media) {
-                    my_media.stop();
-                }
-                clearInterval(mediaTimer);
-                mediaTimer = null;
-            }
-
-            // onSuccess Callback
-            //
-            function onSuccess() {
-                console.log("playAudio():Audio Success");
-            }
-
-            // onError Callback
-            //
-            function onError(error) {
-                alert('code: '    + error.code    + '\n' +
-                      'message: ' + error.message + '\n');
-            }
-
-            // Set audio position
-            //
-            function setAudioPosition(position) {
-                document.getElementById('audio_position').innerHTML = position;
-            }
-
-            </script>
-          </head>
-          <body>
-            <a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');">Play Audio</a>
-            <a href="#" class="btn large" onclick="pauseAudio();">Pause Playing Audio</a>
-            <a href="#" class="btn large" onclick="stopAudio();">Stop Playing Audio</a>
-            <p id="audio_position"></p>
-          </body>
-        </html>
diff --git a/docs/media.md b/docs/media.md
deleted file mode 100644
index 79d706b..0000000
--- a/docs/media.md
+++ /dev/null
@@ -1,145 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-Media
-=====
-
-> The `Media` object provides the ability to record and play back audio files on a device.
-
-    var media = new Media(src, mediaSuccess, [mediaError], [mediaStatus]);
-
-__NOTE:__ The current implementation does not adhere to a W3C
-specification for media capture, and is provided for convenience only.
-A future implementation will adhere to the latest W3C specification
-and may deprecate the current APIs.
-
-Parameters
-----------
-
-- __src__: A URI containing the audio content. _(DOMString)_
-- __mediaSuccess__: (Optional) The callback that executes after a `Media` object has completed the current play, record, or stop action. _(Function)_
-- __mediaError__: (Optional) The callback that executes if an error occurs. _(Function)_
-- __mediaStatus__: (Optional) The callback that executes to indicate status changes. _(Function)_
-
-Constants
----------
-
-The following constants are reported as the only parameter to the
-`mediaStatus` callback:
-
-- `Media.MEDIA_NONE`     = 0;
-- `Media.MEDIA_STARTING` = 1;
-- `Media.MEDIA_RUNNING`  = 2;
-- `Media.MEDIA_PAUSED`   = 3;
-- `Media.MEDIA_STOPPED`  = 4;
-
-Methods
--------
-
-- `media.getCurrentPosition`: Returns the current position within an audio file.
-- `media.getDuration`: Returns the duration of an audio file.
-- `media.play`: Start or resume playing an audio file.
-- `media.pause`: Pause playback of an audio file.
-- `media.release`: Releases the underlying operating system's audio resources.
-- `media.seekTo`: Moves the position within the audio file.
-- `media.setVolume`: Set the volume for audio playback.
-- `media.startRecord`: Start recording an audio file.
-- `media.stopRecord`: Stop recording an audio file.
-- `media.stop`: Stop playing an audio file.
-
-Additional ReadOnly Parameters
----------------------
-
-- __position__: The position within the audio playback, in seconds.
-    - Not automatically updated during play; call `getCurrentPosition` to update.
-- __duration__: The duration of the media, in seconds.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7.5
-- Tizen
-- Windows 8
-
-Permissions
------------
-
-### Android
-
-#### app/res/xml/config.xml
-
-    <plugin name="Media" value="org.apache.cordova.AudioHandler" />
-
-#### app/AndroidManifest.xml
-
-    <uses-permission android:name="android.permission.RECORD_AUDIO" />
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-
-### Bada
-
-#### manifest.xml
-
-    <Privilege>
-        <Name>RECORDING</Name>
-    </Privilege>
-
-### BlackBerry WebWorks
-
-#### www/plugins.xml
-
-    <plugin name="Capture" value="org.apache.cordova.media.MediaCapture" />
-
-### iOS
-
-#### config.xml
-
-    <plugin name="Media" value="CDVSound" />
-
-### webOS
-
-    No permissions are required.
-
-### Windows Phone
-
-#### Properties/WPAppManifest.xml
-
-    <Capabilities>
-        <Capability Name="ID_CAP_MEDIALIB" />
-        <Capability Name="ID_CAP_MICROPHONE" />
-        <Capability Name="ID_HW_FRONTCAMERA" />
-        <Capability Name="ID_CAP_ISV_CAMERA" />
-        <Capability Name="ID_CAP_CAMERA" />
-    </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.
-
-### Windows Phone Quirks
-
-- Only one media file can be played back at a time.
-- There are strict restrictions on how your application interacts with other media. See the [Microsoft documentation for details][url].
-
-[url]: http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh184838(v=vs.92).aspx
diff --git a/docs/media.pause.md b/docs/media.pause.md
deleted file mode 100644
index aa72280..0000000
--- a/docs/media.pause.md
+++ /dev/null
@@ -1,167 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-media.pause
-===========
-
-Pauses playing an audio file.
-
-    media.pause();
-
-Description
------------
-
-The `media.pause` method executes synchronously, and pauses playing an audio file.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    // Play audio
-    //
-    function playAudio(url) {
-        // Play the audio file at url
-        var my_media = new Media(url,
-            // success callback
-            function () { console.log("playAudio():Audio Success"); },
-            // error callback
-            function (err) { console.log("playAudio():Audio Error: " + err); }
-        );
-
-        // Play audio
-        my_media.play();
-
-        // Pause after 10 seconds
-        setTimeout(function () {
-            media.pause();
-        }, 10000);
-    }
-
-Full Example
-------------
-
-        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-                              "http://www.w3.org/TR/html4/strict.dtd">
-        <html>
-          <head>
-            <title>Media Example</title>
-
-            <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.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() {
-                playAudio("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3");
-            }
-
-            // Audio player
-            //
-            var my_media = null;
-            var mediaTimer = null;
-
-            // Play audio
-            //
-            function playAudio(src) {
-                // Create Media object from src
-                my_media = new Media(src, onSuccess, onError);
-
-                // Play audio
-                my_media.play();
-
-                // Update my_media position every second
-                if (mediaTimer == null) {
-                    mediaTimer = setInterval(function() {
-                        // get my_media position
-                        my_media.getCurrentPosition(
-                            // success callback
-                            function(position) {
-                                if (position > -1) {
-                                    setAudioPosition((position) + " sec");
-                                }
-                            },
-                            // error callback
-                            function(e) {
-                                console.log("Error getting pos=" + e);
-                                setAudioPosition("Error: " + e);
-                            }
-                        );
-                    }, 1000);
-                }
-            }
-
-            // Pause audio
-            //
-            function pauseAudio() {
-                if (my_media) {
-                    my_media.pause();
-                }
-            }
-
-            // Stop audio
-            //
-            function stopAudio() {
-                if (my_media) {
-                    my_media.stop();
-                }
-                clearInterval(mediaTimer);
-                mediaTimer = null;
-            }
-
-            // onSuccess Callback
-            //
-            function onSuccess() {
-                console.log("playAudio():Audio Success");
-            }
-
-            // onError Callback
-            //
-            function onError(error) {
-                alert('code: '    + error.code    + '\n' +
-                      'message: ' + error.message + '\n');
-            }
-
-            // Set audio position
-            //
-            function setAudioPosition(position) {
-                document.getElementById('audio_position').innerHTML = position;
-            }
-
-            </script>
-          </head>
-          <body>
-            <a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');">Play Audio</a>
-            <a href="#" class="btn large" onclick="pauseAudio();">Pause Playing Audio</a>
-            <a href="#" class="btn large" onclick="stopAudio();">Stop Playing Audio</a>
-            <p id="audio_position"></p>
-          </body>
-        </html>
diff --git a/docs/media.play.md b/docs/media.play.md
deleted file mode 100644
index 19899db..0000000
--- a/docs/media.play.md
+++ /dev/null
@@ -1,200 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-media.play
-==========
-
-Starts or resumes playing an audio file.
-
-    media.play();
-
-Description
------------
-
-The `media.play` method executes synchronously, and starts or resumes
-playing an audio file.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    // Play audio
-    //
-    function playAudio(url) {
-        // Play the audio file at url
-        var my_media = new Media(url,
-            // success callback
-            function () {
-                console.log("playAudio():Audio Success");
-            },
-            // error callback
-            function (err) {
-                console.log("playAudio():Audio Error: " + err);
-            }
-        );
-        // Play audio
-        my_media.play();
-    }
-
-Full Example
-------------
-
-        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-                              "http://www.w3.org/TR/html4/strict.dtd">
-        <html>
-          <head>
-            <title>Media Example</title>
-
-            <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.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() {
-                playAudio("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3");
-            }
-
-            // Audio player
-            //
-            var my_media = null;
-            var mediaTimer = null;
-
-            // Play audio
-            //
-            function playAudio(src) {
-                if (my_media == null) {
-                    // Create Media object from src
-                    my_media = new Media(src, onSuccess, onError);
-                } // else play current audio
-                // Play audio
-                my_media.play();
-
-                // Update my_media position every second
-                if (mediaTimer == null) {
-                    mediaTimer = setInterval(function() {
-                        // get my_media position
-                        my_media.getCurrentPosition(
-                            // success callback
-                            function(position) {
-                                if (position > -1) {
-                                    setAudioPosition((position) + " sec");
-                                }
-                            },
-                            // error callback
-                            function(e) {
-                                console.log("Error getting pos=" + e);
-                                setAudioPosition("Error: " + e);
-                            }
-                        );
-                    }, 1000);
-                }
-            }
-
-            // Pause audio
-            //
-            function pauseAudio() {
-                if (my_media) {
-                    my_media.pause();
-                }
-            }
-
-            // Stop audio
-            //
-            function stopAudio() {
-                if (my_media) {
-                    my_media.stop();
-                }
-                clearInterval(mediaTimer);
-                mediaTimer = null;
-            }
-
-            // onSuccess Callback
-            //
-            function onSuccess() {
-                console.log("playAudio():Audio Success");
-            }
-
-            // onError Callback
-            //
-            function onError(error) {
-                alert('code: '    + error.code    + '\n' +
-                      'message: ' + error.message + '\n');
-            }
-
-            // Set audio position
-            //
-            function setAudioPosition(position) {
-                document.getElementById('audio_position').innerHTML = position;
-            }
-
-            </script>
-          </head>
-          <body>
-            <a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');">Play Audio</a>
-            <a href="#" class="btn large" onclick="pauseAudio();">Pause Playing Audio</a>
-            <a href="#" class="btn large" onclick="stopAudio();">Stop Playing Audio</a>
-            <p id="audio_position"></p>
-          </body>
-        </html>
-
-BlackBerry WebWorks Quirks
-----------
-
-- BlackBerry devices support a limited number of simultaneous audio
-  channels. CDMA devices only support a single audio channel. Other
-  devices support up to two simultaneous channels. An attempt to play
-  more audio files than the supported amount results in previous
-  playback being stopped.
-
-iOS Quirks
-----------
-
-- __numberOfLoops__: Pass this option to the `play` method to specify
-  the number of times you want the media file to play, e.g.:
-
-        var myMedia = new Media("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3")
-        myMedia.play({ numberOfLoops: 2 })
-
-- __playAudioWhenScreenIsLocked__: Pass in this option to the `play`
-  method to specify whether you want to allow playback when the screen
-  is locked.  If set to `true` (the default value), the state of the
-  hardware mute button is ignored, e.g.:
-
-        var myMedia = new Media("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3")
-        myMedia.play({ playAudioWhenScreenIsLocked : false })
-
-- __order of file search__: When only a file name or simple path is
-  provided, iOS searches in the `www` directory for the file, then in
-  the application's `documents/tmp` directory:
-
-        var myMedia = new Media("audio/beer.mp3")
-        myMedia.play()  // first looks for file in www/audio/beer.mp3 then in <application>/documents/tmp/audio/beer.mp3
diff --git a/docs/media.release.md b/docs/media.release.md
deleted file mode 100644
index 5ce1c4a..0000000
--- a/docs/media.release.md
+++ /dev/null
@@ -1,159 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-media.release
-=================
-
-Releases the underlying operating system's audio resources.
-
-    media.release();
-
-Description
------------
-
-The `media.release` method executes synchronously, releasing the
-underlying operating system's audio resources.  This is particularly
-important for Android, since there are a finite amount of OpenCore
-instances for media playback. Applications should call the `release`
-function for any `Media` resource that is no longer needed.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    // Audio player
-    //
-    var my_media = new Media(src, onSuccess, onError);
-
-    my_media.play();
-    my_media.stop();
-    my_media.release();
-
-Full Example
-------------
-
-        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-                              "http://www.w3.org/TR/html4/strict.dtd">
-        <html>
-          <head>
-            <title>Media Example</title>
-
-            <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.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() {
-                playAudio("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3");
-            }
-
-            // Audio player
-            //
-            var my_media = null;
-            var mediaTimer = null;
-
-            // Play audio
-            //
-            function playAudio(src) {
-                // Create Media object from src
-                my_media = new Media(src, onSuccess, onError);
-
-                // Play audio
-                my_media.play();
-
-                // Update my_media position every second
-                if (mediaTimer == null) {
-                    mediaTimer = setInterval(function() {
-                        // get my_media position
-                        my_media.getCurrentPosition(
-                            // success callback
-                            function(position) {
-                                if (position > -1) {
-                                    setAudioPosition((position) + " sec");
-                                }
-                            },
-                            // error callback
-                            function(e) {
-                                console.log("Error getting pos=" + e);
-                                setAudioPosition("Error: " + e);
-                            }
-                        );
-                    }, 1000);
-                }
-            }
-
-            // Pause audio
-            //
-            function pauseAudio() {
-                if (my_media) {
-                    my_media.pause();
-                }
-            }
-
-            // Stop audio
-            //
-            function stopAudio() {
-                if (my_media) {
-                    my_media.stop();
-                }
-                clearInterval(mediaTimer);
-                mediaTimer = null;
-            }
-
-            // onSuccess Callback
-            //
-            function onSuccess() {
-                console.log("playAudio():Audio Success");
-            }
-
-            // onError Callback
-            //
-            function onError(error) {
-                alert('code: '    + error.code    + '\n' +
-                      'message: ' + error.message + '\n');
-            }
-
-            // Set audio position
-            //
-            function setAudioPosition(position) {
-                document.getElementById('audio_position').innerHTML = position;
-            }
-
-            </script>
-          </head>
-          <body>
-            <a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');">Play Audio</a>
-            <a href="#" class="btn large" onclick="pauseAudio();">Pause Playing Audio</a>
-            <a href="#" class="btn large" onclick="stopAudio();">Stop Playing Audio</a>
-            <p id="audio_position"></p>
-          </body>
-        </html>
diff --git a/docs/media.seekTo.md b/docs/media.seekTo.md
deleted file mode 100644
index 371705c..0000000
--- a/docs/media.seekTo.md
+++ /dev/null
@@ -1,161 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-media.seekTo
-========================
-
-Sets the current position within an audio file.
-
-    media.seekTo(milliseconds);
-
-Parameters
-----------
-
-- __milliseconds__: The position to set the playback position within the audio, in milliseconds.
-
-Description
------------
-
-The `media.seekTo` executes asynchronously, updating the current
-playback position within an audio file referenced by a `Media`
-object. Also updates the `Media` object's `position` parameter.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 6.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    // Audio player
-    //
-    var my_media = new Media(src, onSuccess, onError);
-        my_media.play();
-    // SeekTo to 10 seconds after 5 seconds
-    setTimeout(function() {
-        my_media.seekTo(10000);
-    }, 5000);
-
-Full Example
-------------
-
-        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
-                              "http://www.w3.org/TR/html4/strict.dtd">
-        <html>
-          <head>
-            <title>Media Example</title>
-
-            <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.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() {
-                playAudio("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3");
-            }
-
-            // Audio player
-            //
-            var my_media = null;
-            var mediaTimer = null;
-
-            // Play audio
-            //
-            function playAudio(src) {
-                // Create Media object from src
-                my_media = new Media(src, onSuccess, onError);
-
-                // Play audio
-                my_media.play();
-
-                // Update media position every second
-                mediaTimer = setInterval(function() {
-                    // get media position
-                    my_media.getCurrentPosition(
-                        // success callback
-                        function(position) {
-                            if (position > -1) {
-                                setAudioPosition(position + " sec");
-                            }
-                        },
-                        // error callback
-                        function(e) {
-                            console.log("Error getting pos=" + e);
-                        }
-                    );
-                }, 1000);
-
-                // SeekTo to 10 seconds after 5 seconds
-                setTimeout(function() {
-                    my_media.seekTo(10000);
-                }, 5000);
-            }
-
-            // Stop audio
-            //
-            function stopAudio() {
-                if (my_media) {
-                    my_media.stop();
-                }
-                clearInterval(mediaTimer);
-                mediaTimer = null;
-            }
-
-            // onSuccess Callback
-            //
-            function onSuccess() {
-                console.log("playAudio():Audio Success");
-            }
-
-            // onError Callback
-            //
-            function onError(error) {
-                alert('code: '    + error.code    + '\n' +
-                      'message: ' + error.message + '\n');
-            }
-
-            // Set audio position
-            //
-            function setAudioPosition(position) {
-                document.getElementById('audio_position').innerHTML = position;
-            }
-
-            </script>
-          </head>
-          <body>
-            <a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');">Play Audio</a>
-            <a href="#" class="btn large" onclick="stopAudio();">Stop Playing Audio</a>
-            <p id="audio_position"></p>
-          </body>
-        </html>
-
-BlackBerry WebWorks Quirks
-----------
-
-- Not supported on BlackBerry OS 5 devices.
diff --git a/docs/media.setVolume.md b/docs/media.setVolume.md
deleted file mode 100644
index 6c0c91c..0000000
--- a/docs/media.setVolume.md
+++ /dev/null
@@ -1,178 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-media.setVolume
-===========
-
-Set the volume for an audio file.
-
-    media.setVolume(volume);
-
-Paramters
----------
-
-- __volume__: The volume to set for playback.  The value must be within the range of 0.0 to 1.0.
-
-Description
------------
-
-Function `media.setVolume` is an asynchronous function that sets the volume during audio playback.
-
-Supported Platforms
--------------------
-
-- Android
-- iOS
-
-Quick Example
--------------
-
-    // Play audio
-    //
-    function playAudio(url) {
-        // Play the audio file at url
-        var my_media = new Media(url,
-            // success callback
-            function() {
-                console.log("playAudio():Audio Success");
-            },
-            // error callback
-            function(err) {
-                console.log("playAudio():Audio Error: "+err);
-        });
-
-        // Play audio
-        my_media.play();
-
-        // Mute volume after 2 seconds
-        setTimeout(function() {
-            my_media.setVolume('0.0');
-        }, 2000);
-
-        // Set volume to 1.0 after 5 seconds
-        setTimeout(function() {
-            my_media.setVolume('1.0');
-        }, 5000);
-    }
-
-
-Full Example
-------------
-
-        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-                              "http://www.w3.org/TR/html4/strict.dtd">
-        <html>
-          <head>
-            <title>Media Example</title>
-
-            <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
-            <script type="text/javascript" charset="utf-8">
-
-            // Wait for Cordova to load
-            //
-            document.addEventListener("deviceready", onDeviceReady, false);
-
-            // Cordova is ready
-            //
-            function onDeviceReady() {
-                playAudio("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3");
-            }
-
-            // Audio player
-            //
-            var my_media = null;
-            var mediaTimer = null;
-
-            // Play audio
-            //
-            function playAudio(src) {
-                // Create Media object from src
-                my_media = new Media(src, onSuccess, onError);
-
-                // Play audio
-                my_media.play();
-
-                // Update my_media position every second
-                if (mediaTimer == null) {
-                    mediaTimer = setInterval(function() {
-                        // get my_media position
-                        my_media.getCurrentPosition(
-                            // success callback
-                            function(position) {
-                                if (position > -1) {
-                                    setAudioPosition((position) + " sec");
-                                }
-                            },
-                            // error callback
-                            function(e) {
-                                console.log("Error getting pos=" + e);
-                                setAudioPosition("Error: " + e);
-                            }
-                        );
-                    }, 1000);
-                }
-            }
-
-            // Set audio volume
-            //
-            function setVolume(volume) {
-                if (my_media) {
-                    my_media.setVolume(volume);
-                }
-            }
-
-            // Stop audio
-            //
-            function stopAudio() {
-                if (my_media) {
-                    my_media.stop();
-                }
-                clearInterval(mediaTimer);
-                mediaTimer = null;
-            }
-
-            // onSuccess Callback
-            //
-            function onSuccess() {
-                console.log("playAudio():Audio Success");
-            }
-
-            // onError Callback
-            //
-            function onError(error) {
-                alert('code: '    + error.code    + '\n' + 
-                      'message: ' + error.message + '\n');
-            }
-
-            // Set audio position
-            //
-            function setAudioPosition(position) {
-                document.getElementById('audio_position').innerHTML = position;
-            }
-
-            </script>
-          </head>
-          <body>
-            <a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');">Play Audio</a>
-            <a href="#" class="btn large" onclick="setVolume('0.0');">Mute Audio</a>
-            <a href="#" class="btn large" onclick="setVolume('1.0');">Unmute Audio</a>
-            <a href="#" class="btn large" onclick="stopAudio();">Stop Playing Audio</a>
-            <p id="audio_position"></p>
-          </body>
-        </html>
diff --git a/docs/media.startRecord.md b/docs/media.startRecord.md
deleted file mode 100644
index b94cee9..0000000
--- a/docs/media.startRecord.md
+++ /dev/null
@@ -1,155 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-media.startRecord
-=================
-
-Starts recording an audio file.
-
-    media.startRecord();
-
-Description
------------
-
-The `media.startRecord` method executes synchronously, starts a
-recording for an audio file.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Windows 8
-
-Quick Example
--------------
-
-    // Record audio
-    //
-    function recordAudio() {
-        var src = "myrecording.mp3";
-        var mediaRec = new Media(src,
-            // success callback
-            function() {
-                console.log("recordAudio():Audio Success");
-            },
-
-            // error callback
-            function(err) {
-                console.log("recordAudio():Audio Error: "+ err.code);
-            });
-
-        // Record audio
-        mediaRec.startRecord();
-    }
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Device Properties Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for device API libraries to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-        // Record audio
-        //
-        function recordAudio() {
-            var src = "myrecording.amr";
-            var mediaRec = new Media(src, onSuccess, onError);
-
-            // Record audio
-            mediaRec.startRecord();
-
-            // Stop recording after 10 sec
-            var recTime = 0;
-            var recInterval = setInterval(function() {
-                recTime = recTime + 1;
-                setAudioPosition(recTime + " sec");
-                if (recTime >= 10) {
-                    clearInterval(recInterval);
-                    mediaRec.stopRecord();
-                }
-            }, 1000);
-        }
-
-        // device APIs are available
-        //
-        function onDeviceReady() {
-            recordAudio();
-        }
-
-        // onSuccess Callback
-        //
-        function onSuccess() {
-            console.log("recordAudio():Audio Success");
-        }
-
-        // onError Callback
-        //
-        function onError(error) {
-            alert('code: '    + error.code    + '\n' +
-                  'message: ' + error.message + '\n');
-        }
-
-        // Set audio position
-        //
-        function setAudioPosition(position) {
-            document.getElementById('audio_position').innerHTML = position;
-        }
-
-        </script>
-      </head>
-      <body>
-        <p id="media">Recording audio...</p>
-        <p id="audio_position"></p>
-      </body>
-    </html>
-
-Android Quirks
-----------
-
-- Android devices record audio in Adaptive Multi-Rate format. The specified file should end with a _.amr_ extension.
-
-BlackBerry WebWorks Quirks
-----------
-
-- BlackBerry devices record audio in Adaptive Multi-Rate format. The specified file must end with a _.amr_ extension.
-
-iOS Quirks
-----------
-
-- iOS only records to files of type _.wav_ and returns an error if the file name extension is not correct.
-- If a full path is not provided, the recording is placed in the application's _documents/tmp_ directory. This can be accessed via the `File` API using `LocalFileSystem.TEMPORARY`. Any subdirectory specified at record time must already exist.
-- Files can be recorded and played back using the documents URI:
-
-        var myMedia = new Media("documents://beer.mp3")
-
-Tizen Quirks
-----------
-
-- Not supported on Tizen devices.
diff --git a/docs/media.stop.md b/docs/media.stop.md
deleted file mode 100644
index 77318d6..0000000
--- a/docs/media.stop.md
+++ /dev/null
@@ -1,172 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-media.stop
-==========
-
-Stops playing an audio file.
-
-    media.stop();
-
-Description
------------
-
-The `media.stop` method executes synchronously to stop playing an
-audio file.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    // Play audio
-    //
-    function playAudio(url) {
-        // Play the audio file at url
-        var my_media = new Media(url,
-            // success callback
-            function() {
-                console.log("playAudio():Audio Success");
-            },
-            // error callback
-            function(err) {
-                console.log("playAudio():Audio Error: "+err);
-            }
-        );
-
-        // Play audio
-        my_media.play();
-
-        // Pause after 10 seconds
-        setTimeout(function() {
-            my_media.stop();
-        }, 10000);
-    }
-
-Full Example
-------------
-
-        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-                              "http://www.w3.org/TR/html4/strict.dtd">
-        <html>
-          <head>
-            <title>Media Example</title>
-
-            <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.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() {
-                playAudio("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3");
-            }
-
-            // Audio player
-            //
-            var my_media = null;
-            var mediaTimer = null;
-
-            // Play audio
-            //
-            function playAudio(src) {
-                // Create Media object from src
-                my_media = new Media(src, onSuccess, onError);
-
-                // Play audio
-                my_media.play();
-
-                // Update my_media position every second
-                if (mediaTimer == null) {
-                    mediaTimer = setInterval(function() {
-                        // get my_media position
-                        my_media.getCurrentPosition(
-                            // success callback
-                            function(position) {
-                                if (position > -1) {
-                                    setAudioPosition((position) + " sec");
-                                }
-                            },
-                            // error callback
-                            function(e) {
-                                console.log("Error getting pos=" + e);
-                                setAudioPosition("Error: " + e);
-                            }
-                        );
-                    }, 1000);
-                }
-            }
-
-            // Pause audio
-            //
-            function pauseAudio() {
-                if (my_media) {
-                    my_media.pause();
-                }
-            }
-
-            // Stop audio
-            //
-            function stopAudio() {
-                if (my_media) {
-                    my_media.stop();
-                }
-                clearInterval(mediaTimer);
-                mediaTimer = null;
-            }
-
-            // onSuccess Callback
-            //
-            function onSuccess() {
-                console.log("playAudio():Audio Success");
-            }
-
-            // onError Callback
-            //
-            function onError(error) {
-                alert('code: '    + error.code    + '\n' +
-                      'message: ' + error.message + '\n');
-            }
-
-            // Set audio position
-            //
-            function setAudioPosition(position) {
-                document.getElementById('audio_position').innerHTML = position;
-            }
-
-            </script>
-          </head>
-          <body>
-            <a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');">Play Audio</a>
-            <a href="#" class="btn large" onclick="pauseAudio();">Pause Playing Audio</a>
-            <a href="#" class="btn large" onclick="stopAudio();">Stop Playing Audio</a>
-            <p id="audio_position"></p>
-          </body>
-        </html>
diff --git a/docs/media.stopRecord.md b/docs/media.stopRecord.md
deleted file mode 100644
index 03fc246..0000000
--- a/docs/media.stopRecord.md
+++ /dev/null
@@ -1,142 +0,0 @@
----
-license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-media.stopRecord
-================
-
-Stops recording an audio file.
-
-    media.stopRecord();
-
-Description
------------
-
-The `media.stopRecord` method executes synchronously, stopping the
-recording of an audio file.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Windows 8
-
-Quick Example
--------------
-
-    // Record audio
-    //
-    function recordAudio() {
-        var src = "myrecording.mp3";
-        var mediaRec = new Media(src,
-            // success callback
-            function() {
-                console.log("recordAudio():Audio Success");
-            },
-
-            // error callback
-            function(err) {
-                console.log("recordAudio():Audio Error: "+ err.code);
-            }
-        );
-
-        // Record audio
-        mediaRec.startRecord();
-
-        // Stop recording after 10 seconds
-        setTimeout(function() {
-            mediaRec.stopRecord();
-        }, 10000);
-    }
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Device Properties Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for device API libraries to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-        // Record audio
-        //
-        function recordAudio() {
-            var src = "myrecording.mp3";
-            var mediaRec = new Media(src, onSuccess, onError);
-
-            // Record audio
-            mediaRec.startRecord();
-
-            // Stop recording after 10 sec
-            var recTime = 0;
-            var recInterval = setInterval(function() {
-                recTime = recTime + 1;
-                setAudioPosition(recTime + " sec");
-                if (recTime >= 10) {
-                    clearInterval(recInterval);
-                    mediaRec.stopRecord();
-                }
-            }, 1000);
-        }
-
-        // device APIs are available
-        //
-        function onDeviceReady() {
-            recordAudio();
-        }
-
-        // onSuccess Callback
-        //
-        function onSuccess() {
-            console.log("recordAudio():Audio Success");
-        }
-
-        // onError Callback
-        //
-        function onError(error) {
-            alert('code: '    + error.code    + '\n' +
-                  'message: ' + error.message + '\n');
-        }
-
-        // Set audio position
-        //
-        function setAudioPosition(position) {
-            document.getElementById('audio_position').innerHTML = position;
-        }
-
-        </script>
-      </head>
-      <body>
-        <p id="media">Recording audio...</p>
-        <p id="audio_position"></p>
-      </body>
-    </html>
-
-Tizen Quirks
-----------
-
-- Not supported on Tizen devices.
diff --git a/plugin.xml b/plugin.xml
index e1160cf..a15737e 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -2,15 +2,17 @@
 
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
 xmlns:android="http://schemas.android.com/apk/res/android"
-           id="org.apache.cordova.core.media-capture"
-      version="0.2.0">
+           id="org.apache.cordova.media-capture"
+      version="0.2.6">
     <name>Capture</name>
 
     <description>Cordova Media Capture Plugin</description>
     <license>Apache 2.0</license>
     <keywords>cordova,media,capture</keywords>
+    <repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture.git</repo>
+    <issue>https://issues.apache.org/jira/browse/CB/component/12320646</issue>
     
-    <dependency id="org.apache.cordova.core.file" url="https://git-wip-us.apache.org/repos/asf/cordova-plugin-file" commit="master" />
+    <dependency id="org.apache.cordova.file" />
 
     <js-module src="www/CaptureAudioOptions.js" name="CaptureAudioOptions">
         <clobbers target="CaptureAudioOptions" />
@@ -55,8 +57,44 @@
         </config-file>
 
         <source-file src="src/android/Capture.java" target-dir="src/org/apache/cordova/mediacapture" />
+        <source-file src="src/android/FileHelper.java" target-dir="src/org/apache/cordova/mediacapture" />
     </platform>
     
+    <!-- amazon-fireos -->
+    <platform name="amazon-fireos">
+        <config-file target="res/xml/config.xml" parent="/*">
+            <feature name="Capture" >
+                <param name="android-package" value="org.apache.cordova.mediacapture.Capture"/>
+            </feature>
+        </config-file>
+        
+        <config-file target="AndroidManifest.xml" parent="/*">
+            <uses-permission android:name="android.permission.RECORD_AUDIO" />
+            <uses-permission android:name="android.permission.RECORD_VIDEO"/>
+            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+        </config-file>
+
+        <source-file src="src/android/Capture.java" target-dir="src/org/apache/cordova/mediacapture" />
+        <source-file src="src/android/FileHelper.java" target-dir="src/org/apache/cordova/mediacapture" />
+    </platform>
+    
+
+    <!-- ubuntu -->
+    <platform name="ubuntu">
+        <header-file src="src/ubuntu/capture.h" />
+        <source-file src="src/ubuntu/capture.cpp" />
+
+        <resource-file src="src/ubuntu/back.png" />
+        <resource-file src="src/ubuntu/MediaCaptureWidget.qml" />
+        <resource-file src="src/ubuntu/shoot.png" />
+        <resource-file src="src/ubuntu/microphone.png" />
+        <resource-file src="src/ubuntu/record_on.png" />
+        <resource-file src="src/ubuntu/record_off.png" />
+        <resource-file src="src/ubuntu/toolbar-left.png" />
+        <resource-file src="src/ubuntu/toolbar-middle.png" />
+        <resource-file src="src/ubuntu/toolbar-right.png" />
+    </platform>
+
     <!-- ios -->
     <platform name="ios">    
         <config-file target="config.xml" parent="/*">
@@ -132,7 +170,7 @@
     <platform name="windows8">
 
         <js-module src="src/windows8/MediaFile.js" name="MediaFile2">
-            <clobbers target="MediaFile" />
+            <merges target="MediaFile" />
         </js-module>
 
         <js-module src="src/windows8/CaptureProxy.js" name="CaptureProxy">
diff --git a/src/android/Capture.java b/src/android/Capture.java
index 31443be..2318a06 100644
--- a/src/android/Capture.java
+++ b/src/android/Capture.java
@@ -24,12 +24,11 @@
 import java.io.OutputStream;
 
 import android.os.Build;
+
 import org.apache.cordova.CallbackContext;
 import org.apache.cordova.CordovaPlugin;
 import org.apache.cordova.LOG;
 import org.apache.cordova.PluginResult;
-import org.apache.cordova.FileHelper;
-import org.apache.cordova.DirectoryManager;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
@@ -120,6 +119,7 @@
      * @return a MediaFileData object
      */
     private JSONObject getFormatData(String filePath, String mimeType) throws JSONException {
+        Uri fileUrl = filePath.startsWith("file:") ? Uri.parse(filePath) : Uri.fromFile(new File(filePath));
         JSONObject obj = new JSONObject();
         // setup defaults
         obj.put("height", 0);
@@ -131,12 +131,12 @@
         // If the mimeType isn't set the rest will fail
         // so let's see if we can determine it.
         if (mimeType == null || mimeType.equals("") || "null".equals(mimeType)) {
-            mimeType = FileHelper.getMimeType(filePath, cordova);
+            mimeType = FileHelper.getMimeType(fileUrl, cordova);
         }
         Log.d(LOG_TAG, "Mime type = " + mimeType);
 
         if (mimeType.equals(IMAGE_JPEG) || filePath.endsWith(".jpg")) {
-            obj = getImageData(filePath, obj);
+            obj = getImageData(fileUrl, obj);
         }
         else if (mimeType.endsWith(AUDIO_3GPP)) {
             obj = getAudioVideoData(filePath, obj, false);
@@ -155,10 +155,10 @@
      * @return a JSONObject that represents the Media File Data
      * @throws JSONException
      */
-    private JSONObject getImageData(String filePath, JSONObject obj) throws JSONException {
+    private JSONObject getImageData(Uri fileUrl, JSONObject obj) throws JSONException {
         BitmapFactory.Options options = new BitmapFactory.Options();
         options.inJustDecodeBounds = true;
-        BitmapFactory.decodeFile(FileHelper.stripFileProtocol(filePath), options);
+        BitmapFactory.decodeFile(fileUrl.getPath(), options);
         obj.put("height", options.outHeight);
         obj.put("width", options.outWidth);
         return obj;
@@ -198,6 +198,24 @@
         this.cordova.startActivityForResult((CordovaPlugin) this, intent, CAPTURE_AUDIO);
     }
 
+    private String getTempDirectoryPath() {
+        File cache = null;
+
+        // SD Card Mounted
+        if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
+            cache = new File(Environment.getExternalStorageDirectory().getAbsolutePath() +
+                    "/Android/data/" + cordova.getActivity().getPackageName() + "/cache/");
+        }
+        // Use internal storage
+        else {
+            cache = cordova.getActivity().getCacheDir();
+        }
+
+        // Create the cache directory if it doesn't exist
+        cache.mkdirs();
+        return cache.getAbsolutePath();
+    }
+
     /**
      * Sets up an intent to capture images.  Result handled by onActivityResult()
      */
@@ -208,7 +226,7 @@
         Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
 
         // Specify file so that large image is captured and returned
-        File photo = new File(DirectoryManager.getTempDirectoryPath(this.cordova.getActivity()), "Capture.jpg");
+        File photo = new File(getTempDirectoryPath(), "Capture.jpg");
         intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, Uri.fromFile(photo));
 
         this.cordova.startActivityForResult((CordovaPlugin) this, intent, CAPTURE_IMAGE);
@@ -235,94 +253,121 @@
      * @param intent            An Intent, which can return result data to the caller (various data can be attached to Intent "extras").
      * @throws JSONException
      */
-    public void onActivityResult(int requestCode, int resultCode, Intent intent) {
+    public void onActivityResult(int requestCode, int resultCode, final Intent intent) {
 
         // Result received okay
         if (resultCode == Activity.RESULT_OK) {
             // An audio clip was requested
             if (requestCode == CAPTURE_AUDIO) {
-                // Get the uri of the audio clip
-                Uri data = intent.getData();
-                // create a file object from the uri
-                results.put(createMediaFile(data));
 
-                if (results.length() >= limit) {
-                    // Send Uri back to JavaScript for listening to audio
-                    this.callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, results));
-                } else {
-                    // still need to capture more audio clips
-                    captureAudio();
-                }
+                final Capture that = this;
+                Runnable captureAudio = new Runnable() {
+
+                    @Override
+                    public void run() {
+                        // Get the uri of the audio clip
+                        Uri data = intent.getData();
+                        // create a file object from the uri
+                        results.put(createMediaFile(data));
+
+                        if (results.length() >= limit) {
+                            // Send Uri back to JavaScript for listening to audio
+                        	that.callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, results));
+                        } else {
+                            // still need to capture more audio clips
+                            captureAudio();
+                        }
+                    }
+                };
+                this.cordova.getThreadPool().execute(captureAudio);
             } else if (requestCode == CAPTURE_IMAGE) {
                 // For some reason if I try to do:
                 // Uri data = intent.getData();
                 // It crashes in the emulator and on my phone with a null pointer exception
                 // To work around it I had to grab the code from CameraLauncher.java
-                try {
-                    // Create entry in media store for image
-                    // (Don't use insertImage() because it uses default compression setting of 50 - no way to change it)
-                    ContentValues values = new ContentValues();
-                    values.put(android.provider.MediaStore.Images.Media.MIME_TYPE, IMAGE_JPEG);
-                    Uri uri = null;
-                    try {
-                        uri = this.cordova.getActivity().getContentResolver().insert(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
-                    } catch (UnsupportedOperationException e) {
-                        LOG.d(LOG_TAG, "Can't write to external media storage.");
+
+                final Capture that = this;
+                Runnable captureImage = new Runnable() {
+                    @Override
+                    public void run() {
                         try {
-                            uri = this.cordova.getActivity().getContentResolver().insert(android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI, values);
-                        } catch (UnsupportedOperationException ex) {
-                            LOG.d(LOG_TAG, "Can't write to internal media storage.");
-                            this.fail(createErrorObject(CAPTURE_INTERNAL_ERR, "Error capturing image - no media storage found."));
-                            return;
+                            // TODO Auto-generated method stub
+                            // Create entry in media store for image
+                            // (Don't use insertImage() because it uses default compression setting of 50 - no way to change it)
+                            ContentValues values = new ContentValues();
+                            values.put(android.provider.MediaStore.Images.Media.MIME_TYPE, IMAGE_JPEG);
+                            Uri uri = null;
+                            try {
+                                uri = that.cordova.getActivity().getContentResolver().insert(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
+                            } catch (UnsupportedOperationException e) {
+                                LOG.d(LOG_TAG, "Can't write to external media storage.");
+                                try {
+                                    uri = that.cordova.getActivity().getContentResolver().insert(android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI, values);
+                                } catch (UnsupportedOperationException ex) {
+                                    LOG.d(LOG_TAG, "Can't write to internal media storage.");
+                                    that.fail(createErrorObject(CAPTURE_INTERNAL_ERR, "Error capturing image - no media storage found."));
+                                    return;
+                                }
+                            }
+                            FileInputStream fis = new FileInputStream(getTempDirectoryPath() + "/Capture.jpg");
+                            OutputStream os = that.cordova.getActivity().getContentResolver().openOutputStream(uri);
+                            byte[] buffer = new byte[4096];
+                            int len;
+                            while ((len = fis.read(buffer)) != -1) {
+                                os.write(buffer, 0, len);
+                            }
+                            os.flush();
+                            os.close();
+                            fis.close();
+
+                            // Add image to results
+                            results.put(createMediaFile(uri));
+
+                            checkForDuplicateImage();
+
+                            if (results.length() >= limit) {
+                                // Send Uri back to JavaScript for viewing image
+                                that.callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, results));
+                            } else {
+                                // still need to capture more images
+                                captureImage();
+                            }
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                            that.fail(createErrorObject(CAPTURE_INTERNAL_ERR, "Error capturing image."));
                         }
                     }
-                    FileInputStream fis = new FileInputStream(DirectoryManager.getTempDirectoryPath(this.cordova.getActivity()) + "/Capture.jpg");
-                    OutputStream os = this.cordova.getActivity().getContentResolver().openOutputStream(uri);
-                    byte[] buffer = new byte[4096];
-                    int len;
-                    while ((len = fis.read(buffer)) != -1) {
-                        os.write(buffer, 0, len);
-                    }
-                    os.flush();
-                    os.close();
-                    fis.close();
-
-                    // Add image to results
-                    results.put(createMediaFile(uri));
-
-                    checkForDuplicateImage();
-
-                    if (results.length() >= limit) {
-                        // Send Uri back to JavaScript for viewing image
-                        this.callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, results));
-                    } else {
-                        // still need to capture more images
-                        captureImage();
-                    }
-                } catch (IOException e) {
-                    e.printStackTrace();
-                    this.fail(createErrorObject(CAPTURE_INTERNAL_ERR, "Error capturing image."));
-                }
+                };
+                this.cordova.getThreadPool().execute(captureImage);
             } else if (requestCode == CAPTURE_VIDEO) {
-                // Get the uri of the video clip
-                Uri data = intent.getData();
-                // create a file object from the uri
-                if(data == null)
-                {
-                    this.fail(createErrorObject(CAPTURE_NO_MEDIA_FILES, "Error: data is null"));
-                }
-                else
-                {
-                    results.put(createMediaFile(data));
 
-                    if (results.length() >= limit) {
-                        // Send Uri back to JavaScript for viewing video
-                        this.callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, results));
-                    } else {
-                        // still need to capture more video clips
-                        captureVideo(duration);
+                final Capture that = this;
+                Runnable captureVideo = new Runnable() {
+
+                    @Override
+                    public void run() {
+                        // Get the uri of the video clip
+                        Uri data = intent.getData();
+                        // create a file object from the uri
+                        if(data == null)
+                        {
+                            that.fail(createErrorObject(CAPTURE_NO_MEDIA_FILES, "Error: data is null"));
+                        }
+                        else
+                        {
+                            results.put(createMediaFile(data));
+
+                            if (results.length() >= limit) {
+                                // Send Uri back to JavaScript for viewing video
+                                that.callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, results));
+                            } else {
+                                // still need to capture more video clips
+                                captureVideo(duration);
+                            }
+                        }
                     }
-                }
+                };
+                this.cordova.getThreadPool().execute(captureVideo);
             }
         }
         // If canceled
@@ -357,13 +402,13 @@
      * @throws IOException
      */
     private JSONObject createMediaFile(Uri data) {
-        File fp = new File(FileHelper.getRealPath(data, this.cordova));
+        File fp = webView.getResourceApi().mapUriToFile(data);
         JSONObject obj = new JSONObject();
 
         try {
             // File properties
             obj.put("name", fp.getName());
-            obj.put("fullPath", "file://" + fp.getAbsolutePath());
+            obj.put("fullPath", fp.toURI().toString());
             // Because of an issue with MimeTypeMap.getMimeTypeFromExtension() all .3gpp files
             // are reported as video/3gpp. I'm doing this hacky check of the URI to see if it
             // is stored in the audio or video content store.
@@ -374,7 +419,7 @@
                     obj.put("type", VIDEO_3GPP);
                 }
             } else {
-                obj.put("type", FileHelper.getMimeType(fp.getAbsolutePath(), cordova));
+                obj.put("type", FileHelper.getMimeType(Uri.fromFile(fp), cordova));
             }
 
             obj.put("lastModifiedDate", fp.lastModified());
diff --git a/src/android/FileHelper.java b/src/android/FileHelper.java
new file mode 100644
index 0000000..267ad53
--- /dev/null
+++ b/src/android/FileHelper.java
@@ -0,0 +1,60 @@
+/*
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+ */
+package org.apache.cordova.mediacapture;
+
+import android.net.Uri;
+import android.webkit.MimeTypeMap;
+
+import org.apache.cordova.CordovaInterface;
+
+import java.util.Locale;
+
+// TODO: Replace with CordovaResourceApi.getMimeType() post 3.1.
+public class FileHelper {
+    public static String getMimeTypeForExtension(String path) {
+        String extension = path;
+        int lastDot = extension.lastIndexOf('.');
+        if (lastDot != -1) {
+            extension = extension.substring(lastDot + 1);
+        }
+        // Convert the URI string to lower case to ensure compatibility with MimeTypeMap (see CB-2185).
+        extension = extension.toLowerCase(Locale.getDefault());
+        if (extension.equals("3ga")) {
+            return "audio/3gpp";
+        }
+        return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
+    }
+    
+    /**
+     * Returns the mime type of the data specified by the given URI string.
+     *
+     * @param uriString the URI string of the data
+     * @return the mime type of the specified data
+     */
+    public static String getMimeType(Uri uri, CordovaInterface cordova) {
+        String mimeType = null;
+        if ("content".equals(uri.getScheme())) {
+            mimeType = cordova.getActivity().getContentResolver().getType(uri);
+        } else {
+            mimeType = getMimeTypeForExtension(uri.getPath());
+        }
+
+        return mimeType;
+    }
+}
diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m
index 50bf0e7..b214412 100644
--- a/src/ios/CDVCapture.m
+++ b/src/ios/CDVCapture.m
@@ -45,6 +45,23 @@
     return UIAccessibilityTraitNone;
 }
 
+- (BOOL)prefersStatusBarHidden {
+    return YES;
+}
+    
+- (UIViewController*)childViewControllerForStatusBarHidden {
+    return nil;
+}
+    
+- (void)viewWillAppear:(BOOL)animated {
+    SEL sel = NSSelectorFromString(@"setNeedsStatusBarAppearanceUpdate");
+    if ([self respondsToSelector:sel]) {
+        [self performSelector:sel withObject:nil afterDelay:0];
+    }
+    
+    [super viewWillAppear:animated];
+}
+
 @end
 
 @implementation CDVCapture
@@ -88,9 +105,11 @@
 
         self.inUse = YES;
 
-        if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
+        SEL selector = NSSelectorFromString(@"presentViewController:animated:completion:");
+        if ([self.viewController respondsToSelector:selector]) {
             [self.viewController presentViewController:navController animated:YES completion:nil];
         } else {
+            // deprecated as of iOS >= 6.0
             [self.viewController presentModalViewController:navController animated:YES];
         }
     }
@@ -139,9 +158,11 @@
         // CDVImagePicker specific property
         pickerController.callbackId = callbackId;
 
-        if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
+        SEL selector = NSSelectorFromString(@"presentViewController:animated:completion:");
+        if ([self.viewController respondsToSelector:selector]) {
             [self.viewController presentViewController:pickerController animated:YES completion:nil];
         } else {
+            // deprecated as of iOS >= 6.0
             [self.viewController presentModalViewController:pickerController animated:YES];
         }
     }
@@ -255,9 +276,11 @@
         // CDVImagePicker specific property
         pickerController.callbackId = callbackId;
 
-        if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
+        SEL selector = NSSelectorFromString(@"presentViewController:animated:completion:");
+        if ([self.viewController respondsToSelector:selector]) {
             [self.viewController presentViewController:pickerController animated:YES completion:nil];
         } else {
+            // deprecated as of iOS >= 6.0
             [self.viewController presentModalViewController:pickerController animated:YES];
         }
     }
@@ -535,6 +558,11 @@
 
 @end
 
+@interface CDVAudioRecorderViewController () {
+    UIStatusBarStyle _previousStatusBarStyle;
+}
+@end
+
 @implementation CDVAudioRecorderViewController
 @synthesize errorCode, callbackId, duration, captureCommand, doneButton, recordingView, recordButton, recordImage, stopRecordImage, timerLabel, avRecorder, avSession, pluginResult, timer, isTimed;
 
@@ -565,6 +593,7 @@
         self.callbackId = theCallbackId;
         self.errorCode = CAPTURE_NO_MEDIA_FILES;
         self.isTimed = self.duration != nil;
+        _previousStatusBarStyle = [UIApplication sharedApplication].statusBarStyle;
 
         return self;
     }
@@ -574,6 +603,10 @@
 
 - (void)loadView
 {
+	if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) {
+        self.edgesForExtendedLayout = UIRectEdgeNone;
+    }
+    
     // create view and display
     CGRect viewRect = [[UIScreen mainScreen] applicationFrame];
     UIView* tmp = [[UIView alloc] initWithFrame:viewRect];
@@ -615,7 +648,12 @@
     // timerLabel.autoresizingMask = reSizeMask;
     [self.timerLabel setBackgroundColor:[UIColor clearColor]];
     [self.timerLabel setTextColor:[UIColor whiteColor]];
+#ifdef __IPHONE_6_0
+    [self.timerLabel setTextAlignment:NSTextAlignmentCenter];
+#else
+    // for iOS SDK < 6.0
     [self.timerLabel setTextAlignment:UITextAlignmentCenter];
+#endif
     [self.timerLabel setText:@"0:00"];
     [self.timerLabel setAccessibilityHint:NSLocalizedString(@"recorded time in minutes and seconds", nil)];
     self.timerLabel.accessibilityTraits |= UIAccessibilityTraitUpdatesFrequently;
@@ -718,25 +756,47 @@
         [self.recordButton setImage:stopRecordImage forState:UIControlStateNormal];
         self.recordButton.accessibilityTraits &= ~[self accessibilityTraits];
         [self.recordingView setHidden:NO];
-        NSError* error = nil;
-        [self.avSession setCategory:AVAudioSessionCategoryRecord error:&error];
-        [self.avSession setActive:YES error:&error];
-        if (error) {
-            // can't continue without active audio session
-            self.errorCode = CAPTURE_INTERNAL_ERR;
-            [self dismissAudioView:nil];
-        } else {
-            if (self.duration) {
-                self.isTimed = true;
-                [self.avRecorder recordForDuration:[duration doubleValue]];
+        __block NSError* error = nil;
+        
+        void (^startRecording)(void) = ^{
+            [self.avSession setCategory:AVAudioSessionCategoryRecord error:&error];
+            [self.avSession setActive:YES error:&error];
+            if (error) {
+                // can't continue without active audio session
+                self.errorCode = CAPTURE_INTERNAL_ERR;
+                [self dismissAudioView:nil];
             } else {
-                [self.avRecorder record];
+                if (self.duration) {
+                    self.isTimed = true;
+                    [self.avRecorder recordForDuration:[duration doubleValue]];
+                } else {
+                    [self.avRecorder record];
+                }
+                [self.timerLabel setText:@"0.00"];
+                self.timer = [NSTimer scheduledTimerWithTimeInterval:0.5f target:self selector:@selector(updateTime) userInfo:nil repeats:YES];
+                self.doneButton.enabled = NO;
             }
-            [self.timerLabel setText:@"0.00"];
-            self.timer = [NSTimer scheduledTimerWithTimeInterval:0.5f target:self selector:@selector(updateTime) userInfo:nil repeats:YES];
-            self.doneButton.enabled = NO;
+            UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, nil);
+        };
+        
+        SEL rrpSel = NSSelectorFromString(@"requestRecordPermission:");
+        if ([self.avSession respondsToSelector:rrpSel])
+        {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
+            [self.avSession performSelector:rrpSel withObject:^(BOOL granted){
+                if (granted) {
+                    startRecording();
+                } else {
+                    NSLog(@"Error creating audio session, microphone permission denied.");
+                    self.errorCode = CAPTURE_INTERNAL_ERR;
+                    [self dismissAudioView:nil];
+                }
+            }];
+#pragma clang diagnostic pop
+        } else {
+            startRecording();
         }
-        UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, nil);
     }
 }
 
@@ -792,6 +852,10 @@
     UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil);
     // return result
     [self.captureCommand.commandDelegate sendPluginResult:pluginResult callbackId:callbackId];
+
+    if (IsAtLeastiOSVersion(@"7.0")) {
+        [[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle];
+    }
 }
 
 - (void)updateTime
@@ -842,4 +906,18 @@
     [self dismissAudioView:nil];
 }
 
+- (UIStatusBarStyle)preferredStatusBarStyle
+{
+    return UIStatusBarStyleDefault;
+}
+
+- (void)viewWillAppear:(BOOL)animated
+{
+    if (IsAtLeastiOSVersion(@"7.0")) {
+        [[UIApplication sharedApplication] setStatusBarStyle:[self preferredStatusBarStyle]];
+    }
+
+    [super viewWillAppear:animated];
+}
+
 @end
diff --git a/src/ubuntu/back.png b/src/ubuntu/back.png
new file mode 100644
index 0000000..af78faa
--- /dev/null
+++ b/src/ubuntu/back.png
Binary files differ
diff --git a/src/ubuntu/capture.cpp b/src/ubuntu/capture.cpp
new file mode 100644
index 0000000..cab4074
--- /dev/null
+++ b/src/ubuntu/capture.cpp
@@ -0,0 +1,167 @@
+/*
+ *
+ * Copyright 2013 Canonical Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+#include "capture.h"
+
+const char code[] = "\
+var component, object;                                                  \
+function createObject() {                                               \
+    component = Qt.createComponent(%1);                                 \
+    if (component.status == Component.Ready)                            \
+        finishCreation();                                               \
+    else                                                                \
+        component.statusChanged.connect(finishCreation);                \
+}                                                                       \
+function finishCreation() {                                             \
+    CordovaWrapper.captureObject = component.createObject(root,         \
+        {root: root, cordova: cordova, state: \"%2\"});                 \
+}                                                                       \
+createObject()";
+
+static QString formatFile(const QMimeDatabase &db, const QString &path) {
+    QFileInfo info(path);
+    QMimeType mime = db.mimeTypeForFile(info.fileName());
+
+    QVariantMap file;
+    file.insert("name", info.fileName());
+    file.insert("fullPath", info.absoluteFilePath());
+    file.insert("lastModifiedDate", info.lastModified().toMSecsSinceEpoch());
+    file.insert("size", info.size());
+    file.insert("type", mime.name());
+
+    return CordovaInternal::format(file);
+}
+
+MediaCapture::MediaCapture(Cordova *cordova): CPlugin(cordova), _scId(0), _ecId(0) {
+}
+
+void MediaCapture::captureAudio(int scId, int ecId, QVariantMap options) {
+    if (_scId || _ecId) {
+        this->callback(_ecId, QString("{code: %1}").arg(CAPTURE_APPLICATION_BUSY));
+        return;
+    }
+
+    QString path = m_cordova->get_app_dir() + "/../qml/MediaCaptureWidget.qml";
+
+    // TODO: relative url
+    QString qml = QString(code).arg(CordovaInternal::format(path)).arg("audio");
+    m_cordova->execQML(qml);
+
+    _scId = scId;
+    _ecId = ecId;
+}
+
+void MediaCapture::onAudioRecordError(QMediaRecorder::Error) {
+    if (!_ecId)
+        return;
+    this->callback(_ecId, QString("{code: %1}").arg(CAPTURE_INTERNAL_ERR));
+    _ecId = _scId = 0;
+
+    _recorder.clear();
+    _files.clear();
+
+    m_cordova->execQML("CordovaWrapper.captureObject.destroy()");
+}
+
+void MediaCapture::recordAudio() {
+    if (_recorder.data()) {
+        QUrl url = _recorder->outputLocation();
+
+        QString path = url.toString();
+        _recorder->stop();
+
+        _recorder.clear();
+
+        this->callback(_scId, QString("[%1]").arg(formatFile(_db, path)));
+        _ecId = _scId = 0;
+
+        m_cordova->execQML("CordovaWrapper.captureObject.destroy()");
+    } else {
+        _recorder = QSharedPointer<QAudioRecorder>(new QAudioRecorder);
+        QObject::connect(_recorder.data(), SIGNAL(error(QMediaRecorder::Error)), this, SLOT(onAudioRecordError(QMediaRecorder::Error)));
+
+        if (_options.find("mode")->toString() == "audio/amr") {
+            _recorder->setContainerFormat("amr");
+            _recorder->setOutputLocation(generateLocation("amr"));
+        } else {
+            _recorder->setContainerFormat("wav");
+            _recorder->setOutputLocation(generateLocation("wav"));
+        }
+        _recorder->record();
+    }
+}
+
+void MediaCapture::cancel() {
+    if (!_ecId)
+        return;
+
+    m_cordova->execQML("CordovaWrapper.captureObject.destroy()");
+
+    _recorder.clear();
+    this->callback(_ecId, QString("{code: %1}").arg(CAPTURE_NO_MEDIA_FILES));
+    _ecId = _scId = 0;
+
+    _recorder.clear();
+}
+
+void MediaCapture::captureVideo(int scId, int ecId, QVariantMap options) {
+    if (_scId || _ecId) {
+        this->callback(_ecId, QString("{code: %1}").arg(CAPTURE_APPLICATION_BUSY));
+        return;
+    }
+
+    QString path = m_cordova->get_app_dir() + "/../qml/MediaCaptureWidget.qml";
+
+    // TODO: relative url
+    QString qml = QString(code).arg(CordovaInternal::format(path)).arg("videoRecording");
+    m_cordova->execQML(qml);
+
+    _scId = scId;
+    _ecId = ecId;
+}
+
+void MediaCapture::onVideoRecordEnd(QString path) {
+    assert(path.startsWith("file:"));
+    path = path.mid(5);
+
+    this->callback(_scId, QString("[%1]").arg(formatFile(_db, path)));
+    _ecId = _scId = 0;
+
+    m_cordova->execQML("CordovaWrapper.captureObject.destroy()");
+}
+
+void MediaCapture::captureImage(int scId, int ecId, QVariantMap options) {
+    if (_scId || _ecId) {
+        this->callback(_ecId, QString("{code: %1}").arg(CAPTURE_APPLICATION_BUSY));
+        return;
+    }
+
+    QString path = m_cordova->get_app_dir() + "/../qml/MediaCaptureWidget.qml";
+
+    // TODO: relative url
+    QString qml = QString(code).arg(CordovaInternal::format(path)).arg("camera");
+    m_cordova->execQML(qml);
+
+    _scId = scId;
+    _ecId = ecId;
+}
+
+void MediaCapture::onImageSaved(const QString &path) {
+    this->callback(_scId, QString("[%1]").arg(formatFile(_db, path)));
+    _ecId = _scId = 0;
+}
diff --git a/src/ubuntu/capture.h b/src/ubuntu/capture.h
new file mode 100644
index 0000000..2c6caa4
--- /dev/null
+++ b/src/ubuntu/capture.h
@@ -0,0 +1,84 @@
+/*
+ *
+ * Copyright 2013 Canonical Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+#ifndef CAPTURE_H_ASCXZFG975
+#define CAPTURE_H_ASCXZFG975
+
+#include <cordova.h>
+#include <cplugin.h>
+#include <QtMultimedia>
+#include <QtCore>
+#include <QtQuick>
+
+class MediaCapture: public CPlugin {
+    Q_OBJECT
+public:
+    explicit MediaCapture(Cordova *cordova);
+
+    virtual const QString fullName() override {
+        return MediaCapture::fullID();
+    }
+
+    virtual const QString shortName() override {
+        return "Capture";
+    }
+
+    static const QString fullID() {
+        return "Capture";
+    }
+
+public slots:
+    void captureAudio(int scId, int ecId, QVariantMap options);
+    void captureImage(int scId, int ecId, QVariantMap options);
+    void captureVideo(int scId, int ecId, QVariantMap options);
+
+    void recordAudio();
+    void cancel();
+    void onVideoRecordEnd(QString path);
+    void onImageSaved(const QString &path);
+
+    QString generateLocation(const QString &extension) {
+        int i = 1;
+        for (;;++i) {
+            QString path = QString("%1/.local/share/%2/persistent/%3.%4").arg(QDir::homePath())
+                .arg(QCoreApplication::applicationName()).arg(i).arg(extension);
+
+            if (!QFileInfo(path).exists())
+                return path;
+        }
+    }
+private slots:
+    void onAudioRecordError(QMediaRecorder::Error);
+private:
+    QSharedPointer<QAudioRecorder> _recorder;
+
+    int _scId, _ecId;
+    QList<QString> _files;
+    QVariantMap _options;
+    QMimeDatabase _db;
+
+    enum CaptureError {
+        CAPTURE_INTERNAL_ERR = 0,
+        CAPTURE_APPLICATION_BUSY = 1,
+        CAPTURE_INVALID_ARGUMENT = 2,
+        CAPTURE_NO_MEDIA_FILES = 3,
+        CAPTURE_NOT_SUPPORTED = 20
+    };
+};
+
+#endif
diff --git a/src/ubuntu/microphone.png b/src/ubuntu/microphone.png
new file mode 100644
index 0000000..4f2a5cf
--- /dev/null
+++ b/src/ubuntu/microphone.png
Binary files differ
diff --git a/src/ubuntu/record_off.png b/src/ubuntu/record_off.png
new file mode 100644
index 0000000..adc822c
--- /dev/null
+++ b/src/ubuntu/record_off.png
Binary files differ
diff --git a/src/ubuntu/record_on.png b/src/ubuntu/record_on.png
new file mode 100644
index 0000000..985658a
--- /dev/null
+++ b/src/ubuntu/record_on.png
Binary files differ
diff --git a/src/ubuntu/shoot.png b/src/ubuntu/shoot.png
new file mode 100644
index 0000000..c093b63
--- /dev/null
+++ b/src/ubuntu/shoot.png
Binary files differ
diff --git a/src/ubuntu/toolbar-left.png b/src/ubuntu/toolbar-left.png
new file mode 100644
index 0000000..720d7f6
--- /dev/null
+++ b/src/ubuntu/toolbar-left.png
Binary files differ
diff --git a/src/ubuntu/toolbar-middle.png b/src/ubuntu/toolbar-middle.png
new file mode 100644
index 0000000..77595bb
--- /dev/null
+++ b/src/ubuntu/toolbar-middle.png
Binary files differ
diff --git a/src/ubuntu/toolbar-right.png b/src/ubuntu/toolbar-right.png
new file mode 100644
index 0000000..e4e6aa6
--- /dev/null
+++ b/src/ubuntu/toolbar-right.png
Binary files differ
diff --git a/src/windows8/CaptureProxy.js b/src/windows8/CaptureProxy.js
index 43c0faa..851adf8 100644
--- a/src/windows8/CaptureProxy.js
+++ b/src/windows8/CaptureProxy.js
@@ -21,12 +21,12 @@
 
 /*global Windows:true */
 
-var MediaFile = require('org.apache.cordova.core.media-capture.MediaFile');
-var CaptureError = require('org.apache.cordova.core.media-capture.CaptureError');
-var CaptureAudioOptions = require('org.apache.cordova.core.media-capture.CaptureAudioOptions');
-var CaptureImageOptions = require('org.apache.cordova.core.media-capture.CaptureImageOptions');
-var CaptureVideoOptions = require('org.apache.cordova.core.media-capture.CaptureVideoOptions');
-var MediaFileData = require('org.apache.cordova.core.media-capture.MediaFileData');
+var MediaFile = require('org.apache.cordova.media-capture.MediaFile');
+var CaptureError = require('org.apache.cordova.media-capture.CaptureError');
+var CaptureAudioOptions = require('org.apache.cordova.media-capture.CaptureAudioOptions');
+var CaptureImageOptions = require('org.apache.cordova.media-capture.CaptureImageOptions');
+var CaptureVideoOptions = require('org.apache.cordova.media-capture.CaptureVideoOptions');
+var MediaFileData = require('org.apache.cordova.media-capture.MediaFileData');
 
 module.exports = {
 
@@ -158,4 +158,4 @@
     }
 };
 
-require("cordova/commandProxy").add("Capture",module.exports);
\ No newline at end of file
+require("cordova/windows8/commandProxy").add("Capture",module.exports);
diff --git a/src/windows8/MediaFile.js b/src/windows8/MediaFile.js
index 34ecba2..51465a5 100644
--- a/src/windows8/MediaFile.js
+++ b/src/windows8/MediaFile.js
@@ -21,8 +21,8 @@
 
 /*global Windows:true */
 
-var MediaFileData = require('org.apache.cordova.core.media-capture.MediaFileData');
-var CaptureError = require('org.apache.cordova.core.media-capture.CaptureError');
+var MediaFileData = require('org.apache.cordova.media-capture.MediaFileData');
+var CaptureError = require('org.apache.cordova.media-capture.CaptureError');
 
 module.exports = {
 
diff --git a/test/capture/index.html b/test/capture/index.html
new file mode 100644
index 0000000..ef4b0e2
--- /dev/null
+++ b/test/capture/index.html
@@ -0,0 +1,150 @@
+<!DOCTYPE html>
+<!--
+
+ 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.
+
+-->
+
+
+<html>
+  <head>
+    <meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
+    <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
+    <title>Cordova Mobile Spec</title>
+    <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
+    <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
+
+
+<script type="text/javascript" charset="utf-8">
+
+    var deviceReady = false;
+    var platformId = cordova.require('cordova/platform').id;
+    var pageStartTime = +new Date();
+
+    //-------------------------------------------------------------------------
+    // Camera
+    //-------------------------------------------------------------------------
+
+    function log(value) {
+        console.log(value);
+        document.getElementById('camera_status').textContent += (new Date() - pageStartTime) / 1000 + ': ' + value + '\n';
+    }
+
+    function captureAudioWin(mediaFiles){
+        var path = mediaFiles[0].fullPath;
+        log('Audio captured: ' + path);
+        var m = new Media(path);
+        m.play(); 
+    }
+    
+    function captureAudioFail(e){
+        log('Error getting audio: ' + e.code);
+    }
+    
+    function getAudio(){
+        clearStatus();
+        var options = { limit: 1, duration: 10};
+        navigator.device.capture.captureAudio(captureAudioWin, captureAudioFail, options);
+    }
+    
+    function captureImageWin(mediaFiles){
+        var path = mediaFiles[0].fullPath;
+        log('Image captured: ' + path);    
+        document.getElementById('camera_image').src = path;    
+    }
+    
+    function captureImageFail(e){
+        log('Error getting image: ' + e.code);
+    }
+    
+    function getImage(){
+        clearStatus();
+        var options = { limit: 1 };
+        navigator.device.capture.captureImage(captureImageWin, captureImageFail, options);    
+    }    
+    
+    function captureVideoWin(mediaFiles){
+        var path = mediaFiles[0].fullPath;
+        log('Video captured: ' + path);
+        
+        // need to inject the video element into the html
+        // doesn't seem to work if you have a pre-existing video element and
+        // add in a source tag
+        var vid = document.createElement('video');
+        vid.id="theVideo";
+        vid.width = "320";
+        vid.height= "240";
+        var source_vid = document.createElement('source');
+        source_vid.id = "theSource";
+        source_vid.src = path;
+        vid.appendChild(source_vid);
+        document.getElementById('video_container').appendChild(vid);    
+    }
+    
+    function captureVideoFail(e){
+        log('Error getting video: ' + e.code);
+    }
+    
+    function getVideo(){
+        clearStatus();
+        var options = { limit: 1, duration: 10 };
+        navigator.device.capture.captureVideo(captureVideoWin, captureVideoFail, options);      
+    }
+    
+    function clearStatus() {
+        document.getElementById('camera_status').innerHTML = '';
+        document.getElementById('camera_image').src = 'about:blank';
+    }
+
+    /**
+     * Function called when page has finished loading.
+     */
+    function init() {
+        document.addEventListener("deviceready", function() {
+            deviceReady = true;
+            console.log("Device="+device.platform+" "+device.version);
+        }, false);
+        window.setTimeout(function() {
+            if (!deviceReady) {
+                alert("Error: Apache Cordova did not initialize.  Demo will not run correctly.");
+            }
+        },1000);
+    };
+    
+</script>
+
+  </head>
+  <body onload="init();" id="stage" class="theme">
+
+    <h1>Capture</h1>
+    <div id="info" style="white-space: pre-wrap">
+        <b>Status:</b> <div id="camera_status"></div>
+        img: <img width="100" id="camera_image">
+        video: <div id="video_container"></div>
+    </div>
+    
+    <h2>Cordova Capture API</h2>
+    <div id="image-options"></div>
+
+    <h2>Actions</h2>
+    <div class="btn large" onclick="getAudio();">Capture 10 secs of audio and play</div>
+    <div class="btn large" onclick="getImage();">Capture 1 image</div>
+    <div class="btn large" onclick="getVideo();">Capture 10 secs of video</div>
+    <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
+  </body>
+</html>
diff --git a/test/cordova-incl.js b/test/cordova-incl.js
index a82c590..bd612be 100644
--- a/test/cordova-incl.js
+++ b/test/cordova-incl.js
@@ -22,6 +22,7 @@
 var PLAT;
 (function getPlatform() {
     var platforms = {
+        amazon_fireos: /cordova-amazon-fireos/,
         android: /Android/,
         ios: /(iPad)|(iPhone)|(iPod)/,
         blackberry10: /(BB10)/,
@@ -76,7 +77,7 @@
 }
 
 function backHome() {
-    if (window.device && device.platform && device.platform.toLowerCase() == 'android') {
+    if (window.device && device.platform && (device.platform.toLowerCase() == 'android' || device.platform.toLowerCase() == 'amazon-fireos')) {
         navigator.app.backHistory();
     }
     else {
diff --git a/test/index.html b/test/index.html
index 727c504..568d94f 100644
--- a/test/index.html
+++ b/test/index.html
@@ -47,6 +47,7 @@
     <a href="audio/index.html" class="btn large">Audio Play/Record</a>
     <a href="battery/index.html" class="btn large">Battery</a>
     <a href="camera/index.html" class="btn large">Camera</a>
+    <a href="capture/index.html" class="btn large">Capture</a>    
     <a href="compass/index.html" class="btn large">Compass</a>
     <a href="contacts/index.html" class="btn large">Contacts</a>
     <a href="events/index.html" class="btn large">Events</a>
diff --git a/www/MediaFile.js b/www/MediaFile.js
index 6abff1d..75a255b 100644
--- a/www/MediaFile.js
+++ b/www/MediaFile.js
@@ -21,7 +21,7 @@
 
 var utils = require('cordova/utils'),
     exec = require('cordova/exec'),
-    File = require('org.apache.cordova.core.file.File'),
+    File = require('org.apache.cordova.file.File'),
     CaptureError = require('./CaptureError');
 /**
  * Represents a single file.