Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

look into using WAKE lock rather than keepawake #84

Open
shaunmulligan opened this issue Apr 13, 2023 · 4 comments
Open

look into using WAKE lock rather than keepawake #84

shaunmulligan opened this issue Apr 13, 2023 · 4 comments

Comments

@shaunmulligan
Copy link
Member

After doing some basic power testing, I think having the screen always on is gonna impact battery pretty heavily. We should look at something like https://www.npmjs.com/package/react-native-wake-lock as holding the wake lock allows an app to keep using the CPU even when the screen is switched of or sleeps. We could then allow the user to be more agressive with their screen sleep time setting to save battery.

@craigmulligan
Copy link
Collaborator

Yip! Another option is to run all our services in a background fetch event. https://docs.expo.dev/versions/latest/sdk/background-fetch/

@shaunmulligan
Copy link
Member Author

Interesting! Haven’t seen that api, wonder if Bluetooth sensors would work from there? I thought there were some timing limits for background tasks

@craigmulligan
Copy link
Collaborator

Yeah, I'm not sure. Everything say it allows a "short" period of interactivity.

@shaunmulligan
Copy link
Member Author

yeah at some point we can just do some experiments and see what kinda power usage we get with each option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants