Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

give user an info that the screen must not be locked while recording #47

Open
Danfro opened this issue Feb 14, 2023 · 6 comments
Open

Comments

@Danfro
Copy link

Danfro commented Feb 14, 2023

For the app to work, it either needs to have the screen turned on all the time (no screen locking!) or background suspension needs to be enabled. I can not find any in-app info for the user about this. Only one short line in the README.

There should be a info dialog maybe (first run? or every time when recording?) or some other way to make the user aware of this.

@mymike00
Copy link
Collaborator

mymike00 commented Feb 14, 2023

Yeah, that definitely needs to be added. Also, I'm not sure that background suspension is enough because iirc if there is no foreground app that asks for position the gps service goes to sleep, and activity tracker will be active in background but without receiving new positions...
There was some work from mardy to keep the gps service awake if there is something listening to its events. But that also would keep awaken the listener, which in our case would be perfect but could keep awaken morph too if a website was requesting position, and that is not usually desirable...

@Danfro
Copy link
Author

Danfro commented Feb 14, 2023

Hmm, not 100% sure if that worked with background suspension. I would need to try that on my xenial device. Since there is no UTTT for focal yet, I don't know how to do that there. But we need to check that before adding info.

But certainly it would be better to get a proper fix for this, although I have no idea how to do that.

@mymike00
Copy link
Collaborator

I think you could try to play with gsettings to prevent app background suspension, at least that seems what uttt is doing

Danfro added a commit to Danfro/ActivityTracker that referenced this issue May 5, 2023
@Danfro
Copy link
Author

Danfro commented May 10, 2023

Btw. the commit reference here is wrong because I had a typo in there first. Although I corrected the commit message, this reference here stays for some reason.

@Danfro
Copy link
Author

Danfro commented May 10, 2023

I did not test yet again on focal if prevent suspension is enough. I wasn't outside recently, but already got that set up.

Until UTTT is available for focal, we can prevent background suspension like this:

  1. get all apps listed for background suspension with

gsettings get com.canonical.qtmir lifecycle-exempt-appids

  1. add activity tracker to that list and set it with

gsettings set com.canonical.qtmir lifecycle-exempt-appids "['com.ubuntu.music', 'activitytracker.cwayne18']"

Also not sure if a systemd service might help us on focal. I don't know enough about that yet.

@mymike00
Copy link
Collaborator

Yeah, I think the service could be a better solution but might not be enough, it would still encounter the same issues I mentioned before, just like the app

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

No branches or pull requests

2 participants