julien-nc / phonetrack

Nextcloud app to create tracking sessions to display phones position in real time and export activity to gpx.
GNU Affero General Public License v3.0
58 stars 6 forks source link

No GPS connection - GrapheneOS #35

Open ernoj opened 6 months ago

ernoj commented 6 months ago

Operating system: GrapheneOS Phonetrack: v0.1.0

Since yesterday, my phone no longer uploads new waypoints. When I flip the switch to enable the log, nothing happens. No green GPS indicator in the top right indicating that the app is searching for the position.

What can I do?

xelayz commented 6 months ago

Try disabling the "Significant motion" option. On my Pixel 5 with Android 14 (GOS) it worked fine with the option enabled, but on my Pixel 8 with Android 14 (GOS) it was not. Also, the battery optimization in Android has changed on my phone. I can easily enable and disable whether the app should run in the background or not. But I can only access the old battery optimization settings via a direct link in my Mail app (FairEmail). I disabled optimization for PhoneTrack because it was enabled by default. This solved all issues for me and now it is working with with perfect battery usage.

domai-tb commented 6 months ago

It seems like an issue with Android 14 QPR2 and the PhoneTrack Android app itself and should not related to the Nextcloud plugin. However, what worked for me was the following:

  1. Go to App info > App battery usage > Hold / Long press Allow background usage > Unrestricted
  2. Inside the possition log settings > Disable Significant motion mode

Note that these steps have a noticeable impact on battery life. I also disabled the setting to pause app activity if unused, but this should have no influence on this issue.

xelayz commented 6 months ago

It seems like an issue with Android 14 QPR2 and the PhoneTrack Android app itself and should not related to the Nextcloud plugin. However, what worked for me was the following:

  1. Go to App info > App battery usage > Hold / Long press Allow background usage > Unrestricted
  2. Inside the possition log settings > Disable Significant motion mode

Note that these steps have a noticeable impact on battery life. I also disabled the setting to pause app activity if unused, but this should have no influence on this issue.

Of course background usage should be enabled if you want to track your location in the background. And the long press action is not working on my phone with Android 14 and GOS. What do you mean with this?

And I already mentioned the "Significant motion mode". But battery usage is still fine for me. It depends on your settings and usecase. Normal tracking is still fine. Like 30 seconds delay, 25m and timeout of 10.

domai-tb commented 6 months ago

I just figured out that a long press is not required, just tap the option. On GrapheneOS Android 14 build 2024032100 it should look like like this: Screenshot

But sadly this seems to be a good work around (for me). The app wasn't sending or requesting any location data since this morning. 😞

But battery usage is still fine for me. It depends on your settings and usecase. Normal tracking is still fine. Like 30 seconds delay, 25m and timeout of 10.

I'm usally track my phone location 24/7 so the impact on battery is a huge negativ side effect. In significant motion mode, the battery consumption was around ~1% between full charges. With your settings it is about ~19% on my phone. Yesterday I tried to disable location timeout, set the minimum distance to 5m and the minimum time to 5 seconds and the battery consumption was around 46% - also sending location data worked as expected.

xelayz commented 6 months ago

Screenshot_20240327-132000.png

Strange. I do not have this option. But I can access a hidden setting with a direct link to it where I can change it to unrestricted. I also have build 2024032100.

But I don't understand why the significant motion mode is not working anymore... I mean for me its still okay without it, but your battery usage is insane. And on Gitlab they only talk about the background usage. But I don't have any problem with this. Just the significant motion mode.

domai-tb commented 6 months ago

Yeah, if you tap on the text of the background usage option, than you should be able to enter the "hidden" menu. I also do not understand what changed with the last update and didn't have time to investigate by myself. Hopefully the maintainer can fix this issue in the next days / weeks.

NablaMetal commented 5 months ago

Same here also on GrapheneOS 2024040300 Disabling significant motion mode does not help (except increasing battery usage). Battery optimization is set to off. I have 1 or 2 points that successfully log but don't know why. I also use it to track my phone 24/7.

domai-tb commented 5 months ago

@NablaMetal I switched to uLogger where I havn't any problem.

NablaMetal commented 5 months ago

Can't get µLogger to work right now. I don't find much documentation about using it along with the phone track app from the nextcloud server. Also I'm using 2FA and I don't think I can't connect directly to the nextcloud server with the µLogger client. Do I need to setup the µLogger server as well, and then bridge it to nextcloud ? Too bad the Phonetrack android client stopped working, it was fine since then.

domai-tb commented 5 months ago

I'm also using 2Fa at my nextcloud instance, but that isn't a problem. You can setup a new track or view your current track within the Nextcloud PhoneTrack web app. The share button (third button from left) of the track's session will display multiple tracking URLs. The URL fo ULogger should look like <you nextcloud url>/index.php/apps/phonetrack/log/ulogger/<session Id>/<device name>.

NablaMetal commented 5 months ago

I'm also using 2Fa at my nextcloud instance, but that isn't a problem. You can setup a new track or view your current track within the Nextcloud PhoneTrack web app. The share button (third button from left) of the track's session will display multiple tracking URLs. The URL fo ULogger should look like <you nextcloud url>/index.php/apps/phonetrack/log/ulogger/<session Id>/<device name>.

Thank you very much! Seems like it does work now :)

ernoj commented 5 months ago

I'm also using 2Fa at my nextcloud instance, but that isn't a problem. You can setup a new track or view your current track within the Nextcloud PhoneTrack web app. The share button (third button from left) of the track's session will display multiple tracking URLs. The URL fo ULogger should look like <you nextcloud url>/index.php/apps/phonetrack/log/ulogger/<session Id>/<device name>.

Thank you for your information. I have tried to use ulogger. Even if I activate tracking, there is no GPS to be found. I also can't enable logging via GPS and network in settings. I need to enter my Nexcloud credentials and the logger link, correct?

NablaMetal commented 5 months ago

I'm also using 2Fa at my nextcloud instance, but that isn't a problem. You can setup a new track or view your current track within the Nextcloud PhoneTrack web app. The share button (third button from left) of the track's session will display multiple tracking URLs. The URL fo ULogger should look like <you nextcloud url>/index.php/apps/phonetrack/log/ulogger/<session Id>/<device name>.

Thank you for your information. I have tried to use ulogger. Even if I activate tracking, there is no GPS to be found. I also can't enable logging via GPS and network in settings. I need to enter my Nexcloud credentials and the logger link, correct?

No you don't need to put your Nextcloud credentials. Take a look at the µlogger section in the documentation.

My personal tip: I keep both phonetrack and µlogger apps activated to force the GPS to be always on (which you can't do with µlogger alone). This way I have much more accuracy, which is something important to me.

ernoj commented 5 months ago

Thank you. My problem is that the app doesn't start searching for GPS at all. When toggling the tracking button the noting happens

NablaMetal commented 5 months ago

This is odd. Did you check the app permissions and the toggle "remove permissions if app is unused" ? Also are you outside when testing ? ulogger uses GPS only (no localization with bluetooth grid, wifi or cellphone network) wich mean the signal is accurate but is kind of weak, works well outside but not inside at all. I have a green dot poping on the upper right corner of my screen to indicate the gps is currently in use (even if it does not log points due to accuracy rules).