Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8B926E532 for ; Tue, 19 Feb 2013 22:27:20 +0000 (UTC) Received: (qmail 61641 invoked by uid 500); 19 Feb 2013 22:27:19 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 61585 invoked by uid 500); 19 Feb 2013 22:27:19 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 60614 invoked by uid 99); 19 Feb 2013 22:27:17 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2013 22:27:17 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7BEC882CC49; Tue, 19 Feb 2013 22:27:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mwbrooks@apache.org To: commits@cordova.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [24/52] [partial] [#2454] Remove versions pre-dating Apache Cordova. Message-Id: <20130219222717.7BEC882CC49@tyr.zones.apache.org> Date: Tue, 19 Feb 2013 22:27:17 +0000 (UTC) http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/file/filetransfererror/filetransfererror.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/file/filetransfererror/filetransfererror.md b/docs/en/1.0.0/phonegap/file/filetransfererror/filetransfererror.md deleted file mode 100644 index 08716e3..0000000 --- a/docs/en/1.0.0/phonegap/file/filetransfererror/filetransfererror.md +++ /dev/null @@ -1,40 +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. ---- - -FileTransferError -======== - -A `FileTransferError` object is returned via the error callback when an error occurs. - -Properties ----------- - -- __code:__ One of the predefined error codes listed below. (int) - -Constants ---------- - -- `FileTransferError.FILE_NOT_FOUND_ERR` -- `FileTransferError.INVALID_URL_ERR` -- `FileTransferError.CONNECTION_ERR` - -Description ------------ - -The `FileTransferError` object is returned via the error callback when an error occurs when uploading a file. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/file/fileuploadoptions/fileuploadoptions.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/file/fileuploadoptions/fileuploadoptions.md b/docs/en/1.0.0/phonegap/file/fileuploadoptions/fileuploadoptions.md deleted file mode 100644 index 36e5165..0000000 --- a/docs/en/1.0.0/phonegap/file/fileuploadoptions/fileuploadoptions.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. ---- - -FileUploadOptions -======== - -A `FileUploadOptions` object can be passed to the FileTransfer objects upload method in order to specify additional parameters to the upload script. - -Properties ----------- - -- __fileKey:__ The name of the form element. If not set defaults to "file". (DOMString) -- __fileName:__ The file name you want the file to be saved as on the server. If not set defaults to "image.jpg". (DOMString) -- __mimeType:__ The mime type of the data you are uploading. If not set defaults to "image/jpeg". (DOMString) -- __params:__ A set of optional key/value pairs to be passed along in the HTTP request. (Object) - - -Description ------------ - -A `FileUploadOptions` object can be passed to the FileTransfer objects upload method in order to specify additional parameters to the upload script. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/file/fileuploadresult/fileuploadresult.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/file/fileuploadresult/fileuploadresult.md b/docs/en/1.0.0/phonegap/file/fileuploadresult/fileuploadresult.md deleted file mode 100644 index f21d036..0000000 --- a/docs/en/1.0.0/phonegap/file/fileuploadresult/fileuploadresult.md +++ /dev/null @@ -1,40 +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. ---- - -FileUploadResult -======== - -A `FileUploadResult` object is returned via the success callback of the FileTransfer upload method. - -Properties ----------- - -- __bytesSent:__ The number of bytes sent to the server as part of the upload. (long) -- __responseCode:__ The HTTP response code returned by the server. (long) -- __response:__ The HTTP response returned by the server. (DOMString) - -Description ------------ - -The `FileUploadResult` object is returned via the success callback of the FileTransfer upload method. - -iOS Quirks ----------- -- iOS does not include values for responseCode nor bytesSent in the success callback FileUploadResult object. - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/file/filewriter/filewriter.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/file/filewriter/filewriter.md b/docs/en/1.0.0/phonegap/file/filewriter/filewriter.md deleted file mode 100644 index 3cafa4d..0000000 --- a/docs/en/1.0.0/phonegap/file/filewriter/filewriter.md +++ /dev/null @@ -1,191 +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. ---- - -FileWriter -========== - -FileWriter is an object that allows one to write a file. - -Properties ----------- - -- __readyState:__ One of the three states the reader can be in INIT, WRITING or DONE. -- __fileName:__ The name of the file to be written. _(DOMString)_ -- __length:__ The length of the file to be written. _(long)_ -- __position:__ The current position of the file pointer. _(long)_ -- __error:__ An object containing errors. _(FileError)_ -- __onwritestart:__ Called when the write starts. . _(Function)_ -- __onprogress:__ Called while writing the file, reports progress (progress.loaded/progress.total). _(Function)_ -NOT SUPPORTED -- __onwrite:__ Called when the request has completed successfully. _(Function)_ -- __onabort:__ Called when the write has been aborted. For instance, by invoking the abort() method. _(Function)_ -- __onerror:__ Called when the write has failed. _(Function)_ -- __onwriteend:__ Called when the request has completed (either in success or failure). _(Function)_ - -Methods -------- - -- __abort__: Aborts writing file. -- __seek__: Moves the file pointer to the byte specified. -- __truncate__: Shortens the file to the length specified. -- __write__: Writes data to the file. - -Details -------- - -The `FileWriter` object is a way to write files from the devices file system. Users register their own event listeners to receive the writestart, progress, write, writeend, error and abort events. - -A FileWriter is created for a single file. You can use it to write to a file multiple times. The FileWriter maintains the file's position and length attributes, so you can seek and write anywhere in the file. By default, the FileWriter writes to the beginning of the file (will overwrite existing data). Set the optional append boolean to true in the FileWriter's constructor to begin writing to the end of the file. - -Supported Platforms -------------------- - -- Android -- BlackBerry WebWorks (OS 5.0 and higher) -- iOS - -Seek Quick Example ------------------------------- - - function win(writer) { - // fast forwards file pointer to end of file - writer.seek(writer.length); - }; - - var fail = function(evt) { - console.log(error.code); - }; - - entry.createWriter(win, fail); - -Truncate Quick Example --------------------------- - - function win(writer) { - writer.truncate(10); - }; - - var fail = function(evt) { - console.log(error.code); - }; - - entry.createWriter(win, fail); - -Write Quick Example -------------------- - - function win(writer) { - writer.onwrite = function(evt) { - console.log("write success"); - }; - writer.write("some sample text"); - }; - - var fail = function(evt) { - console.log(error.code); - }; - - entry.createWriter(win, fail); - -Append Quick Example --------------------- - - function win(writer) { - writer.onwrite = function(evt) { - console.log("write success"); - }; - writer.seek(writer.length); - writer.write("appended text"); - }; - - var fail = function(evt) { - console.log(error.code); - }; - - entry.createWriter(win, fail); - -Abort Quick Example -------------------- - - function win(writer) { - writer.onwrite = function(evt) { - console.log("write success"); - }; - writer.write("some sample text"); - writer.abort(); - }; - - var fail = function(evt) { - console.log(error.code); - }; - - entry.createWriter(win, fail); - -Full Example ------------- - - - - FileWriter Example - - - - - -

Example

-

Write File

- - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/file/flags/flags.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/file/flags/flags.md b/docs/en/1.0.0/phonegap/file/flags/flags.md deleted file mode 100644 index 29d470f..0000000 --- a/docs/en/1.0.0/phonegap/file/flags/flags.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. ---- - -Flags -===== - -This object is used to supply arguments to the `DirectoryEntry` __getFile__ and __getDirectory__ methods, which look up or create files and directories, respectively. - -Properties ----------- - -- __create:__ Used to indicate that the file or directory should be created, if it does not exist. If not set defaults to false. _(boolean)_ -- __exclusive:__ By itself, exclusive has no effect. Used with create, it causes the file or directory creation to fail if the target path already exists. If not set defaults to false. _(boolean)_ -Supported Platforms -------------------- - -- Android -- BlackBerry WebWorks (OS 5.0 and higher) -- iOS - -Quick Example -------------- - - // Get the data directory, creating it if it doesn't exist. - dataDir = fileSystem.root.getDirectory("data", {create: true}); - - // Create the lock file, if and only if it doesn't exist. - lockFile = dataDir.getFile("lockfile.txt", {create: true, exclusive: true}); http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/file/localfilesystem/localfilesystem.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/file/localfilesystem/localfilesystem.md b/docs/en/1.0.0/phonegap/file/localfilesystem/localfilesystem.md deleted file mode 100644 index 0b2a7fa..0000000 --- a/docs/en/1.0.0/phonegap/file/localfilesystem/localfilesystem.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -LocalFileSystem -=============== - -This object provides a way to obtain root file systems. - -Methods ----------- - -- __requestFileSystem:__ Requests a filesystem. _(Function)_ -- __resolveLocalFileSystemURI:__ Retrieve a DirectoryEntry or FileEntry using local URI. _(Function)_ - -Constants ---------- - -- `LocalFileSystem.PERSISTENT`: Used for storage that should not be removed by the user agent without application or user permission. -- `LocalFileSystem.TEMPORARY`: Used for storage with no guarantee of persistence. - -Details -------- - -The `LocalFileSystem` object methods are defined on the __window__ object. - -Supported Platforms -------------------- - -- Android -- BlackBerry WebWorks (OS 5.0 and higher) -- iOS - -Request File System Quick Example ---------------------------------- - - function onSuccess(fileSystem) { - console.log(fileSystem.name); - } - - // request the persistent file system - window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onSuccess, onError); - -Resolve Local File System URI Quick Example -------------------------------------------- - - function onSuccess(fileEntry) { - console.log(fileEntry.name); - } - - window.resolveLocalFileSystemURI("file:///example.txt", onSuccess, onError); - -Full Example ------------- - - - - - - Local File System Example - - - - - -

Example

-

Local File System

- - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/file/metadata/metadata.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/file/metadata/metadata.md b/docs/en/1.0.0/phonegap/file/metadata/metadata.md deleted file mode 100644 index bb937fc..0000000 --- a/docs/en/1.0.0/phonegap/file/metadata/metadata.md +++ /dev/null @@ -1,50 +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. ---- - -Metadata -========== - -This interface supplies information about the state of a file or directory. - -Properties ----------- - -- __modificationTime:__ This is the time at which the file or directory was last modified. _(Date)_ - -Details -------- - -The `Metadata` object represents information about the state of a file or directory. You can get an instance of a Metadata object by calling the __getMetadata__ method of a `DirectoryEntry` or `FileEntry` object. - -Supported Platforms -------------------- - -- Android -- BlackBerry WebWorks (OS 5.0 and higher) -- iOS - -Quick Example -------------- - - function win(metadata) { - console.log("Last Modified: " + metadata.modificationTime); - } - - // Request the metadata object for this entry - entry.getMetadata(win, null); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/geolocation/Coordinates/coordinates.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/geolocation/Coordinates/coordinates.md b/docs/en/1.0.0/phonegap/geolocation/Coordinates/coordinates.md deleted file mode 100644 index 4b79b9b..0000000 --- a/docs/en/1.0.0/phonegap/geolocation/Coordinates/coordinates.md +++ /dev/null @@ -1,123 +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. ---- - -Coordinates -=========== - -A set of properties that describe the geographic coordinates of a position. - -Properties ----------- - -* __latitude__: Latitude in decimal degrees. _(Number)_ -* __longitude__: Longitude in decimal degrees. _(Number)_ -* __altitude__: Height of the position in meters above the ellipsoid. _(Number)_ -* __accuracy__: Accuracy level of the latitude and longitude coordinates in meters. _(Number)_ -* __altitudeAccuracy__: Accuracy level of the altitude coordinate in meters. _(Number)_ -* __heading__: Direction of travel, specified in degrees counting clockwise relative to the true north. _(Number)_ -* __speed__: Current ground speed of the device, specified in meters per second. _(Number)_ - -Description ------------ - -The `Coordinates` object is created and populated by PhoneGap, and attached to the `Position` object. The `Position` object is then returned to the user through a callback function. - -Supported Platforms -------------------- - -- Android -- BlackBerry (OS 4.6) -- BlackBerry WebWorks (OS 5.0 and higher) -- iPhone - -Quick Example -------------- - - // onSuccess Callback - // - var onSuccess = function(position) { - alert('Latitude: ' + position.coords.latitude + '\n' + - 'Longitude: ' + position.coords.longitude + '\n' + - 'Altitude: ' + position.coords.altitude + '\n' + - 'Accuracy: ' + position.coords.accuracy + '\n' + - 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' + - 'Heading: ' + position.coords.heading + '\n' + - 'Speed: ' + position.coords.speed + '\n' + - 'Timestamp: ' + new Date(position.timestamp) + '\n'); - }; - - // onError Callback - // - var onError = function() { - alert('onError!'); - }; - - navigator.geolocation.getCurrentPosition(onSuccess, onError); - -Full Example ------------- - - - - - Geolocation Position Example - - - - -
- - - -Android Quirks -------------- - -__altitudeAccuracy:__ This property is not support by Android devices, it will always return null. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/geolocation/Position/position.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/geolocation/Position/position.md b/docs/en/1.0.0/phonegap/geolocation/Position/position.md deleted file mode 100644 index e98bc8b..0000000 --- a/docs/en/1.0.0/phonegap/geolocation/Position/position.md +++ /dev/null @@ -1,129 +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. ---- - -Position -======== - -Contains `Position` coordinates that are created by the geolocation API. - -Properties ----------- - -- __coords:__ A set of geographic coordinates. _(Coordinates)_ -- __timestamp:__ Creation timestamp for `coords` in milliseconds. _(DOMTimeStamp)_ - -Description ------------ - -The `Position` object is created and populated by PhoneGap, and returned to the user through a callback function. - -Supported Platforms -------------------- - -- Android -- BlackBerry (OS 4.6) -- BlackBerry WebWorks (OS 5.0 and higher) -- iPhone - -Quick Example -------------- - - // onSuccess Callback - // - var onSuccess = function(position) { - alert('Latitude: ' + position.coords.latitude + '\n' + - 'Longitude: ' + position.coords.longitude + '\n' + - 'Altitude: ' + position.coords.altitude + '\n' + - 'Accuracy: ' + position.coords.accuracy + '\n' + - 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' + - 'Heading: ' + position.coords.heading + '\n' + - 'Speed: ' + position.coords.speed + '\n' + - 'Timestamp: ' + new Date(position.timestamp) + '\n'); - }; - - // onError Callback receives a PositionError object - // - function onError(error) { - alert('code: ' + error.code + '\n' + - 'message: ' + error.message + '\n'); - } - - navigator.geolocation.getCurrentPosition(onSuccess, onError); - -Full Example ------------- - - - - - Device Properties Example - - - - - -

Finding geolocation...

- - - -iPhone Quirks -------------- - -- __timestamp:__ Uses seconds instead of milliseconds. - -A workaround is to manually convert the timestamp to milliseconds (x 1000): - - var onSuccess = function(position) { - alert('Latitude: ' + position.coords.latitude + '\n' + - 'Longitude: ' + position.coords.longitude + '\n' + - 'Timestamp: ' + new Date(position.timestamp * 1000) + '\n'); - }; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/geolocation/PositionError/positionError.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/geolocation/PositionError/positionError.md b/docs/en/1.0.0/phonegap/geolocation/PositionError/positionError.md deleted file mode 100755 index aa64fe1..0000000 --- a/docs/en/1.0.0/phonegap/geolocation/PositionError/positionError.md +++ /dev/null @@ -1,42 +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. ---- - -PositionError -======== - -A `PositionError` object is returned to the geolocationError callback when an error occurs. - -Properties ----------- - -- __code:__ One of the predefined error codes listed below. -- __message:__ Error message describing the details of the error encountered. - -Constants ---------- - -- `PositionError.PERMISSION_DENIED` -- `PositionError.POSITION_UNAVAILABLE` -- `PositionError.TIMEOUT` - -Description ------------ - -The `PositionError` object is returned to the user through the `geolocationError` callback function when an error occurs with geolocation. - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/geolocation/geolocation.clearWatch.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/geolocation/geolocation.clearWatch.md b/docs/en/1.0.0/phonegap/geolocation/geolocation.clearWatch.md deleted file mode 100644 index 3d51497..0000000 --- a/docs/en/1.0.0/phonegap/geolocation/geolocation.clearWatch.md +++ /dev/null @@ -1,113 +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. ---- - -geolocation.clearWatch -====================== - -Stop watching for changes to the device's location referenced by the `watchID` parameter. - - navigator.geolocation.clearWatch(watchID); - -Parameters ----------- - -- __watchID:__ The id of the `watchPosition` interval to clear. (String) - -Description ------------ - -Function `geolocation.clearWatch` stops watching changes to the device's location by clearing the `geolocation.watchPosition` referenced by `watchID`. - -Supported Platforms -------------------- - -- Android -- BlackBerry (OS 4.6) -- BlackBerry WebWorks (OS 5.0 and higher) -- iPhone - -Quick Example -------------- - - // Options: retrieve the location every 3 seconds - // - var watchID = navigator.geolocation.watchPosition(onSuccess, onError, { frequency: 3000 }); - - // ...later on... - - navigator.geolocation.clearWatch(watchID); - - -Full Example ------------- - - - - - Device Properties Example - - - - - -

Watching geolocation...

- - - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/geolocation/geolocation.getCurrentPosition.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/geolocation/geolocation.getCurrentPosition.md b/docs/en/1.0.0/phonegap/geolocation/geolocation.getCurrentPosition.md deleted file mode 100644 index 2f57846..0000000 --- a/docs/en/1.0.0/phonegap/geolocation/geolocation.getCurrentPosition.md +++ /dev/null @@ -1,124 +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. ---- - -geolocation.getCurrentPosition -============================== - -Returns the device's current position as a `Position` object. - - navigator.geolocation.getCurrentPosition(geolocationSuccess, - [geolocationError], - [geolocationOptions]); - -Parameters ----------- - -- __geolocationSuccess__: The callback that is called with the current position. -- __geolocationError__: (Optional) The callback that is called if there was an error. -- __geolocationOptions__: (Optional) The geolocation options. - -Description ------------ - -Function `geolocation.getCurrentPosition` is an asynchronous function. It returns the device's current position to the `geolocationSuccess` callback with a `Position` object as the parameter. If there is an error, the `geolocationError` callback is invoked with a `PositionError` object. - - -Supported Platforms -------------------- - -- Android -- BlackBerry (OS 4.6) -- BlackBerry WebWorks (OS 5.0 and higher) -- iPhone - -Quick Example -------------- - - // onSuccess Callback - // This method accepts a `Position` object, which contains - // the current GPS coordinates - // - var onSuccess = function(position) { - alert('Latitude: ' + position.coords.latitude + '\n' + - 'Longitude: ' + position.coords.longitude + '\n' + - 'Altitude: ' + position.coords.altitude + '\n' + - 'Accuracy: ' + position.coords.accuracy + '\n' + - 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' + - 'Heading: ' + position.coords.heading + '\n' + - 'Speed: ' + position.coords.speed + '\n' + - 'Timestamp: ' + new Date(position.timestamp) + '\n'); - }; - - // onError Callback receives a PositionError object - // - function onError(error) { - alert('code: ' + error.code + '\n' + - 'message: ' + error.message + '\n'); - } - - navigator.geolocation.getCurrentPosition(onSuccess, onError); - -Full Example ------------- - - - - - Device Properties Example - - - - - -

Finding geolocation...

- - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/geolocation/geolocation.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/geolocation/geolocation.md b/docs/en/1.0.0/phonegap/geolocation/geolocation.md deleted file mode 100644 index e45b31c..0000000 --- a/docs/en/1.0.0/phonegap/geolocation/geolocation.md +++ /dev/null @@ -1,49 +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. ---- - -Geolocation -=========== - -> The `geolocation` object provides access to the device's GPS sensor. - -Geolocation provides location information for the device, such as latitude and longitude. Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs. No guarantee is given that the API returns the device's actual location. - -This API is based on the [W3C Geo location API Specification](http://dev.w3.org/geo/api/spec-source.html). Some devices already provide an implementation of this spec. For those devices, the built-in support is used instead of replacing it with PhoneGap's implementation. For devices that don't have geolocation support, PhoneGap's implementation should be compatible with the W3C specification. - -Methods -------- - -- geolocation.getCurrentPosition -- geolocation.watchPosition -- geolocation.clearWatch - - -Arguments ---------- - -- geolocationSuccess -- geolocationError -- geolocationOptions - -Objects (Read-Only) -------------------- - -- Position -- PositionError -- Coordinates http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/geolocation/geolocation.watchPosition.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/geolocation/geolocation.watchPosition.md b/docs/en/1.0.0/phonegap/geolocation/geolocation.watchPosition.md deleted file mode 100644 index 1a73c2c..0000000 --- a/docs/en/1.0.0/phonegap/geolocation/geolocation.watchPosition.md +++ /dev/null @@ -1,126 +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. ---- - -geolocation.watchPosition -========================= - -Watches for changes to the device's current position. - - var watchId = navigator.geolocation.watchPosition(geolocationSuccess, - [geolocationError], - [geolocationOptions]); - -Parameters ----------- - -- __geolocationSuccess__: The callback that is called with the current position. -- __geolocationError__: (Optional) The callback that is called if there was an error. -- __geolocationOptions__: (Optional) The geolocation options. - -Returns -------- - -- __String__: returns a watch id that references the watch position interval. The watch id can be used with `geolocation.clearWatch` to stop watching for changes in position. - -Description ------------ - -Function `geolocation.watchPosition` is an asynchronous function. It returns the device's current position when a change in position has been detected. When the device has retrieved a new location, the `geolocationSuccess` callback is invoked with a `Position` object as the parameter. If there is an error, the `geolocationError` callback is invoked with a `PositionError` object. - -Supported Platforms -------------------- - -- Android -- BlackBerry (OS 4.6) -- BlackBerry WebWorks (OS 5.0 and higher) -- iPhone - -Quick Example -------------- - - // onSuccess Callback - // This method accepts a `Position` object, which contains - // the current GPS coordinates - // - function onSuccess(position) { - var element = document.getElementById('geolocation'); - element.innerHTML = 'Latitude: ' + position.coords.latitude + '
' + - 'Longitude: ' + position.coords.longitude + '
' + - '
' + element.innerHTML; - } - - // onError Callback receives a PositionError object - // - function onError(error) { - alert('code: ' + error.code + '\n' + - 'message: ' + error.message + '\n'); - } - - // Options: retrieve the location every 3 seconds - // - var watchID = navigator.geolocation.watchPosition(onSuccess, onError, { frequency: 3000 }); - - -Full Example ------------- - - - - - Device Properties Example - - - - - -

Watching geolocation...

- - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/geolocation/parameters/geolocation.options.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/geolocation/parameters/geolocation.options.md b/docs/en/1.0.0/phonegap/geolocation/parameters/geolocation.options.md deleted file mode 100644 index ce2cf69..0000000 --- a/docs/en/1.0.0/phonegap/geolocation/parameters/geolocation.options.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. ---- - -geolocationOptions -================== - -Optional parameters to customize the retrieval of the geolocation. - - { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true }; - -Options -------- - -- __frequency:__ How often to retrieve the position in milliseconds. This option is not part of the W3C spec and will be removed in the future. maximumAge should be used instead. _(Number)_ (Default: 10000) -- __enableHighAccuracy:__ Provides a hint that the application would like to receive the best possible results. _(Boolean)_ -- __timeout:__ The maximum length of time (msec) that is allowed to pass from the call to `geolocation.getCurrentPosition` or `geolocation.watchPosition` until the corresponding `geolocationSuccess` callback is invoked. _(Number)_ -- __maximumAge:__ Accept a cached position whose age is no greater than the specified time in milliseconds. _(Number)_ - -Android Quirks --------------- - -The Android 2.x simulators will not return a geolocation result unless the enableHighAccuracy option is set to true. - - { enableHighAccuracy: true } - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/geolocation/parameters/geolocationError.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/geolocation/parameters/geolocationError.md b/docs/en/1.0.0/phonegap/geolocation/parameters/geolocationError.md deleted file mode 100644 index c0091a0..0000000 --- a/docs/en/1.0.0/phonegap/geolocation/parameters/geolocationError.md +++ /dev/null @@ -1,32 +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. ---- - -geolocationError -================ - -The user's callback function that is called when there is an error for geolocation functions. - - function(error) { - // Handle the error - } - -Parameters ----------- - -- __error:__ The error returned by the device. (`PositionError`) http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/geolocation/parameters/geolocationSuccess.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/geolocation/parameters/geolocationSuccess.md b/docs/en/1.0.0/phonegap/geolocation/parameters/geolocationSuccess.md deleted file mode 100644 index 4c8b8fa..0000000 --- a/docs/en/1.0.0/phonegap/geolocation/parameters/geolocationSuccess.md +++ /dev/null @@ -1,46 +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. ---- - -geolocationSuccess -================== - -The user's callback function that is called when a geolocation position is available. - - function(position) { - // Do something - } - -Parameters ----------- - -- __position:__ The geolocation position returned by the device. (`Position`) - -Example -------- - - function geolocationSuccess(position) { - alert('Latitude: ' + position.coords.latitude + '\n' + - 'Longitude: ' + position.coords.longitude + '\n' + - 'Altitude: ' + position.coords.altitude + '\n' + - 'Accuracy: ' + position.coords.accuracy + '\n' + - 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' + - 'Heading: ' + position.coords.heading + '\n' + - 'Speed: ' + position.coords.speed + '\n' + - 'Timestamp: ' + new Date(position.timestamp) + '\n'); - } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/media/MediaError/mediaError.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/media/MediaError/mediaError.md b/docs/en/1.0.0/phonegap/media/MediaError/mediaError.md deleted file mode 100644 index ab79258..0000000 --- a/docs/en/1.0.0/phonegap/media/MediaError/mediaError.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. ---- - -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:__ 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 returned to the user through the `mediaError` callback function when an error occurs. - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/media/Parameters/mediaError.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/media/Parameters/mediaError.md b/docs/en/1.0.0/phonegap/media/Parameters/mediaError.md deleted file mode 100644 index e1803b4..0000000 --- a/docs/en/1.0.0/phonegap/media/Parameters/mediaError.md +++ /dev/null @@ -1,32 +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 is invoked when there is an error in media functions. - - function(error) { - // Handle the error - } - -Parameters ----------- - -- __error:__ The error returned by the device. (`MediaError`) http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/media/capture/CaptureCB.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/media/capture/CaptureCB.md b/docs/en/1.0.0/phonegap/media/capture/CaptureCB.md deleted file mode 100644 index 5f31fd0..0000000 --- a/docs/en/1.0.0/phonegap/media/capture/CaptureCB.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. ---- - -CaptureCB -========= - -> Invoked upon a successful media capture operation. - - function captureSuccess( MediaFile[] mediaFiles ) { ... }; - -Description ------------ - -This function is invoked after a successful capture operation has completed. This means 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 - } - }; http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/media/capture/CaptureError.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/media/capture/CaptureError.md b/docs/en/1.0.0/phonegap/media/capture/CaptureError.md deleted file mode 100644 index 5f98d51..0000000 --- a/docs/en/1.0.0/phonegap/media/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`: Camera or microphone failed to capture image or sound. -- CaptureError.`CAPTURE_APPLICATION_BUSY`: Camera application or audio capture application is currently serving other capture request. -- CaptureError.`CAPTURE_INVALID_ARGUMENT`: Invalid use of the API (e.g. limit parameter has value less than one). -- CaptureError.`CAPTURE_NO_MEDIA_FILES`: User exited camera application or audio capture application before capturing anything. -- CaptureError.`CAPTURE_NOT_SUPPORTED`: The requested capture operation is not supported. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/media/capture/CaptureErrorCB.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/media/capture/CaptureErrorCB.md b/docs/en/1.0.0/phonegap/media/capture/CaptureErrorCB.md deleted file mode 100644 index 948140a..0000000 --- a/docs/en/1.0.0/phonegap/media/capture/CaptureErrorCB.md +++ /dev/null @@ -1,40 +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 is invoked if an error occurs when trying to launch a media capture operation and the capture application is busy, if an error occurs while the capture operation is taking place, or if the capture operation has been canceled by the user before any media files have been captured. - -This function is invoked 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'); - }; http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/media/capture/ConfigurationData.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/media/capture/ConfigurationData.md b/docs/en/1.0.0/phonegap/media/capture/ConfigurationData.md deleted file mode 100644 index c166b3e..0000000 --- a/docs/en/1.0.0/phonegap/media/capture/ConfigurationData.md +++ /dev/null @@ -1,62 +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 ------------ - -This object is used to describe 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 string in lower case representing the media type. (DOMString) -- __height:__ The height of the image or video in pixels. In the case of a sound clip, this attribute has value 0. (Number) -- __width:__ The width of the image or video in pixels. In the case of a sound clip, this attribute has value 0. (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. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/media/capture/MediaFile.getFormatData.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/media/capture/MediaFile.getFormatData.md b/docs/en/1.0.0/phonegap/media/capture/MediaFile.getFormatData.md deleted file mode 100644 index 18f7541..0000000 --- a/docs/en/1.0.0/phonegap/media/capture/MediaFile.getFormatData.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. ---- - -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 will invoke the MediaFileDataErrorCB callback. - -Supported Platforms -------------------- - -- Android -- BlackBerry WebWorks (OS 5.0 and higher) -- iOS - -BlackBerry WebWorks Quirks --------------------------- -There is no API that provides format information of media files. Therefore, all MediaFileData objects will be returned with default values. See MediaFileData documentation. - -Android Quirks --------------- -The API for retrieving media file format information is limited. Therefore, not all MediaFileData properties are supported. See MediaFileData documentation. - -iOS Quirks ----------- -The API for retrieving media file format information is limited. Therefore, not all MediaFileData properties are supported. See MediaFileData documentation. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/media/capture/MediaFile.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/media/capture/MediaFile.md b/docs/en/1.0.0/phonegap/media/capture/MediaFile.md deleted file mode 100644 index fe3d9a1..0000000 --- a/docs/en/1.0.0/phonegap/media/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 mime type (DOMString) -- __lastModifiedDate:__ The date and time that 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. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/media/capture/MediaFileData.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/media/capture/MediaFileData.md b/docs/en/1.0.0/phonegap/media/capture/MediaFileData.md deleted file mode 100644 index 93ed349..0000000 --- a/docs/en/1.0.0/phonegap/media/capture/MediaFileData.md +++ /dev/null @@ -1,62 +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. In case of an image, this attribute has value 0. (Number) -- __height:__ The height of the image or video in pixels. In the case of a sound clip, this attribute has value 0. (Number) -- __width:__ The width of the image or video in pixels. In the case of a sound clip, this attribute has value 0. (Number) -- __duration:__ The length of the video or sound clip in seconds. In the case of an image, this attribute has value 0. (Number) - -BlackBerry WebWorks Quirks --------------------------- -There is no API that provides format information of media files. So the MediaFileData object returned by the MediaFile.getFormatData function will have the following default values: - -- __codecs:__ Not supported. The attribute will always be null. -- __bitrate:__ Not supported. The attribute will always be 0. -- __height:__ Not supported. The attribute will always be 0. -- __width:__ Not supported. The attribute will always be 0. -- __duration:__ Not supported. The attribute will always be 0. - -Android Quirks --------------- -Support for the MediaFileData properties is as follows: - -- __codecs:__ Not supported. The attribute will always be null. -- __bitrate:__ Not supported. The attribute will always be 0. -- __height:__ Supported. (Image and video files only). -- __width:__ Supported. (Image and video files only). -- __duration:__ Supported. (Audio and video files only). - -iOS Quirks ----------- -Support for the MediaFileData properties is as follows: - -- __codecs:__ Not supported. The attribute will always be null. -- __bitrate:__ Supported on iOS4 devices for audio only. The attribute will always be 0 for image and video. -- __height:__ Supported. (Image and video files only). -- __width:__ Supported. (Image and video files only). -- __duration:__ Supported. (Audio and video files only). \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/media/capture/capture.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/media/capture/capture.md b/docs/en/1.0.0/phonegap/media/capture/capture.md deleted file mode 100644 index 1d3c199..0000000 --- a/docs/en/1.0.0/phonegap/media/capture/capture.md +++ /dev/null @@ -1,74 +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 audio, image, and video capture capabilities of the device. - -Objects -------- - -- Capture -- CaptureAudioOptions -- CaptureImageOptions -- CaptureVideoOptions -- CaptureCB -- 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 audio recording application for recording audio clip(s). -- capture.captureImage: Launch the device camera application for taking image(s). -- capture.captureVideo: Launch the device video recorder application for recording video(s). - - -Supported Platforms -------------------- - -- Android -- BlackBerry WebWorks (OS 5.0 and higher) -- iOS http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/media/capture/captureAudio.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/media/capture/captureAudio.md b/docs/en/1.0.0/phonegap/media/capture/captureAudio.md deleted file mode 100644 index 6f7cdfe..0000000 --- a/docs/en/1.0.0/phonegap/media/capture/captureAudio.md +++ /dev/null @@ -1,134 +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 captured audio clip file(s). - - navigator.device.capture.captureAudio( - CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureAudioOptions options] - ); - -Description ------------ - -This method 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 the __limit__ parameter in CaptureAudioOptions, has been reached. If no value is provided for the __limit__ parameter, a default value of one (1) is used, and the capture operation will terminate after the user records a single audio clip. - -When the capture operation is finished, it will invoke the CaptureCB callback with an array of MediaFile objects describing each captured audio clip file. If the operation is terminated by the user before an audio clip is captured, the CaptureErrorCB callback will be invoked with a CaptureError object with the CaptureError.`CAPTURE_NO_MEDIA_FILES` error code. - -Supported Platforms -------------------- - -- Android -- BlackBerry WebWorks (OS 5.0 and higher) -- iOS - -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 ------------- - - - - - Capture Audio - - - - - - -
- - - -BlackBerry WebWorks Quirks --------------------------- - -- PhoneGap for BlackBerry WebWorks attempts to launch the __Voice Notes Recorder__ application, provided by RIM, to capture the audio recordings. The developer will receive 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. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/1.0.0/phonegap/media/capture/captureAudioOptions.md ---------------------------------------------------------------------- diff --git a/docs/en/1.0.0/phonegap/media/capture/captureAudioOptions.md b/docs/en/1.0.0/phonegap/media/capture/captureAudioOptions.md deleted file mode 100644 index 19ec58b..0000000 --- a/docs/en/1.0.0/phonegap/media/capture/captureAudioOptions.md +++ /dev/null @@ -1,56 +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. -- __mode:__ The selected audio mode. The value must match one of the elements in `capture.supportedAudioModes`. - -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. -- The __mode__ parameter is not supported. The audio recording format cannot be altered programmatically. Recordings are encoded using Adaptive Multi-Rate (AMR) format (audio/amr). - -BlackBerry WebWorks Quirks --------------------------- - -- The __duration__ parameter is not supported. Recording lengths cannot be limited programmatically. -- The __mode__ parameter is not supported. The audio recording format cannot be altered programmatically. Recordings are encoded using Adaptive Multi-Rate (AMR) format (audio/amr). - -iOS Quirks ----------- - -- The __limit__ parameter is not supported. One recording can be created for each invocation. -- The __mode__ parameter is not supported. The audio recording format cannot be altered programmatically. Recordings are encoded using Waveform Audio (WAV) format (audio/wav).