Cordova Plugin Pedometers

2019-09-15 22:36发布

I try to put this plugin on my Android app https://github.com/leecrossley/cordova-plugin-pedometer

I put this on my OnDeviceReady :

var successHandler = function (pedometerData) {

alert(pedometerData.numberOfSteps);

};
pedometer.startPedometerUpdates(successHandler, onError);

I tried several code but it doesnt work,

Someone has a solution please

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-09-15 23:02

check that plugin is properly installed with :

cordova plugin list

If you do not see it in the list, run:

cordova plugin add cordova-plugin-pedometer
查看更多
登录 后发表回答