Accelerometer

Captures device motion in the x, y, and z direction.

Methods

Arguments

Objects (Read-Only)

Permissions

Android

app/res/xml/plugins.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

App/Supporting Files/Cordova.plist

<key>Plugins</key>
<dict>
    <key>Accelerometer</key>
    <string>CDVAccelerometer</string>
</dict>

webOS

No permissions are required.

Windows Phone

Properties/WPAppManifest.xml

<Capabilities>
    <Capability Name="ID_CAP_SENSORS" />
</Capabilities>

Reference: Application Manifest for Windows Phone