Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
Version 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mwbrooks committed Feb 5, 2013
1 parent 595f7d0 commit 8778e58
Show file tree
Hide file tree
Showing 199 changed files with 19,570 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.4.0rc1
2.4.0
197 changes: 197 additions & 0 deletions docs/en/2.4.0/config.json
@@ -0,0 +1,197 @@
{
"language": "English",
"merge": {
"accelerometer.md": [
"cordova/accelerometer/accelerometer.md",
"cordova/accelerometer/accelerometer.getCurrentAcceleration.md",
"cordova/accelerometer/accelerometer.watchAcceleration.md",
"cordova/accelerometer/accelerometer.clearWatch.md",
"cordova/accelerometer/acceleration/acceleration.md",
"cordova/accelerometer/parameters/accelerometerSuccess.md",
"cordova/accelerometer/parameters/accelerometerError.md",
"cordova/accelerometer/parameters/accelerometerOptions.md"
],
"camera.md": [
"cordova/camera/camera.md",
"cordova/camera/camera.getPicture.md",
"cordova/camera/parameter/cameraSuccess.md",
"cordova/camera/parameter/cameraError.md",
"cordova/camera/parameter/cameraOptions.md",
"cordova/camera/parameter/CameraPopoverOptions.md"
],
"capture.md": [
"cordova/media/capture/capture.md",
"cordova/media/capture/captureAudio.md",
"cordova/media/capture/captureAudioOptions.md",
"cordova/media/capture/captureImage.md",
"cordova/media/capture/captureImageOptions.md",
"cordova/media/capture/captureVideo.md",
"cordova/media/capture/captureVideoOptions.md",
"cordova/media/capture/CaptureError.md",
"cordova/media/capture/CaptureCB.md",
"cordova/media/capture/CaptureErrorCB.md",
"cordova/media/capture/ConfigurationData.md",
"cordova/media/capture/MediaFile.md",
"cordova/media/capture/MediaFile.getFormatData.md",
"cordova/media/capture/MediaFileData.md"
],
"compass.md": [
"cordova/compass/compass.md",
"cordova/compass/compass.getCurrentHeading.md",
"cordova/compass/compass.watchHeading.md",
"cordova/compass/compass.clearWatch.md",
"cordova/compass/compass.watchHeadingFilter.md",
"cordova/compass/compass.clearWatchFilter.md",
"cordova/compass/parameters/compassSuccess.md",
"cordova/compass/parameters/compassError.md",
"cordova/compass/parameters/compassOptions.md",
"cordova/compass/parameters/compassHeading.md",
"cordova/compass/compassError/compassError.md"
],
"contacts.md": [
"cordova/contacts/contacts.md",
"cordova/contacts/contacts.create.md",
"cordova/contacts/contacts.find.md",
"cordova/contacts/Contact/contact.md",
"cordova/contacts/ContactAddress/contactaddress.md",
"cordova/contacts/ContactField/contactfield.md",
"cordova/contacts/ContactFindOptions/contactfindoptions.md",
"cordova/contacts/ContactName/contactname.md",
"cordova/contacts/ContactOrganization/contactorganization.md",
"cordova/contacts/ContactError/contactError.md",
"cordova/contacts/parameters/contactSuccess.md",
"cordova/contacts/parameters/contactError.md",
"cordova/contacts/parameters/contactFields.md",
"cordova/contacts/parameters/contactFindOptions.md"
],
"device.md": [
"cordova/device/device.md",
"cordova/device/device.name.md",
"cordova/device/device.cordova.md",
"cordova/device/device.platform.md",
"cordova/device/device.uuid.md",
"cordova/device/device.version.md"
],
"events.md": [
"cordova/events/events.md",
"cordova/events/events.deviceready.md",
"cordova/events/events.pause.md",
"cordova/events/events.resume.md",
"cordova/events/events.online.md",
"cordova/events/events.offline.md",
"cordova/events/events.backbutton.md",
"cordova/events/events.batterycritical.md",
"cordova/events/events.batterylow.md",
"cordova/events/events.batterystatus.md",
"cordova/events/events.menubutton.md",
"cordova/events/events.searchbutton.md",
"cordova/events/events.startcallbutton.md",
"cordova/events/events.endcallbutton.md",
"cordova/events/events.volumedownbutton.md",
"cordova/events/events.volumeupbutton.md"
],
"file.md": [
"cordova/file/file.md",
"cordova/file/fileobj/fileobj.md",
"cordova/file/filereader/filereader.md",
"cordova/file/filewriter/filewriter.md",
"cordova/file/filesystem/filesystem.md",
"cordova/file/fileentry/fileentry.md",
"cordova/file/directoryentry/directoryentry.md",
"cordova/file/directoryreader/directoryreader.md",
"cordova/file/filetransfer/filetransfer.md",
"cordova/file/fileuploadoptions/fileuploadoptions.md",
"cordova/file/fileuploadresult/fileuploadresult.md",
"cordova/file/flags/flags.md",
"cordova/file/localfilesystem/localfilesystem.md",
"cordova/file/metadata/metadata.md",
"cordova/file/fileerror/fileerror.md",
"cordova/file/filetransfererror/filetransfererror.md"
],
"geolocation.md": [
"cordova/geolocation/geolocation.md",
"cordova/geolocation/geolocation.getCurrentPosition.md",
"cordova/geolocation/geolocation.watchPosition.md",
"cordova/geolocation/geolocation.clearWatch.md",
"cordova/geolocation/Coordinates/coordinates.md",
"cordova/geolocation/Position/position.md",
"cordova/geolocation/PositionError/positionError.md",
"cordova/geolocation/parameters/geolocationSuccess.md",
"cordova/geolocation/parameters/geolocationError.md",
"cordova/geolocation/parameters/geolocation.options.md"
],
"globalization.md": [
"cordova/globalization/globalization.md",
"cordova/globalization/globalization.getPreferredLanguage.md",
"cordova/globalization/globalization.getLocaleName.md",
"cordova/globalization/globalization.dateToString.md",
"cordova/globalization/globalization.stringToDate.md",
"cordova/globalization/globalization.getDatePattern.md",
"cordova/globalization/globalization.getDateNames.md",
"cordova/globalization/globalization.isDayLightSavingsTime.md",
"cordova/globalization/globalization.getFirstDayOfWeek.md",
"cordova/globalization/globalization.numberToString.md",
"cordova/globalization/globalization.stringToNumber.md",
"cordova/globalization/globalization.getNumberPattern.md",
"cordova/globalization/globalization.getCurrencyPattern.md",
"cordova/globalization/GlobalizationError/globalizationerror.md"
],
"media.md": [
"cordova/media/media.md",
"cordova/media/media.getCurrentPosition.md",
"cordova/media/media.getDuration.md",
"cordova/media/media.pause.md",
"cordova/media/media.play.md",
"cordova/media/media.release.md",
"cordova/media/media.seekTo.md",
"cordova/media/media.startRecord.md",
"cordova/media/media.stop.md",
"cordova/media/media.stopRecord.md",
"cordova/media/MediaError/mediaError.md",
"cordova/media/Parameters/mediaError.md"
],
"network.md": [
"cordova/network/network.md",
"cordova/network/network.isReachable.md",
"cordova/network/NetworkStatus/NetworkStatus.md",
"cordova/network/parameters/reachableCallback.md",
"cordova/network/parameters/reachableHostname.md",
"cordova/network/parameters/reachableOptions.md"
],
"connection.md": [
"cordova/connection/connection.md",
"cordova/connection/connection.type.md"
],
"notification.md": [
"cordova/notification/notification.md",
"cordova/notification/notification.alert.md",
"cordova/notification/notification.confirm.md",
"cordova/notification/notification.beep.md",
"cordova/notification/notification.vibrate.md"
],
"splashscreen.md": [
"cordova/splashscreen/splashscreen.md",
"cordova/splashscreen/splashscreen.show.md",
"cordova/splashscreen/splashscreen.hide.md"
],
"storage.md": [
"cordova/storage/storage.md",
"cordova/storage/storage.opendatabase.md",
"cordova/storage/parameters/name.md",
"cordova/storage/parameters/version.md",
"cordova/storage/parameters/display_name.md",
"cordova/storage/parameters/size.md",
"cordova/storage/database/database.md",
"cordova/storage/sqltransaction/sqltransaction.md",
"cordova/storage/sqlresultset/sqlresultset.md",
"cordova/storage/sqlresultsetrowlist/sqlresultsetrowlist.md",
"cordova/storage/sqlerror/sqlerror.md",
"cordova/storage/localstorage/localstorage.md"
],
"inappbrowser.md": [
"cordova/inappbrowser/inappbrowser.md",
"cordova/inappbrowser/window.open.md"
]

}
}
109 changes: 109 additions & 0 deletions docs/en/2.4.0/cordova/accelerometer/acceleration/acceleration.md
@@ -0,0 +1,109 @@
---
license: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
---

Acceleration
============

Contains `Accelerometer` data captured at a specific point in time.

Properties
----------

- __x:__ Amount of acceleration on the x-axis. (in m/s^2) (`Number`)
- __y:__ Amount of acceleration on the y-axis. (in m/s^2) (`Number`)
- __z:__ Amount of acceleration on the z-axis. (in m/s^2) (`Number`)
- __timestamp:__ Creation timestamp in milliseconds. (`DOMTimeStamp`)

Description
-----------

This object is created and populated by Cordova, and returned by an `Accelerometer` method. The x, y, z acceleration values include the effect of gravity (9.81 m/s^2), so at when a device is lying flat on a table facing up, the value returned should be x=0, y=0, z=9.81.

Supported Platforms
-------------------

- Android
- BlackBerry WebWorks (OS 5.0 and higher)
- iOS
- Windows Phone 7 and 8
- Bada 1.2 & 2.x
- webOS
- Tizen
- Windows 8


Quick Example
-------------

function onSuccess(acceleration) {
alert('Acceleration X: ' + acceleration.x + '\n' +
'Acceleration Y: ' + acceleration.y + '\n' +
'Acceleration Z: ' + acceleration.z + '\n' +
'Timestamp: ' + acceleration.timestamp + '\n');
};

function onError() {
alert('onError!');
};

navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);

Full Example
------------

<!DOCTYPE html>
<html>
<head>
<title>Acceleration Example</title>

<script type="text/javascript" charset="utf-8" src="cordova-2.4.0.js"></script>
<script type="text/javascript" charset="utf-8">

// Wait for Cordova to load
//
document.addEventListener("deviceready", onDeviceReady, false);

// Cordova is ready
//
function onDeviceReady() {
navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
}

// onSuccess: Get a snapshot of the current acceleration
//
function onSuccess(acceleration) {
alert('Acceleration X: ' + acceleration.x + '\n' +
'Acceleration Y: ' + acceleration.y + '\n' +
'Acceleration Z: ' + acceleration.z + '\n' +
'Timestamp: ' + acceleration.timestamp + '\n');
}

// onError: Failed to get the acceleration
//
function onError() {
alert('onError!');
}

</script>
</head>
<body>
<h1>Example</h1>
<p>getCurrentAcceleration</p>
</body>
</html>

0 comments on commit 8778e58

Please sign in to comment.