this post was submitted on 30 Dec 2024
594 points (98.7% liked)
Games
33052 readers
512 users here now
Welcome to the largest gaming community on Lemmy! Discussion for all kinds of games. Video games, tabletop games, card games etc.
Weekly Threads:
Rules:
-
Submissions have to be related to games
-
No bigotry or harassment, be civil
-
No excessive self-promotion
-
Stay on-topic; no memes, funny videos, giveaways, reposts, or low-effort posts
-
Mark Spoilers and NSFW
-
No linking to piracy
More information about the community rules can be found here.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
From my understanding, any app installed directly from Google Play should be in the sandbox and have access to Google Play Services. I haven't quite worked out where the steps are missing, but it seems when the game is open it's fine, and when the game hasn't been killed by the OS it's also fine. If I go back to the game and it has to launch again from scratch, it doesn't seem to count steps that happened while the game wasn't running (foreground or background).
I also see this post where others are seeing the same thing, and are not using GrapheneOS. Maybe my use of GrapheneOS is a red herring and there's actually something else happening.
It was always odd to me that apps need to be constantly active to get the steps. I don't get why the phone doesn't just count in the background then allow you to request "how many steps today" or "how many steps since X date/time" via the API.
The game doesn't need to be active on regular Android and counts steps when killed. I'm pretty sure the reason why it's like that on GrapheneOS is that when the game is killed, the sandbox is killed and the Google Play Services shut down. If Google Play Services aren't on there, the Recording API will not count steps in the background.
Probably easiest solution is to let WalkScape to run in the background, when it's freezed the battery consumption should be basically nothing.
That makes a lot of sense.
It's allowed to run in the background, but I have now disabled battery optimisation and will see if that helps.
Yeah - battery optimization has tendency to kill apps, even if they're not consuming resources. If you're experiencing battery drain from doing this (or if it works fine), I'd appreciate if you send me your findings to our contact email address ❤️
It doesn't seem to be helping. If I ever work out a more reliable way to get steps counted I'll let you know. I know some pedometer apps don't need Google Play Services and use a persistant notification to keep it active, but it seems like quite a significant change from what you currently have which wouldn't be worth spending time on to appease such a small group of users.
Before Google released the Recording API, that's what we used. But it was a huge time sink - with the amount of Android devices and operating systems, there were a ton of device specific issues which were impossible for me to reproduce without buying the models that had these, and we don't have budget for such.
Pixel devices tended to have battery consumption issues with it, and Chinede devices with battery optimization were killing it very often etc.
If you find some way, I would love to hear about it. In the future we'll be adding in smart watch support, which could help you to count the steps if you have one.
Edit: also one thing to try out if possible is to remove battery optimization from Google Play Services. Your device might be killing that, which stops counting the steps.
Yeah I can imagine trying to do it manually could get pretty tricky. I'll look forward to the smart watch support (though I don't own one, I might get one if others report it working well with GrapheneOS).
It seems it's already set to not be optimized. It doesn't seem to have access to the physical activity permission, but granting that permission didn't seem to help. It still doesn't count steps with the screen off.
No matter, thanks for all the ideas, I'll just keep watching and see if others find a solution. I've subscribed to the Walkscape community so hopefully you'll be posting updates there 🙂