1

I am new to android and working on an application like pedometer. I have calculated total steps using Step Count Sensor , Now I want to calculate total time and calories burnt. Step count sensor give two methods onSensorChanged and onAccuracyChanged . In method onSensorChanged i have incremented a variable count++ that gives total Number of steps. Now how to calculate time that how much time user has walked. And if user stopped then time should also be stopped. Please help me out.

  • I am using android studio,.. Its is to calculate steps using TYPE COUNTER SENSOR but you can take help from this link... https://medium.com/@ssaurel/create-a-step-counter-fitness-app-for-android-with-kotlin-bbfb6ffe3ea7 – paramjeet singh Oct 28 '19 at 12:08
  • i have implemented that But How to calculate total walk Time (Active time) by using this sensor. or any other logic. – paramjeet singh Nov 19 '19 at 20:24

0 Answers0