Issues with step counting API

I would like to play WalkScape, a game where you progress by walking in the real world. To get an idea of whether it would work I tried a couple of free step counting apps [1][2]. While the counting itself seems to work fairly reliably, there seems to be a serious limitation: the phone’s screen must be turned on for any steps to be counted. As soon as I press the power button to turn of the screen, counting stops. The app must also be running, but it can be in the background so that’s much less of an issue. Is there anything I can do to make it count all steps, even while the phone is in my pocket with screen off?

My device is a Sony Xperia 10 III, currently running Sailfish OS 5.0.0.72.

[1] https://play.google.com/store/apps/details?id=pedometer.steptracker.calorieburner.stepcounter

[2] https://play.google.com/store/apps/details?id=com.tayu.tau.pedometer&hl=en-US

1 Like

Both mentioned apps are Android based. Have you tried the native Pedometer app? Maybe the sleep mode limitations for Android apps are different.

Where can I find the native pedometer app? Searching for “pedometer” or “step counter” on the Jolla store turns up no relevant results, nor does searching for “sailfish pedometer” or “sailfish step counter” on DuckDuckGo.

The native app working unfortunately won’t help with my desire to play an Android game using step counting, but it’s still a useful debugging step to narrow down the cause of the issue.

Pedometer is available on Openrepos which has an unofficial store app named Storeman. Information on how to enable installation of unofficial software, and how to install and use Storeman (and maybe Chum as another source of apps) should be available on this forum.

Thanks, found it. I had Storeman and Chum already on my phone, but since there’s no unified search interface it can be annoying to look for a particular app.

This native app does seem to register steps while the phone’s screen is off, but it doesn’t really work if I hold the phone in my hand. The Android apps had no trouble in that situation, as long as the screen was on. My understanding is that there should be an API that allows applications to query how many steps were taken since the last query, regardless of whether the app was running or not. One of the apps asked for permission to access physical activity, which to me seems like it should be using this dedicated API instead of generic accelerometer sensor.