📅  最后修改于: 2022-03-11 14:52:19.289000             🧑  作者: Mango
By implementing SensorEventListener listener within a class and overriding the two methods onSensorChanged and onAccuracyChanged you can start tracking steps. public class StepActivity extends Activity implements SensorEventListener{ SensorManager sensorManager = (SensorManager) getSystemService(Context.