Cordova plugin for using device's stepcounter on Android (API > 19)

Use to

  • start and stop stepcounter service
  • read device's stepcounter data


ionic cordova plugin add cordova-plugin-stepcounternpm install @ionic-native/stepcounter
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEYnpm install @ionic-enterprise/stepcounter

Supported Platforms

  • Android


import { Stepcounter } from '@ionic-native/stepcounter/ngx';

constructor(private stepcounter: Stepcounter) { }


let startingOffset = 0;
this.stepcounter.start(startingOffset).then(onSuccess => console.log('stepcounter-start success', onSuccess), onFailure => console.log('stepcounter-start error', onFailure));

this.stepcounter.getHistory().then(historyObj => console.log('stepcounter-history success', historyObj), onFailure => console.log('stepcounter-history error', onFailure));