Help me please for me

sports tracker problem. if I put my phone in my pocket the screen turns off or the camera comes on. if I notice it and reactivate the app, time passes while the km is stopped and I have to close and restart everything… is there a sound warning with the screen off or camera open?? I’m waiting for news, regards

What device do you use?
Please try changing GPS/Location permission to “Always allow”.
Application should work with permission “Allow only while using application” but some devices/manufacturers use so strong battery optimizations that when you perform actions mentioned above (+ minimizing app) they think that you no longer use application and revoke (location) permission while according to Android documentation they should not as application runs as foreground service with active notification,

I have Xiaomi redminote 10 and MIUI 14.0.6 capacity battery 5000 mA … geolocation api. .
Caynax sports tracker version 3.7.2