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 B024010563 for ; Fri, 19 Apr 2013 17:46:42 +0000 (UTC) Received: (qmail 42767 invoked by uid 500); 19 Apr 2013 17:46:42 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 42671 invoked by uid 500); 19 Apr 2013 17:46:42 -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 42484 invoked by uid 99); 19 Apr 2013 17:46:42 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Apr 2013 17:46:42 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E824B324E61; Fri, 19 Apr 2013 17:46:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: mwbrooks@apache.org To: commits@cordova.apache.org Date: Fri, 19 Apr 2013 17:46:45 -0000 Message-Id: <657bb9e1f67e42ab80afe8ac087fd751@git.apache.org> In-Reply-To: <431f6fd4187c4b9a83fb514d183cc40d@git.apache.org> References: <431f6fd4187c4b9a83fb514d183cc40d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [05/11] Version 2.7.0rc1 http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/media/media.pause.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/media/media.pause.md b/docs/en/2.7.0rc1/cordova/media/media.pause.md new file mode 100644 index 0000000..4c70ebe --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/media/media.pause.md @@ -0,0 +1,172 @@ +--- +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 +----------- + +Function `media.pause` is a synchronous function that 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 +------------ + + + + + Media Example + + + + + + Play Audio + Pause Playing Audio + Stop Playing Audio +

+ + http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/media/media.play.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/media/media.play.md b/docs/en/2.7.0rc1/cordova/media/media.play.md new file mode 100644 index 0000000..638d49d --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/media/media.play.md @@ -0,0 +1,198 @@ +--- +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 +----------- + +Function `media.play` is a synchronous function that 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 +------------ + + + + + Media Example + + + + + + Play Audio + Pause Playing Audio + Stop Playing Audio +

+ + + +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. Attempting to play more audio files then the supported amount will result in previous playback being stopped. + +iOS Quirk +--------- + +- __numberOfLoops__ + + Pass in 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 play the audio of the media file when the screen is locked (this defaults to true if not set). If this is set to true, it will ignore the state of the hardware mute button. 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 will search in the www for the file and then in the application documents/tmp directory. + + var myMedia = new Media("audio/beer.mp3") + myMedia.play() // will first look for file in www/audio/beer.mp3 then in /documents/tmp/audio/beer.mp3 http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/media/media.release.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/media/media.release.md b/docs/en/2.7.0rc1/cordova/media/media.release.md new file mode 100644 index 0000000..185720b --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/media/media.release.md @@ -0,0 +1,156 @@ +--- +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 systems audio resources. + + media.release(); + + +Description +----------- + +Function `media.release` is a synchronous function that releases the underlying operating systems audio resources. This function is particularly important for Android as there are a finite amount of OpenCore instances for media playback. Developers should call the 'release' function when they no longer need the Media resource. + +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 +------------ + + + + + Media Example + + + + + + Play Audio + Pause Playing Audio + Stop Playing Audio +

+ + http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/media/media.seekTo.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/media/media.seekTo.md b/docs/en/2.7.0rc1/cordova/media/media.seekTo.md new file mode 100644 index 0000000..ab0114d --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/media/media.seekTo.md @@ -0,0 +1,159 @@ +--- +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 +----------- + +Function `media.seekTo` is an asynchronous function that updates the current position of the underlying audio file of a Media object. Also updates the ___position__ parameter within the Media object. + +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 +------------ + + + + + Media Example + + + + + + Play Audio + Stop Playing Audio +

+ + + +BlackBerry WebWorks Quirks +---------- + +- This API is not supported on BlackBerry OS 5 devices. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/media/media.startRecord.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/media/media.startRecord.md b/docs/en/2.7.0rc1/cordova/media/media.startRecord.md new file mode 100644 index 0000000..a9d0e02 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/media/media.startRecord.md @@ -0,0 +1,156 @@ +--- +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 +----------- + +Function `media.startRecord` is a synchronous function that starts recording 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 +------------ + + + + + Device Properties Example + + + + + +

Recording audio...

+

+ + + +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 will be placed in the /documents/tmp directory. This can be accessed via the File apis using LocalFileSystem.TEMPORARY. Subdirectories are not created at record time and must already exist. Thus, myRecording.wav will work but recordings/myRecording.wav will not if the recordings directory does not already exist at /documents/tmp/. +- Files can be recorded and played back using the documents URI: + + var myMedia = new Media("documents://beer.mp3") + +Tizen Quirks +---------- + +- This API is not supported on Tizen devices. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/media/media.stop.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/media/media.stop.md b/docs/en/2.7.0rc1/cordova/media/media.stop.md new file mode 100644 index 0000000..0e0e420 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/media/media.stop.md @@ -0,0 +1,171 @@ +--- +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 +----------- + +Function `media.stop` is a synchronous function that stops 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 +------------ + + + + + Media Example + + + + + + Play Audio + Pause Playing Audio + Stop Playing Audio +

+ + http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/media/media.stopRecord.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/media/media.stopRecord.md b/docs/en/2.7.0rc1/cordova/media/media.stopRecord.md new file mode 100644 index 0000000..041d9b7 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/media/media.stopRecord.md @@ -0,0 +1,142 @@ +--- +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 +----------- + +Function `media.stopRecord` is a synchronous function that stops recording 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 +------------ + + + + + Device Properties Example + + + + + +

Recording audio...

+

+ + + +Tizen Quirks +---------- + +- This API is not supported on Tizen devices. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/notification/notification.alert.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/notification/notification.alert.md b/docs/en/2.7.0rc1/cordova/notification/notification.alert.md new file mode 100644 index 0000000..811945d --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/notification/notification.alert.md @@ -0,0 +1,117 @@ +--- +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. +--- + +notification.alert +================== + +Shows a custom alert or dialog box. + + navigator.notification.alert(message, alertCallback, [title], [buttonName]) + +- __message:__ Dialog message (`String`) +- __alertCallback:__ Callback to invoke when alert dialog is dismissed. (`Function`) +- __title:__ Dialog title (`String`) (Optional, Default: "Alert") +- __buttonName:__ Button name (`String`) (Optional, Default: "OK") + +Description +----------- + +Most Cordova implementations use a native dialog box for this feature. However, some platforms simply use the browser's `alert` function, which is typically less customizable. + +Supported Platforms +------------------- + +- Android +- BlackBerry WebWorks (OS 5.0 and higher) +- iPhone +- Windows Phone 7 and 8 +- Bada 1.2 & 2.x +- webOS +- Tizen +- Windows 8 + +Quick Example +------------- + + // Android / BlackBerry WebWorks (OS 5.0 and higher) / iPhone / Tizen + // + function alertDismissed() { + // do something + } + + navigator.notification.alert( + 'You are the winner!', // message + alertDismissed, // callback + 'Game Over', // title + 'Done' // buttonName + ); + +Full Example +------------ + + + + + Notification Example + + + + + +

Show Alert

+ + + +Windows Phone 7 and 8 Quirks +------------- + +- There is no built in browser alert, so if you want to just write alert('foo'); you can assign window.alert = navigator.notification.alert; +- alert + confirm calls are non-blocking, and result is only available asynchronously. + +Bada 2.x Quirks +--------------- +- alert uses javascript alert http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/notification/notification.beep.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/notification/notification.beep.md b/docs/en/2.7.0rc1/cordova/notification/notification.beep.md new file mode 100644 index 0000000..e6848d2 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/notification/notification.beep.md @@ -0,0 +1,120 @@ +--- +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. +--- + +notification.beep +================= + +The device will play a beep sound. + + navigator.notification.beep(times); + +- __times:__ The number of times to repeat the beep (`Number`) + +Supported Platforms +------------------- + +- Android +- BlackBerry WebWorks (OS 5.0 and higher) +- iPhone +- Windows Phone 7 and 8 +- Bada 1.2 & 2.x +- Tizen + +Quick Example +------------- + + // Beep twice! + navigator.notification.beep(2); + +Full Example +------------ + + + + + Notification Example + + + + + +

Show Alert

+

Play Beep

+

Vibrate

+ + + +Android Quirks +-------------- + +- Android plays the default "Notification ringtone" specified under the "Settings/Sound & Display" panel. + +iPhone Quirks +------------- + +- Ignores the beep count argument. +- There is no native beep API for iPhone. + - Cordova implements beep by playing an audio file via the media API. + - The user must provide a file with the desired beep tone. + - This file must be less than 30 seconds long, located in the www/ root, and must be named `beep.wav`. + +Windows Phone 7 and 8 Quirks +------------- + +- Cordova lib includes a generic beep file that is used. + +Tizen Quirks +------------- + + - Tizen implements beep by playing an audio file via the media API. + - This beep file must be short, named `beep.wav` and has to be located in a 'sounds' sub-directory of the application root directory. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/notification/notification.confirm.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/notification/notification.confirm.md b/docs/en/2.7.0rc1/cordova/notification/notification.confirm.md new file mode 100755 index 0000000..ac4016b --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/notification/notification.confirm.md @@ -0,0 +1,134 @@ +--- +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. +--- + +notification.confirm +==================== + +Shows a customizable confirmation dialog box. + + navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels]) + +- __message:__ Dialog message (`String`) +- __confirmCallback:__ - Callback to invoke with index of button pressed (1, 2 or 3) or when the dialog is dismissed without a button press (0), (`Function`) +- __title:__ Dialog title (`String`) (Optional, Default: "Confirm") +- __buttonLabels:__ Comma separated string with button labels (`String`) (Optional, Default: "OK,Cancel") + +Description +----------- + +Function `notification.confirm` displays a native dialog box that is more customizable than the browser's `confirm` function. + +confirmCallback +--------------- + +The `confirmCallback` is called when the user has pressed one of the buttons on the confirmation dialog box. + +The callback takes the argument `buttonIndex` (`Number`), which is the index of the pressed button. It's important to note that the index uses one-based indexing, so the value will be `1`, `2`, `3`, etc. + +Supported Platforms +------------------- + +- Android +- BlackBerry WebWorks (OS 5.0 and higher) +- iPhone +- Windows Phone 7 and 8 +- Bada 1.2 & 2.x +- Tizen +- Windows 8 + +Quick Example +------------- + + // process the confirmation dialog result + function onConfirm(buttonIndex) { + alert('You selected button ' + buttonIndex); + } + + // Show a custom confirmation dialog + // + function showConfirm() { + navigator.notification.confirm( + 'You are the winner!', // message + onConfirm, // callback to invoke with index of button pressed + 'Game Over', // title + 'Restart,Exit' // buttonLabels + ); + } + +Full Example +------------ + + + + + Notification Example + + + + + +

Show Confirm

+ + + +Windows Phone 7 and 8 Quirks +---------------------- + +- There is no built-in browser function for `window.confirm` + - You can bind `window.confirm` by assigning `window.confirm = navigator.notification.confirm;`. +- Calls to `alert` and `confirm` are non-blocking and result is only available asynchronously. + + +Bada 2.x Quirks +--------------- + +- `confirm` uses the browser's built-in `alert` function. + +Bada 1.2 Quirks +--------------- + +- Ignore button names, always `'OK|Cancel'`. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/notification/notification.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/notification/notification.md b/docs/en/2.7.0rc1/cordova/notification/notification.md new file mode 100644 index 0000000..2f6c059 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/notification/notification.md @@ -0,0 +1,81 @@ +--- +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. +--- + +Notification +============ + +> Visual, audible, and tactile device notifications. + +Methods +------- + +- notification.alert +- notification.confirm +- notification.prompt +- notification.beep +- notification.vibrate + +Permissions +----------- + +### Android + +#### app/res/xml/config.xml + + + +#### app/AndroidManifest.xml + + + +### Bada + +#### manifest.xml + + + SYSTEM_SERVICE + + +### BlackBerry WebWorks + +#### www/plugins.xml + + + +#### www/config.xml + + + +### iOS + +#### config.xml + + + +### webOS + + No permissions are required. + +### Windows Phone + + No permissions are required. + +### Tizen + + No permissions are required. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/notification/notification.prompt.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/notification/notification.prompt.md b/docs/en/2.7.0rc1/cordova/notification/notification.prompt.md new file mode 100644 index 0000000..0d37be4 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/notification/notification.prompt.md @@ -0,0 +1,120 @@ +--- +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. +--- + +notification.prompt +==================== + +Shows a customizable prompt dialog box. + + navigator.notification.prompt(message, promptCallback, [title], [buttonLabels]) + +- __message:__ Dialog message (`String`) +- __promptCallback:__ - Callback to invoke when a button is pressed (`Function`) +- __title:__ Dialog title (`String`) (Optional, Default: "Prompt") +- __buttonLabels:__ Array of strings for the button labels (`Array`) (Optional, Default: ["OK","Cancel"]) + +Description +----------- + +Function `notification.prompt` displays a native dialog box that is more customizable than the browser's `prompt` function. + +promptCallback +--------------- + +The `promptCallback` is called when the user has pressed one of the buttons on the prompt dialog box. + +The callback takes the argument `results` which contains the following properties: + +- __buttonIndex:__ (`Number`), which is the index of the pressed button. It's important to note that the index uses one-based indexing, so the value will be `1`, `2`, `3`, etc. +- __input1:__ (`String`), which is the text entered in the prompt dialog box. + +Supported Platforms +------------------- + +- Android +- iPhone + +Quick Example +------------- + + // process the promp dialog results + function onPrompt(results) { + alert("You selected button number " + results.buttonIndex + " and entered " + results.input1); + } + + // Show a custom prompt dialog + // + function showPrompt() { + navigator.notification.prompt( + 'Please enter your name', // message + onPrompt, // callback to invoke + 'Registration', // title + ['Ok','Exit'] // buttonLabels + ); + } + +Full Example +------------ + + + + + Notification Prompt Dialog Example + + + + + +

Show Prompt

+ + + +Android Quirks +---------------------- + +- Android supports up to a maximum of 3 buttons. Additional button labels over 3 are ignored. +- On Android 3.0 and later, the buttons will be displayed in reverse order for devices using the Holo theme. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/notification/notification.vibrate.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/notification/notification.vibrate.md b/docs/en/2.7.0rc1/cordova/notification/notification.vibrate.md new file mode 100644 index 0000000..c00c65d --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/notification/notification.vibrate.md @@ -0,0 +1,103 @@ +--- +license: Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--- + +notification.vibrate +==================== + +Vibrates the device for the specified amount of time. + + navigator.notification.vibrate(milliseconds) + +- __time:__ Milliseconds to vibrate the device. 1000 milliseconds equals 1 second (`Number`) + +Supported Platforms +------------------- + +- Android +- BlackBerry WebWorks (OS 5.0 and higher) +- iPhone +- Windows Phone 7 and 8 +- Bada 1.2 & 2.x + +Quick Example +------------- + + // Vibrate for 2.5 seconds + // + navigator.notification.vibrate(2500); + +Full Example +------------ + + + + + Notification Example + + + + + +

Show Alert

+

Play Beep

+

Vibrate

+ + + +iPhone Quirks +------------- + +- __time:__ Ignores the time and vibrates for a pre-set amount of time. + + navigator.notification.vibrate(); + navigator.notification.vibrate(2500); // 2500 is ignored http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/splashscreen/splashscreen.hide.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/splashscreen/splashscreen.hide.md b/docs/en/2.7.0rc1/cordova/splashscreen/splashscreen.hide.md new file mode 100644 index 0000000..34b67c8 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/splashscreen/splashscreen.hide.md @@ -0,0 +1,80 @@ +--- +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. +--- + +hide +=============== + +Dismiss the splash screen. + + navigator.splashscreen.hide(); + +Description +----------- + +navigator.splashscreen.hide() dismisses the applications splash screen. + +Supported Platforms +------------------- + +- Android +- iOS + +Quick Example +------------- + + navigator.splashscreen.hide(); + +Full Example +------------ + + + + + Splashscreen Example + + + + + +

Example

+ + + +iOS Quirk +------------ + +1. In your **config.xml**, you need to [modify the value](guide_project-settings_index.md.html#Project%20Settings) for **"AutoHideSplashScreen”** to false + +2. Then, if you want to delay hiding the splash screen for 2 seconds, you can do this in your **deviceready** event handler: + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/splashscreen/splashscreen.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/splashscreen/splashscreen.md b/docs/en/2.7.0rc1/cordova/splashscreen/splashscreen.md new file mode 100644 index 0000000..53df714 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/splashscreen/splashscreen.md @@ -0,0 +1,85 @@ +--- +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. +--- + +Splashscreen +========== + +> Enables developers to show/hide the application's splash screen. + + +Methods +------- + +- show +- hide + +Permissions +----------- + +### Android + +#### app/res/xml/config.xml + + + +### iOS + +#### config.xml + + + +Setup +----- + +### Android + +1. Copy your splash screen image into the res/drawable directories of your Android project. The sizes of each image should be: + + - xlarge (xhdpi): at least 960 x 720 + - large (hdpi): at least 640 x 480 + - medium (mdpi): at least 470 x 320 + - small (ldpi): at least 426 x 320 + + It is highly recommended that you use a [9-patch image](https://developer.android.com/tools/help/draw9patch.html) for your splash screen. + +2. In the onCreate method of the class that extends DroidGap add the following two lines: + + super.setIntegerProperty("splashscreen", R.drawable.splash); + super.loadUrl(Config.getStartUrl(), 10000); + + The first line 'super.setIntegerProperty' sets the image to be displayed as the splashscreen. If you have named your image anything other than splash.png you will have to modify this line. + The second line is the normal 'super.loadUrl' line but it has a second parameter which is the timeout value for the splash screen. In this example the splash screen will display for 10 seconds. If you want to dismiss the splash screen once you get the "deviceready" event you should call the navigator.splashscreen.hide() method. + +### iOS + +1. Copy your splash screen images into the **Resources/splash** directory of your iOS project. Only add the images for the devices you want to support (iPad screen size or iPhone screen size). The sizes of each image should be: + + - Default-568h@2x~iphone.png (640x1136 pixels) + - Default-Landscape@2x~ipad.png (2048x1496 pixels) + - Default-Landscape~ipad.png (1024x748 pixels) + - Default-Portrait@2x~ipad.png (1536x2008 pixels) + - Default-Portrait~ipad.png (768x1004 pixels) + - Default@2x~iphone.png (640x960 pixels) + - Default~iphone.png (320x480 pixels) + + + + + + http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/splashscreen/splashscreen.show.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/splashscreen/splashscreen.show.md b/docs/en/2.7.0rc1/cordova/splashscreen/splashscreen.show.md new file mode 100644 index 0000000..cff5700 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/splashscreen/splashscreen.show.md @@ -0,0 +1,69 @@ +--- +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. +--- + +show +=============== + +Displays the splash screen. + + navigator.splashscreen.show(); + +Description +----------- + +navigator.splashscreen.show() displays the applications splash screen. + +Supported Platforms +------------------- + +- Android +- iOS + +Quick Example +------------- + + navigator.splashscreen.show(); + +Full Example +------------ + + + + + Splashscreen Example + + + + + +

Example

+ + http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/storage/database/database.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/storage/database/database.md b/docs/en/2.7.0rc1/cordova/storage/database/database.md new file mode 100644 index 0000000..65f0139 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/storage/database/database.md @@ -0,0 +1,121 @@ +--- +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. +--- + +Database +======= + +Contains methods that allow the user to manipulate the Database + +Methods +------- + +- __transaction__: Runs a database transaction. +- __changeVersion__: method allows scripts to atomically verify the version number and change it at the same time as doing a schema update. + +Details +------- + +A Database object is returned from a call to `window.openDatabase()`. + +Supported Platforms +------------------- + +- Android +- BlackBerry WebWorks (OS 6.0 and higher) +- iPhone +- webOS +- Tizen + +Transaction Quick Example +------------------ + function populateDB(tx) { + tx.executeSql('DROP TABLE IF EXISTS DEMO'); + tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)'); + tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")'); + tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")'); + } + + function errorCB(err) { + alert("Error processing SQL: "+err.code); + } + + function successCB() { + alert("success!"); + } + + var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000); + db.transaction(populateDB, errorCB, successCB); + +Change Version Quick Example +------------------- + + var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000); + db.changeVersion("1.0", "1.1"); + +Full Example +------------ + + + + + Storage Example + + + + + +

Example

+

Database

+ + + http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/storage/localstorage/localstorage.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/storage/localstorage/localstorage.md b/docs/en/2.7.0rc1/cordova/storage/localstorage/localstorage.md new file mode 100644 index 0000000..c36a958 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/storage/localstorage/localstorage.md @@ -0,0 +1,121 @@ +--- +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. +--- + +localStorage +=============== + +Provides access to a W3C Storage interface (http://dev.w3.org/html5/webstorage/#the-localstorage-attribute) + + var storage = window.localStorage; + +Methods +------- + +- __key__: Returns the name of the key at the position specified. +- __getItem__: Returns the item identified by it's key. +- __setItem__: Saves and item at the key provided. +- __removeItem__: Removes the item identified by it's key. +- __clear__: Removes all of the key value pairs. + +Details +----------- + +localStorage provides an interface to a W3C Storage interface. It allows one to save data as key-value pairs. + +Note: window.sessionStorage provides the same interface, but is cleared between app launches. + +Supported Platforms +------------------- + +- Android +- BlackBerry WebWorks (OS 6.0 and higher) +- iPhone +- Windows Phone 7 and 8 +- webOS +- Tizen + +Key Quick Example +------------- + + var keyName = window.localStorage.key(0); + +Set Item Quick Example +------------- + + window.localStorage.setItem("key", "value"); + +Get Item Quick Example +------------- + + var value = window.localStorage.getItem("key"); + // value is now equal to "value" + +Remove Item Quick Example +------------- + + window.localStorage.removeItem("key"); + +Clear Quick Example +------------- + + window.localStorage.clear(); + +Full Example +------------ + + + + + Storage Example + + + + + +

Example

+

localStorage

+ + + + +Windows Phone 7 Quirks +------------- + +- dot notation is NOT available on Windows Phone 7. Be sure to use : window.localStorage.setItem/getItem, and not the w3 spec defined calls to window.localStorage.someKey = 'someValue'; http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/storage/parameters/display_name.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/storage/parameters/display_name.md b/docs/en/2.7.0rc1/cordova/storage/parameters/display_name.md new file mode 100644 index 0000000..69af089 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/storage/parameters/display_name.md @@ -0,0 +1,23 @@ +--- +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. +--- + +database_displayname +================== + +The display name of the database. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/storage/parameters/name.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/storage/parameters/name.md b/docs/en/2.7.0rc1/cordova/storage/parameters/name.md new file mode 100644 index 0000000..c39dcbf --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/storage/parameters/name.md @@ -0,0 +1,23 @@ +--- +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. +--- + +database_name +============ + +The name of the database. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/storage/parameters/size.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/storage/parameters/size.md b/docs/en/2.7.0rc1/cordova/storage/parameters/size.md new file mode 100644 index 0000000..9b46993 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/storage/parameters/size.md @@ -0,0 +1,23 @@ +--- +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. +--- + +database_size +============== + +The size of the database in bytes. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/storage/parameters/version.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/storage/parameters/version.md b/docs/en/2.7.0rc1/cordova/storage/parameters/version.md new file mode 100644 index 0000000..2e72923 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/storage/parameters/version.md @@ -0,0 +1,23 @@ +--- +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. +--- + +database_version +============= + +The version of the database. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/dc55db0c/docs/en/2.7.0rc1/cordova/storage/sqlerror/sqlerror.md ---------------------------------------------------------------------- diff --git a/docs/en/2.7.0rc1/cordova/storage/sqlerror/sqlerror.md b/docs/en/2.7.0rc1/cordova/storage/sqlerror/sqlerror.md new file mode 100644 index 0000000..b700222 --- /dev/null +++ b/docs/en/2.7.0rc1/cordova/storage/sqlerror/sqlerror.md @@ -0,0 +1,47 @@ +--- +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. +--- + +SQLError +======== + +A `SQLError` object is thrown when an error occurs. + +Properties +---------- + +- __code:__ One of the predefined error codes listed below. +- __message:__ A description of the error. + +Constants +--------- + +- `SQLError.UNKNOWN_ERR` +- `SQLError.DATABASE_ERR` +- `SQLError.VERSION_ERR` +- `SQLError.TOO_LARGE_ERR` +- `SQLError.QUOTA_ERR` +- `SQLError.SYNTAX_ERR` +- `SQLError.CONSTRAINT_ERR` +- `SQLError.TIMEOUT_ERR` + +Description +----------- + +The `SQLError` object is thrown when an error occurs when manipulating a database. +