Compass

Obtains the direction that the device is pointing.

Methods

Arguments

Permissions

Android

app/res/xml/plugins.xml

<plugin name="Compass" value="org.apache.cordova.CompassListener" />

Bada

No permissions are required.

BlackBerry WebWorks

No permissions are required.

iOS

App/Supporting Files/Cordova.plist

<key>Plugins</key>
<dict>
    <key>Compass</key>
    <string>CDVLocation</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

Tizen

No permissions are required.