title: Step counter in Android
body: <p>Recently I tried to make an app which gives user step count. And came across step count and detector which was introduced in Android 4.4. but I can't find a way to do step counting hourly basis. I am new to this any guidance will be highly appreciated</p>
  
  <p>I found on this <a href="https://developer.android.com/reference/android/hardware/SensorManager.html#registerListener(android.hardware.SensorEventListener" rel="nofollow">https://developer.android.com/reference/android/hardware/SensorManager.html#registerListener(android.hardware.SensorEventListener</a>, android.hardware.Sensor, int)</p>
  
  <p>That editing the third parameter I can specify delay while doing following
     boolean registerListener (SensorEventListener listener,                Sensor sensor,                int samplingPeriodUs)</p>
  
  <p>But it accepts value in milliseconds and convert one hour into milliseconds gives a very large int value. Can anyone guide on how to deal with it</p>