---
description: Capacitor plugin to retrieve motion data, such as the number of steps and other information about the distance traveled.
title: Capacitor Pedometer Plugin for Android & iOS - Capawesome
image: https://capawesome.io/docs/assets/images/social/plugins/pedometer.png
---

[ Skip to content](#capawesome-teamcapacitor-pedometer) 

[ 🎉 Introducing **Capawesome Platform** — one platform for Live Updates, Native Builds, App Store Publishing, and Insider SDKs.](https://capawesome.io) 

* [  Formbricks ](/docs/plugins/formbricks/)
* [  Geocoder ](/docs/plugins/geocoder/)
* [  Google Sign-In ](/docs/plugins/google-sign-in/)
* [  Grafana Faro ](/docs/plugins/grafana-faro/)
* [  libSQL ](/docs/plugins/libsql/)
* [  Live Update ](/docs/plugins/live-update/)
* [  Managed Configurations ](/docs/plugins/managed-configurations/)
* [  Media Session ](/docs/plugins/media-session/)
* [  ML Kit ](/docs/plugins/mlkit/)
* [  Navigation Bar ](/docs/plugins/navigation-bar/)
* [  NFC ](/docs/plugins/nfc/)
* [  OAuth ](/docs/plugins/oauth/)
* Pedometer [  Pedometer ](/docs/plugins/pedometer/)
* [  iOS ](#ios)
* [  Usage ](#usage)
* [  API ](#api)
* [  Type Aliases ](#type-aliases)
* [  Changelog ](#changelog)
* [  Breaking Changes ](#breaking-changes)
* [  License ](#license)
* [  Photo Editor ](/docs/plugins/photo-editor/)
* [  PostHog ](/docs/plugins/posthog/)
* [  Printer ](/docs/plugins/printer/)
* [  Purchases ](/docs/plugins/purchases/)
* [  RealtimeKit ](/docs/plugins/realtimekit/)
* [  Screen Orientation ](/docs/plugins/screen-orientation/)
* [  Screenshot ](/docs/plugins/screenshot/)
* [  Secure Preferences ](/docs/plugins/secure-preferences/)
* [  Speech Recognition ](/docs/plugins/speech-recognition/)
* [  Speech Synthesis ](/docs/plugins/speech-synthesis/)
* [  Share Target ](/docs/plugins/share-target/)
* [  Square Mobile Payments ](/docs/plugins/square-mobile-payments/)
* [  SQLite ](/docs/plugins/sqlite/)
* [  Superwall ](/docs/plugins/superwall/)
* [  Torch ](/docs/plugins/torch/)
* [  Wifi ](/docs/plugins/wifi/)
* [  Zip ](/docs/plugins/zip/)
* [  Cloud ](/docs/cloud/)
* [  Live Updates ](/docs/cloud/live-updates/)
* Advanced
* Integrations
* [  Native Builds ](/docs/cloud/native-builds/)
* [  Configuration ](/docs/cloud/native-builds/configuration/)
* [  Environments ](/docs/cloud/native-builds/environments/)
* Guides
* [  Sample Projects ](/docs/cloud/native-builds/sample-projects/)
* [  Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [  Automations ](/docs/cloud/automations/)
* [  Assist ](/docs/cloud/assist/)
* Account
* Organizations
* [  Organization and User Management ](/docs/cloud/organizations/memberships/)
* [  Single Sign-On (SSO) ](/docs/cloud/organizations/sso/)
* [  Teams ](/docs/cloud/organizations/teams/)
* [  Two-Factor Authentication ](/docs/cloud/organizations/two-factor-authentication/)
* [  Integrations ](/docs/cloud/integrations/)
* [  License Keys ](/docs/cloud/license-keys/)
* [  Webhooks ](/docs/cloud/webhooks/)
* [  Pricing ](https://capawesome.io/pricing/)
* [  FAQ ](/docs/cloud/faq/)
* [  Support ](/docs/cloud/support/)
* [  Contributing ](/docs/contributing/)
* [  LLMs ](/docs/llms/)
* [  Insiders ](/docs/insiders/)
* [  License ](https://capawesome.io/legal/eula/)
* [  Support ](/docs/insiders/support/)
* [  FAQ ](/docs/insiders/faq/)
* [  Blog ](/blog/)
* Categories

* [  iOS ](#ios)
* [  Usage ](#usage)
* [  API ](#api)
* [  Type Aliases ](#type-aliases)
* [  Changelog ](#changelog)
* [  Breaking Changes ](#breaking-changes)
* [  License ](#license)

# @capawesome-team/capacitor-pedometer[¶](#capawesome-teamcapacitor-pedometer "Permanent link")

Capacitor plugin to retrieve motion data, such as the number of steps and other information about the distance traveled.

[ ![Deliver Live Updates to your Capacitor app with Capawesome Cloud](../../assets/external/cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.69628c3f.png) ](https://cloud.capawesome.io/) 

## Features[¶](#features "Permanent link")

We are proud to offer one of the most complete and feature-rich Capacitor plugins for pedometer data. Here are some of the key features:

* 🖥️ **Cross-platform**: Supports Android and iOS.
* 🚶 **Motion Tracking**: Retrieve step count, distance, pace, cadence, and floor counting data.
* 📊 **Real-time Updates**: Stream live pedometer data with event listeners for continuous monitoring.
* 📅 **Historical Data**: Query pedometer measurements for specific time ranges and periods.
* 🔍 **Feature Detection**: Check device capability for different pedometer features (steps, distance, floors, etc.).
* 📦 **CocoaPods & SPM**: Supports CocoaPods and Swift Package Manager for iOS.
* 🔁 **Up-to-date**: Always supports the latest Capacitor version.
* ⭐️ **Support**: Priority support from the Capawesome Team.
* ✨ **Handcrafted**: Built from the ground up with care and expertise, not forked or AI-generated.

Missing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!

## Newsletter[¶](#newsletter "Permanent link")

Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).

## Compatibility[¶](#compatibility "Permanent link")

| Plugin Version | Capacitor Version | Status         |
| -------------- | ----------------- | -------------- |
| 8.x.x          | \>=8.x.x          | Active support |
| 7.x.x          | 7.x.x             | Deprecated     |

## Installation[¶](#installation "Permanent link")

This plugin is only available to [Capawesome Insiders](https://capawesome.io/insiders/). First, make sure you have the Capawesome npm registry set up. You can do this by running the following commands:

`[](#%5F%5Fcodelineno-0-1)npm config set @capawesome-team:registry https://npm.registry.capawesome.io
[](#%5F%5Fcodelineno-0-2)npm config set //npm.registry.capawesome.io/:_authToken <YOUR_LICENSE_KEY>
`

**Attention**: Replace `<YOUR_LICENSE_KEY>` with the license key you received from Polar. If you don't have a license key yet, you can get one by becoming a [Capawesome Insider](https://capawesome.io/insiders/).

Next, you can use our **AI-Assisted Setup** to install the plugin. Add the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:

`[](#%5F%5Fcodelineno-1-1)npx skills add capawesome-team/skills --skill capacitor-plugins
`

Then use the following prompt:

`` [](#%5F%5Fcodelineno-2-1)Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome-team/capacitor-pedometer` plugin in my project.
 ``

If you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:

`[](#%5F%5Fcodelineno-3-1)npm install @capawesome-team/capacitor-pedometer
[](#%5F%5Fcodelineno-3-2)npx cap sync
`

### Android[¶](#android "Permanent link")

#### Proguard[¶](#proguard "Permanent link")

If you are using Proguard, you need to add the following rules to your `proguard-rules.pro` file:

`[](#%5F%5Fcodelineno-4-1)-keep class io.capawesome.capacitorjs.plugins.** { *; }
`

### iOS[¶](#ios "Permanent link")

#### Privacy Descriptions[¶](#privacy-descriptions "Permanent link")

Add the `NSMotionUsageDescription` key to the `ios/App/App/Info.plist` file, which tells the user why your app needs access to the user's contacts:

`[](#%5F%5Fcodelineno-5-1)<key>NSMotionUsageDescription</key>
[](#%5F%5Fcodelineno-5-2)<string>The app needs to access the motion activity.</string>
`

## Usage[¶](#usage "Permanent link")

`[](#%5F%5Fcodelineno-6-1)import { Pedometer } from '@capawesome-team/capacitor-pedometer';
[](#%5F%5Fcodelineno-6-2)
[](#%5F%5Fcodelineno-6-3)const getMeasurement = async () => {
[](#%5F%5Fcodelineno-6-4)  const { measurement } = await Pedometer.getMeasurement();
[](#%5F%5Fcodelineno-6-5)  console.log(measurement);
[](#%5F%5Fcodelineno-6-6)};
[](#%5F%5Fcodelineno-6-7)
[](#%5F%5Fcodelineno-6-8)const isAvailable = async () => {
[](#%5F%5Fcodelineno-6-9)  const { cadence, distance, floorCounting, pace, stepCounting } = await Pedometer.isAvailable();
[](#%5F%5Fcodelineno-6-10)  console.log('Cadence available:', cadence);
[](#%5F%5Fcodelineno-6-11)  console.log('Distance available:', distance);
[](#%5F%5Fcodelineno-6-12)  console.log('Floor counting available:', floorCounting);
[](#%5F%5Fcodelineno-6-13)  console.log('Pace available:', pace);
[](#%5F%5Fcodelineno-6-14)  console.log('Step counting available:', stepCounting);
[](#%5F%5Fcodelineno-6-15)};
[](#%5F%5Fcodelineno-6-16)
[](#%5F%5Fcodelineno-6-17)const startMeasurementUpdates = async () => {
[](#%5F%5Fcodelineno-6-18)  Pedometer.addListener('measurement', (event) => {
[](#%5F%5Fcodelineno-6-19)    console.log('New measurement:', event);
[](#%5F%5Fcodelineno-6-20)  });
[](#%5F%5Fcodelineno-6-21)  await Pedometer.startMeasurementUpdates();
[](#%5F%5Fcodelineno-6-22)};
[](#%5F%5Fcodelineno-6-23)
[](#%5F%5Fcodelineno-6-24)const stopMeasurementUpdates = async () => {
[](#%5F%5Fcodelineno-6-25)  await Pedometer.stopMeasurementUpdates();
[](#%5F%5Fcodelineno-6-26)};
[](#%5F%5Fcodelineno-6-27)
[](#%5F%5Fcodelineno-6-28)const checkPermissions = async () => {
[](#%5F%5Fcodelineno-6-29)  const status = await Pedometer.checkPermissions();
[](#%5F%5Fcodelineno-6-30)  console.log('Permission status:', status);
[](#%5F%5Fcodelineno-6-31)};
[](#%5F%5Fcodelineno-6-32)
[](#%5F%5Fcodelineno-6-33)const requestPermissions = async () => {
[](#%5F%5Fcodelineno-6-34)  const status = await Pedometer.requestPermissions();
[](#%5F%5Fcodelineno-6-35)  console.log('Permission status after request:', status);
[](#%5F%5Fcodelineno-6-36)};
`

## API[¶](#api "Permanent link")

* [getMeasurement(...)](#getmeasurement)
* [isAvailable()](#isavailable)
* [startMeasurementUpdates()](#startmeasurementupdates)
* [stopMeasurementUpdates()](#stopmeasurementupdates)
* [checkPermissions()](#checkpermissions)
* [requestPermissions()](#requestpermissions)
* [addListener('measurement', ...)](#addlistenermeasurement-)
* [removeAllListeners()](#removealllisteners)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)

### getMeasurement(...)[¶](#getmeasurement "Permanent link")

`[](#%5F%5Fcodelineno-7-1)getMeasurement(options?: GetMeasurementOptions | undefined) => Promise<GetMeasurementResult>
`

Retrieve the pedometer data (for a specific time range).

Only available on Android and iOS.

| Param       | Type                                            |
| ----------- | ----------------------------------------------- |
| **options** | [GetMeasurementOptions](#getmeasurementoptions) |

**Returns:** `Promise<[Measurement](#measurement)>`

**Since:** 7.0.0

---

### isAvailable()[¶](#isavailable "Permanent link")

`[](#%5F%5Fcodelineno-8-1)isAvailable() => Promise<IsAvailableResult>
`

Check which features are available on the device.

**Returns:** `Promise<[IsAvailableResult](#isavailableresult)>`

**Since:** 7.0.0

---

### startMeasurementUpdates()[¶](#startmeasurementupdates "Permanent link")

`[](#%5F%5Fcodelineno-9-1)startMeasurementUpdates() => Promise<void>
`

Start receiving updates for the pedometer data.

Only available on Android and iOS.

**Since:** 7.0.0

---

### stopMeasurementUpdates()[¶](#stopmeasurementupdates "Permanent link")

`[](#%5F%5Fcodelineno-10-1)stopMeasurementUpdates() => Promise<void>
`

Stop receiving updates for the pedometer data.

Only available on Android and iOS.

**Since:** 7.0.0

---

### checkPermissions()[¶](#checkpermissions "Permanent link")

`[](#%5F%5Fcodelineno-11-1)checkPermissions() => Promise<PermissionStatus>
`

Check permissions for the plugin.

**Returns:** `Promise<[PermissionStatus](#permissionstatus)>`

**Since:** 7.0.0

---

### requestPermissions()[¶](#requestpermissions "Permanent link")

`[](#%5F%5Fcodelineno-12-1)requestPermissions() => Promise<PermissionStatus>
`

Request permissions for the plugin.

**Returns:** `Promise<[PermissionStatus](#permissionstatus)>`

**Since:** 7.0.0

---

### addListener('measurement', ...)[¶](#addlistenermeasurement "Permanent link")

`[](#%5F%5Fcodelineno-13-1)addListener(eventName: 'measurement', listenerFunc: (event: MeasurementEvent) => void) => Promise<PluginListenerHandle>
`

Called when the pedometer data is updated.

When the app is suspended, the delivery of updates stops temporarily. When the app is resumed, the updates will continue from where they left off.

**Note:** The `startMeasurementUpdates` method must be called before this event can be received.

Only available on Android and iOS.

| Param            | Type                                         |
| ---------------- | -------------------------------------------- |
| **eventName**    | 'measurement'                                |
| **listenerFunc** | (event: [Measurement](#measurement)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 6.0.0

---

### removeAllListeners()[¶](#removealllisteners "Permanent link")

`[](#%5F%5Fcodelineno-14-1)removeAllListeners() => Promise<void>
`

Remove all listeners for this plugin.

**Since:** 7.0.0

---

### Interfaces[¶](#interfaces "Permanent link")

#### Measurement[¶](#measurement "Permanent link")

| Prop                  | Type   | Description                                                                             | Since |
| --------------------- | ------ | --------------------------------------------------------------------------------------- | ----- |
| **averageActivePace** | number | The average pace of the user, measured in seconds per meter. Only available on iOS.     | 7.0.0 |
| **currentCadence**    | number | The rate at which steps are taken, measured in steps per second. Only available on iOS. | 7.0.0 |
| **currentPace**       | number | The current pace of the user, measured in seconds per meter. Only available on iOS.     | 7.0.0 |
| **distance**          | number | The estimated distance traveled by the user, measured in meters. Only available on iOS. | 7.0.0 |
| **end**               | number | The end date of the data in milliseconds since epoch.                                   | 7.0.0 |
| **floorsAscended**    | number | The number of floors ascended by the user. Only available on iOS.                       | 7.0.0 |
| **floorsDescended**   | number | The number of floors descended by the user. Only available on iOS.                      | 7.0.0 |
| **numberOfSteps**     | number | The number of steps taken by the user.                                                  | 7.0.0 |
| **start**             | number | The start date of the data in milliseconds since epoch.                                 | 7.0.0 |

#### GetMeasurementOptions[¶](#getmeasurementoptions "Permanent link")

| Prop      | Type   | Description                                                                                                                                                                                   | Since |
| --------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **end**   | number | The end date for the query in milliseconds since epoch. On **iOS**, this option must be provided. Only available on iOS.                                                                      | 7.0.0 |
| **start** | number | The start date for the query in milliseconds since epoch. On **Android**, this is always set to the boot time of the device. On **iOS**, this option must be provided. Only available on iOS. | 7.0.0 |

#### IsAvailableResult[¶](#isavailableresult "Permanent link")

| Prop              | Type    | Description                                                                                                                                      | Since |
| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----- |
| **cadence**       | boolean | Indicates whether cadence tracking is available on the device. On **Android**, this is always false because cadence tracking is not supported.   | 7.0.0 |
| **distance**      | boolean | Indicates whether distance tracking is available on the device. On **Android**, this is always false because distance tracking is not supported. | 7.0.0 |
| **floorCounting** | boolean | Indicates whether floor counting is available on the device. On **Android**, this is always false because floor counting is not supported.       | 7.0.0 |
| **pace**          | boolean | Indicates whether pace tracking is available on the device. On **Android**, this is always false because pace tracking is not supported.         | 7.0.0 |
| **stepCounting**  | boolean | Indicates whether step counting is available on the device.                                                                                      | 7.0.0 |

#### PermissionStatus[¶](#permissionstatus "Permanent link")

| Prop                    | Type                                | Description                                                | Since |
| ----------------------- | ----------------------------------- | ---------------------------------------------------------- | ----- |
| **activityRecognition** | [PermissionState](#permissionstate) | The permission state for the activity recognition feature. | 7.0.0 |

#### PluginListenerHandle[¶](#pluginlistenerhandle "Permanent link")

| Prop       | Type                |
| ---------- | ------------------- |
| **remove** | () => Promise<void> |

### Type Aliases[¶](#type-aliases "Permanent link")

#### GetMeasurementResult[¶](#getmeasurementresult "Permanent link")

`[Measurement](#measurement)`

#### PermissionState[¶](#permissionstate "Permanent link")

`'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'`

#### MeasurementEvent[¶](#measurementevent "Permanent link")

`[Measurement](#measurement)`

## Changelog[¶](#changelog "Permanent link")

See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/pedometer/CHANGELOG.md).

## Breaking Changes[¶](#breaking-changes "Permanent link")

See [BREAKING.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/pedometer/BREAKING.md).

## License[¶](#license "Permanent link")

See [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/pedometer/LICENSE).

May 17, 2026 

 Back to top 