Pedometer counting issue

Hello everyone
I am working on fitness related app and I want to add steps count feature
I tried Pedometer component but it’s not correct, I mean if I put my phone inside pocket and take it takeout
steps increase+3 even an idle phone with little shake leads to count a step
how to deal with this ?

@Deathking that could be due to the hardware not the software

my phone is Realme 3 pro and there is preinstalled step counter in app vault which is more accurate

@Deathking did you checked the same app on anyother device? and if possible then share the demo aia which gives the same problem