Android Question Count steps with sensor


New Member
Hi there

I am referring to this post:, and the lines

AddSensor(18, "TYPE_STEP_DETECTOR", False)
AddSensor(19, "TYPE_STEP_COUNTER", False)

Sorry to come back on such an old topic but when I execute this code on Redmi11 I get a fixed value of 98.508 and despite my moves.
(and TYPE_STEP_DETECTOR appears with value 1 when I start moving)

What is wrong here please ?

Only Targetsdkversion=28 displays those 2 values. Higher version says "not supported". So another question is how to count steps with version 33 ?

Thanks in advance