Skip to main content
Back to plugins
@capgo/capacitor-pedometer
Tutorial
@capgo/capacitor-pedometer

Pedometer

Track steps, distance, pace, cadence, and floors with device pedometer sensors

Guide

Tutorial on Pedometer

Using @capgo/capacitor-pedometer

Capacitor plugin for accessing pedometer data including steps, distance, pace, cadence, and floors.

Install

bun add @capgo/capacitor-pedometer
bunx cap sync

What This Plugin Exposes

  • getMeasurement - Get pedometer measurements for a specified time range.
  • isAvailable - Check which pedometer features are available on this device.
  • startMeasurementUpdates - Start receiving real-time pedometer measurement updates.
  • stopMeasurementUpdates - Stop receiving real-time pedometer measurement updates.

Example Usage

getMeasurement

Get pedometer measurements for a specified time range.

import { CapacitorPedometer } from '@capgo/capacitor-pedometer';

await CapacitorPedometer.getMeasurement();

isAvailable

Check which pedometer features are available on this device.

import { CapacitorPedometer } from '@capgo/capacitor-pedometer';

await CapacitorPedometer.isAvailable();

startMeasurementUpdates

Start receiving real-time pedometer measurement updates.

import { CapacitorPedometer } from '@capgo/capacitor-pedometer';

await CapacitorPedometer.startMeasurementUpdates();

stopMeasurementUpdates

Stop receiving real-time pedometer measurement updates.

import { CapacitorPedometer } from '@capgo/capacitor-pedometer';

await CapacitorPedometer.stopMeasurementUpdates();

Full Reference

Keep going from Using @capgo/capacitor-pedometer

If you are using Using @capgo/capacitor-pedometer to plan native plugin work, connect it with @capgo/capacitor-pedometer for the implementation detail in @capgo/capacitor-pedometer, Getting Started for the implementation detail in Getting Started, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins.