Hacker News new | past | comments | ask | show | jobs | submit login

So how do you propose to write a sleep tracking app that doesn't run a background process for longer than 20 minutes?



I have a Xiaomi and oneplus phone, neither of them have ever closed a background app so I dunno what you are talking about, but if phones are doing that then, yea fair enough thats a problem.

The wording in the linked website is talking more specifically about cpu limits, which is how most os manage background resources, whats the problem with that?

Sleep tracking is a good example you should use an event system, but developers are lazy and use "while (true) {}", which is my point.


Are fitness tracking apps able to run uninterrupted in your Xiaomi phone? Did you change any relevant settings?


I had a huwaii fit-bit-thing for a few months it uses two apps and I had issues getting them to talk to other software, but no problems tracking or shutting down, didn't change any settings. Maybe other apps have problems but theirs worked fine.


In a way that it has to be explicitly allowed to do so by the user.

I don't need an online store app to eat up my phone's battery, and disabling background by default seems to be only option here.


That’s a solved problem on iOS. iOS itself keeps track of measurements coming from your device even when it’s sleep using the power efficient Mx chip. Applications can then - with user permissions - request the data when needed. This has been the case since 2013.

The app doesn’t need to be running in the background.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: