Skip to content

@capgo/capacitor-barometer

Capacitor plugin contract for working with the device barometer sensor.

Capacitor plugin contract for working with the device barometer sensor.

  • getMeasurement - Get the most recent barometer reading captured by the native layer.
  • isAvailable - Check if the current device includes a barometer sensor.
  • startMeasurementUpdates - Begin streaming barometer updates to the JavaScript layer.
  • stopMeasurementUpdates - Stop the continuous updates started via .
MethodDescription
getMeasurementGet the most recent barometer reading captured by the native layer.
isAvailableCheck if the current device includes a barometer sensor.
startMeasurementUpdatesBegin streaming barometer updates to the JavaScript layer.
stopMeasurementUpdatesStop the continuous updates started via .
checkPermissionsReturn the current permission state for accessing barometer data.
requestPermissionsRequest permission to access barometer data if required by the platform.
addListenerListen for pressure updates.
removeAllListenersRemove all registered listeners for this plugin.
getPluginVersionGet the native Capacitor plugin version.

This reference is synced from src/definitions.ts in capacitor-barometer.