Hello sir good day, we are actually doing research on this functionality (pedometer capture for both android and iOS through cordova plugin) I already tried the Pedometer forge component and what its doing is simply plugging in the leecrossley cordova pedometer plugin (which you can find here: https://github.com/leecrossley/cordova-plugin-pedometer) unfortunately I couldn't make it to work as its having problem on the listener part this line specifically:
if (this.sensorManager.registerListener(this, this.mSensor, SensorManager.SENSOR_DELAY_UI))
{
this.setStatus(PedoListener.STARTING);
}
else
{
this.setStatus(PedoListener.ERROR_FAILED_TO_START);
this.fail(PedoListener.ERROR_FAILED_TO_START, "Device sensor returned an error.");
return;
};
Im finding that the registerListener would always return false (meaning the code failed to listen to the sensor). I've already forked my own custom code for it with all the possible android permissions via cordova on my personal repository (https://github.com/jhaybz29/cordova-plugin-pedometer) however it still doing the same error as the leecrossley one. Would you kindly share to us what was the solution you guys did for your Human Activity Tracking app? Your advice and help will be greatly appreciated.