-
Notifications
You must be signed in to change notification settings - Fork 7
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
Background task is not working probably #14
Comments
Hey, since the latest commit background task has completed stopped working for me. I've used the original code, no modifications. Behavior is the same, making fake move is called multiple times and no new background task is registered. |
On further investigation it appears to be a timing problem. The multiple calls of Making Fake Move is due to the shortened threshold of remainingTime. Changing the threshold to 5-10 fixes the multiple making fake moves calls, but the task dies afterwards. Putting it at 15 makes it work most of the times, but not always, same for 20. It appears that if the phone does not move at all before background task starts, the restart of the task fails. |
Just to add some additional background info: Increasing the threshold to trigger the fakeMove earlier will hence decrease power efficiency. |
Thank you for elaborating! |
Yes, that's definitely the first thing to investigate. Maybe I'll find time to look into it at the weekend, but I can't promise ;) |
Sounds awesome! |
Describe the bug
Sometimes the background task doesn't behave like it should.
If the unexpected behavior occurs, the task is dead. Launching the app is needed for it to work probably again. It happens when "Making Fake Move" is performed multiple times instead of only once.
If the expected behavior occurs, it makes a fake move and restarts the background task.
Unexpected behavior
Background task registered
Background task ended.
Making Fake Move.
Making Fake Move.
Making Fake Move.
Room Buero, Likelihood 90.4
Making Fake Move.
OR
Background task registered
Background task ended.
Making Fake Move.
Making Fake Move.
Making Fake Move.
Room Buero, Likelihood 99.6
Making Fake Move.
Making Fake Move.
Room Buero, Likelihood 99.6
Expected behavior
Background task registered
Background task ended.
Making Fake Move.
Room Buero, Likelihood 97.2
Background task registered
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: