cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject git commit: added docs
Date Thu, 25 Apr 2013 00:34:06 GMT
Updated Branches:
  refs/heads/master f2a92e900 -> d25d74dde


added docs


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/commit/d25d74dd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/tree/d25d74dd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/diff/d25d74dd

Branch: refs/heads/master
Commit: d25d74dde9321620446e0d47760ce360f8ff113f
Parents: f2a92e9
Author: Steven Gill <stevengill97@gmail.com>
Authored: Wed Apr 24 17:34:00 2013 -0700
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Wed Apr 24 17:34:00 2013 -0700

----------------------------------------------------------------------
 docs/acceleration/acceleration.md            |  109 ++++++++++++++++
 docs/accelerometer.clearWatch.md             |  114 +++++++++++++++++
 docs/accelerometer.getCurrentAcceleration.md |  110 ++++++++++++++++
 docs/accelerometer.md                        |   90 +++++++++++++
 docs/accelerometer.watchAcceleration.md      |  138 +++++++++++++++++++++
 docs/parameters/accelerometerError.md        |   27 ++++
 docs/parameters/accelerometerOptions.md      |   28 ++++
 docs/parameters/accelerometerSuccess.md      |   42 ++++++
 8 files changed, 658 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d25d74dd/docs/acceleration/acceleration.md
----------------------------------------------------------------------
diff --git a/docs/acceleration/acceleration.md b/docs/acceleration/acceleration.md
new file mode 100644
index 0000000..4f982b9
--- /dev/null
+++ b/docs/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.6.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>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d25d74dd/docs/accelerometer.clearWatch.md
----------------------------------------------------------------------
diff --git a/docs/accelerometer.clearWatch.md b/docs/accelerometer.clearWatch.md
new file mode 100644
index 0000000..579a6e7
--- /dev/null
+++ b/docs/accelerometer.clearWatch.md
@@ -0,0 +1,114 @@
+---
+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.
+---
+
+accelerometer.clearWatch
+========================
+
+Stop watching the `Acceleration` referenced by the watch ID parameter.
+
+    navigator.accelerometer.clearWatch(watchID);
+
+- __watchID__: The ID returned by `accelerometer.watchAcceleration`.
+
+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
+-------------
+
+    var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+    
+    // ... later on ...
+    
+    navigator.accelerometer.clearWatch(watchID);
+    
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Acceleration Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-2.6.0.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // The watch id references the current `watchAcceleration`
+        var watchID = null;
+        
+        // Wait for Cordova to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Cordova is ready
+        //
+        function onDeviceReady() {
+            startWatch();
+        }
+
+        // Start watching the acceleration
+        //
+        function startWatch() {
+            
+            // Update acceleration every 3 seconds
+            var options = { frequency: 3000 };
+            
+            watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+        }
+        
+        // Stop watching the acceleration
+        //
+        function stopWatch() {
+            if (watchID) {
+                navigator.accelerometer.clearWatch(watchID);
+                watchID = null;
+            }
+        }
+		    
+        // onSuccess: Get a snapshot of the current acceleration
+        //
+        function onSuccess(acceleration) {
+            var element = document.getElementById('accelerometer');
+            element.innerHTML = 'Acceleration X: ' + acceleration.x + '<br />' +
+                                'Acceleration Y: ' + acceleration.y + '<br />' +
+                                'Acceleration Z: ' + acceleration.z + '<br />' + 
+                                'Timestamp: '      + acceleration.timestamp + '<br />';
+        }
+
+        // onError: Failed to get the acceleration
+        //
+        function onError() {
+            alert('onError!');
+        }
+
+        </script>
+      </head>
+      <body>
+        <div id="accelerometer">Waiting for accelerometer...</div>
+		<button onclick="stopWatch();">Stop Watching</button>
+      </body>
+    </html>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d25d74dd/docs/accelerometer.getCurrentAcceleration.md
----------------------------------------------------------------------
diff --git a/docs/accelerometer.getCurrentAcceleration.md b/docs/accelerometer.getCurrentAcceleration.md
new file mode 100644
index 0000000..02e14b3
--- /dev/null
+++ b/docs/accelerometer.getCurrentAcceleration.md
@@ -0,0 +1,110 @@
+---
+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.
+---
+
+accelerometer.getCurrentAcceleration
+====================================
+
+Get the current acceleration along the x, y, and z axis.
+
+    navigator.accelerometer.getCurrentAcceleration(accelerometerSuccess, accelerometerError);
+
+Description
+-----------
+
+The accelerometer is a motion sensor that detects the change (delta) in movement relative
to the current device orientation. The accelerometer can detect 3D movement along the x, y,
and z axis.
+
+The acceleration is returned using the `accelerometerSuccess` callback function.
+
+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
+-------------
+
+    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.6.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>
+    
+iPhone Quirks
+-------------
+
+- iPhone doesn't have the concept of getting the current acceleration at any given point.
+- You must watch the acceleration and capture the data at given time intervals.
+- Thus, the `getCurrentAcceleration` function will give you the last value reported from
a Cordova `watchAccelerometer` call.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d25d74dd/docs/accelerometer.md
----------------------------------------------------------------------
diff --git a/docs/accelerometer.md b/docs/accelerometer.md
new file mode 100644
index 0000000..3f68d04
--- /dev/null
+++ b/docs/accelerometer.md
@@ -0,0 +1,90 @@
+---
+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.
+---
+
+Accelerometer
+=============
+
+> Captures device motion in the x, y, and z direction.
+
+Methods
+-------
+
+- accelerometer.getCurrentAcceleration
+- accelerometer.watchAcceleration
+- accelerometer.clearWatch
+
+Arguments
+---------
+
+- accelerometerSuccess
+- accelerometerError
+- accelerometerOptions
+
+Objects (Read-Only)
+-------------------
+
+- Acceleration
+
+Permissions
+-----------
+
+### Android
+
+#### app/res/xml/config.xml
+
+    <plugin name="Accelerometer" value="org.apache.cordova.AccelListener" />
+
+### Bada
+
+    No permissions are required.
+
+### BlackBerry WebWorks
+
+#### www/plugins.xml
+
+    <plugin name="Accelerometer" value="org.apache.cordova.accelerometer.Accelerometer"
/>
+
+#### www/config.xml
+
+    <feature id="blackberry.system"  required="true" version="1.0.0.0" />
+    <feature id="org.apache.cordova" required="true" version="1.0.0" />
+
+### iOS
+
+#### config.xml
+
+    <plugin name="Accelerometer" value="CDVAccelerometer" />
+
+### webOS
+
+    No permissions are required.
+
+### Windows Phone
+
+#### Properties/WPAppManifest.xml
+
+    <Capabilities>
+        <Capability Name="ID_CAP_SENSORS" />
+    </Capabilities>
+
+Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
+
+### Tizen
+
+    No permissions are required.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d25d74dd/docs/accelerometer.watchAcceleration.md
----------------------------------------------------------------------
diff --git a/docs/accelerometer.watchAcceleration.md b/docs/accelerometer.watchAcceleration.md
new file mode 100644
index 0000000..9cc7405
--- /dev/null
+++ b/docs/accelerometer.watchAcceleration.md
@@ -0,0 +1,138 @@
+---
+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.
+---
+
+accelerometer.watchAcceleration
+===============================
+
+At a regular interval, get the acceleration along the x, y, and z axis.
+
+    var watchID = navigator.accelerometer.watchAcceleration(accelerometerSuccess,
+                                                           accelerometerError,
+                                                           [accelerometerOptions]);
+                                                           
+Description
+-----------
+
+The accelerometer is a motion sensor that detects the change (delta) in movement relative
to the current position. The accelerometer can detect 3D movement along the x, y, and z axis.
+
+The `accelerometer.watchAcceleration` gets the device's current acceleration at a regular
interval. Each time the `Acceleration` is retrieved, the `accelerometerSuccess` callback function
is executed. Specify the interval in milliseconds via the `frequency` parameter in the `acceleratorOptions`
object.
+
+The returned watch ID references the accelerometer watch interval. The watch ID can be used
with `accelerometer.clearWatch` to stop watching the accelerometer.
+
+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
+-------------
+
+    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!');
+    };
+
+    var options = { frequency: 3000 };  // Update every 3 seconds
+    
+    var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Acceleration Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-2.6.0.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // The watch id references the current `watchAcceleration`
+        var watchID = null;
+        
+        // Wait for Cordova to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Cordova is ready
+        //
+        function onDeviceReady() {
+            startWatch();
+        }
+
+        // Start watching the acceleration
+        //
+        function startWatch() {
+            
+            // Update acceleration every 3 seconds
+            var options = { frequency: 3000 };
+            
+            watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+        }
+        
+        // Stop watching the acceleration
+        //
+        function stopWatch() {
+            if (watchID) {
+                navigator.accelerometer.clearWatch(watchID);
+                watchID = null;
+            }
+        }
+        
+        // onSuccess: Get a snapshot of the current acceleration
+        //
+        function onSuccess(acceleration) {
+            var element = document.getElementById('accelerometer');
+            element.innerHTML = 'Acceleration X: ' + acceleration.x + '<br />' +
+                                'Acceleration Y: ' + acceleration.y + '<br />' +
+                                'Acceleration Z: ' + acceleration.z + '<br />' +
+                                'Timestamp: '      + acceleration.timestamp + '<br />';
+        }
+
+        // onError: Failed to get the acceleration
+        //
+        function onError() {
+            alert('onError!');
+        }
+
+        </script>
+      </head>
+      <body>
+        <div id="accelerometer">Waiting for accelerometer...</div>
+      </body>
+    </html>
+    
+ iPhone Quirks
+-------------
+
+- At the interval requested, Cordova will call the success callback function and pass the
accelerometer results.
+- However, in requests to the device Cordova restricts the interval to minimum of every 40ms
and a maximum of every 1000ms.
+  - For example, if you request an interval of 3 seconds (3000ms), Cordova will request an
interval of 1 second from the device but invoke the success callback at the requested interval
of 3 seconds.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d25d74dd/docs/parameters/accelerometerError.md
----------------------------------------------------------------------
diff --git a/docs/parameters/accelerometerError.md b/docs/parameters/accelerometerError.md
new file mode 100644
index 0000000..c908c16
--- /dev/null
+++ b/docs/parameters/accelerometerError.md
@@ -0,0 +1,27 @@
+---
+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.
+---
+
+accelerometerError
+==================
+
+onError callback function for acceleration functions.
+
+    function() {
+        // Handle the error
+    }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d25d74dd/docs/parameters/accelerometerOptions.md
----------------------------------------------------------------------
diff --git a/docs/parameters/accelerometerOptions.md b/docs/parameters/accelerometerOptions.md
new file mode 100644
index 0000000..197f416
--- /dev/null
+++ b/docs/parameters/accelerometerOptions.md
@@ -0,0 +1,28 @@
+---
+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.
+---
+
+accelerometerOptions
+====================
+
+An optional parameter to customize the retrieval of the accelerometer.
+
+Options
+-------
+
+- __frequency:__ How often to retrieve the `Acceleration` in milliseconds. _(Number)_ (Default:
10000)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d25d74dd/docs/parameters/accelerometerSuccess.md
----------------------------------------------------------------------
diff --git a/docs/parameters/accelerometerSuccess.md b/docs/parameters/accelerometerSuccess.md
new file mode 100644
index 0000000..277fca8
--- /dev/null
+++ b/docs/parameters/accelerometerSuccess.md
@@ -0,0 +1,42 @@
+---
+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.
+---
+
+accelerometerSuccess
+====================
+
+onSuccess callback function that provides the Acceleration information.
+
+    function(acceleration) {
+        // Do something
+    }
+
+Parameters
+----------
+
+- __acceleration:__ The acceleration at a single moment in time. (Acceleration)
+
+Example
+-------
+
+    function onSuccess(acceleration) {
+        alert('Acceleration X: ' + acceleration.x + '\n' +
+              'Acceleration Y: ' + acceleration.y + '\n' +
+              'Acceleration Z: ' + acceleration.z + '\n' +
+              'Timestamp: '      + acceleration.timestamp + '\n');
+    };
\ No newline at end of file


Mime
View raw message