title: Can step counter be used for api level less than 19 in android?
body: <p>I've been trying to build a step counter for my own use. I tried this code, </p>
  
  <pre><code>Sensor countSensor = sensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER);
  if (countSensor !=null
  {
      sensorManager.registerListener(this,CountSensor,SensorManager.SENSOR_DELAY_UI);
  } else {
      Toast.makeText(this,"Count Sensor not Availabe in this device !!",Toast.LENGTH_LONG).show();
  }
  </code></pre>
  
  <p>but, I did not get a positive output. It says that I have lower API than 19. How can I get things working for lower APIs?</p>