@capgo/capacitor-accelerometer
Capacitor plugin contract for working with the device accelerometer.
Overview
Section titled “Overview”Capacitor plugin contract for working with the device accelerometer.
Core Capabilities
Section titled “Core Capabilities”getMeasurement- Get the most recent accelerometer sample that was recorded by the native layer.isAvailable- Check if the current device includes an accelerometer sensor.startMeasurementUpdates- Begin streaming accelerometer updates to the JavaScript layer.stopMeasurementUpdates- Stop streaming accelerometer updates started via .
Public API
Section titled “Public API”| Method | Description |
|---|---|
getMeasurement | Get the most recent accelerometer sample that was recorded by the native layer. |
isAvailable | Check if the current device includes an accelerometer sensor. |
startMeasurementUpdates | Begin streaming accelerometer updates to the JavaScript layer. |
stopMeasurementUpdates | Stop streaming accelerometer updates started via . |
checkPermissions | Return the current permission state for accessing motion data. |
requestPermissions | Request permission to access motion data if supported by the platform. |
addListener | Listen for measurement updates. |
removeAllListeners | Remove all listeners that have been registered on the plugin. |
getPluginVersion | Get the native Capacitor plugin version. |
Source Of Truth
Section titled “Source Of Truth”This reference is synced from src/definitions.ts in capacitor-accelerometer.
Keep going from @capgo/capacitor-accelerometer
Section titled “Keep going from @capgo/capacitor-accelerometer”If you are using @capgo/capacitor-accelerometer to plan dashboard and API operations, connect it with Using @capgo/capacitor-accelerometer for the native capability in Using @capgo/capacitor-accelerometer, API Overview for the implementation detail in API Overview, Introduction for the implementation detail in Introduction, API Keys for the implementation detail in API Keys, and Devices for the implementation detail in Devices.