bilde2910 / Hauk

Open-source realtime location sharing
Apache License 2.0
584 stars 58 forks source link

Feature request: Long term low resolution location sharing #130

Open mcarbs opened 4 years ago

mcarbs commented 4 years ago

I'm not sure if this feature is appropriate for Hauk, but I would be interested into doing something similar to the Google Maps location sharing between my family and I.

This would involve a long term (open ended) sharing of my location, but I don't require a high frequency of updates, even an update once per hour would be fine in most cases or when Android allows the app to wake up to report the current location similar to how Google Maps does.

This could be coupled with the ability to request an update to the persons location (where are my kids right now), if the app is able to receive such a request due to Android power saving and the like.

In this case I don't believe the location history would be relevant, but just where are they now type feature.

Just an idea, as I mentioned not sure if this is appropriate so feel free to delete this issue.

Screwitfix commented 4 years ago

Hi, the file /etc/hauk/config.php has a section "max_duration" => 86400, (equal to 24hours) I changed this to "max_duration" => 31536000, (equal to 365 days) Now I can generate links for my family that are "long term". You can also control the update interval by changing "min_interval" value. I hope this helps

protist commented 4 years ago

Thanks @Screwitfix. That sounds useful, but the important part that is missing for me too is "the ability to request an update to the persons location".

quinnsam commented 4 years ago

@Screwitfix

Hi, the file /etc/hauk/config.php has a section "max_duration" => 86400, (equal to 24hours) I changed this to "max_duration" => 31536000, (equal to 365 days) Now I can generate links for my family that are "long term". You can also control the update interval by changing "min_interval" value. I hope this helps

This is a good step in the right direction but don't the users still have to remember to login to the application and click resume in the case of a phone restart or what not? I am thinking for my family they would probably forget to do this.

licaon-kter commented 4 years ago

There's a start on BOOT intent thing that could manage that.

bilde2910 commented 4 years ago

Thanks everyone for your feedback on this, sorry for not getting back to you earlier on this issue. I've been trying to figure out how to make a good response to this.

Hauk was made with the purpose of being an open-source replacement for Glympse, Google Maps and Telegram location sharing, etc. I.e. these were made to be temporary shares useful for meeting up at specific places and tracking how far away people are from each other. This is also reflected in the dependencies; usage of Memcached was intentional over a proper RDBMS like MariaDB or PostgreSQL, as Memcached is meant for short term storage (caching) of data.

The reason I have been somewhat reluctant to add in long term sharing in general is because there is already another open source platform that seems to be more geared towards this purpose, and that is OwnTracks. If I am to implement this kind of feature in Hauk, I would need to know what would make OwnTracks inadequate for your use. Have any of you given OwnTracks a try in this regard?

mcarbs commented 4 years ago

Thank you for responding, completely understand your position and it makes total sense.

For my person use case, I don't want historic location information, just the "where are they now" information, which would be fine using memcache or similar. I've not seen OwnTracks before, but I will certainly have a look, although I liked the fact that Hauk uses a php backend rather than a binary daemon. Maybe it will be a solution if I can get it to compile.

protist commented 4 years ago

Thanks @bilde2910. I previously installed OwnTracks and tested it. Unfortunately the main problem for me was that the infrastructure could not allow any manual request to update a person's location.

One other major problem to me was that users' locations are not updated if they are stationary. Hence, if they have an old timestamp, it is unclear if they had been in the same position for a while, or if they had moved on and for some reason the client had not updated their position. I'd prefer it if OwnTracks' timestamp were constantly updated, even with no movement, but as a workaround a manual update would have sufficed.

natrius commented 4 years ago

I'm with bilde2910 here. And for the missing feature, you could open an issue directly there, @protist https://github.com/owntracks/android for example.

protist commented 4 years ago

@natrius You mean like the issue I linked in my original comment? 😁

natrius commented 4 years ago

Yes, but i did not see an issue about the second problem you mentioned (and, tbh, i completely missed it was your issue as well :p ). And why not just assume everything is fine and he/she has not moved? -> your second question. (just ignore this)

Anyway, if you have a nextcloud running, you could try https://apps.nextcloud.com/apps/phonetrack - i forgot to mention that in my last post :) That would be long-term. A friend is using it with his family. Traccar maybe a look worth, but haven't used it.

protist commented 4 years ago

@natrius I don't entirely understand the first part of your response, but the second problem I mention is also in the linked issue.

PhoneTrack and Traccar both look really interesting. Thank you for the suggestions! I'll check them out.

maximbaz commented 3 years ago

Hello everyone, this is a great thread and I would like to just add some points to the discussion.

First of all, I really appreciate that Hauk is fully open-source and available on F-Droid, this alone is convincing enough argument for me to choose Hauk over OwnTracks.

A big downside of OwnTracks is its dependency on Google Maps (#544) and Google services (#88) in particular, the argument below doesn't really inspire confidence in me, if that was the case I would just keep using Google Location sharing directly:

If you own an Android device or use Google Maps, Google most likely has your location anyway. If you can live without these services I envy you to be honest.

Privacy-focused Android OS such as GrapheneOS or CalyxOS are becoming more popular, and so there is a need for a location sharing app that doesn't require sharing the location with Google as well.


Hauk was made with the purpose of being an open-source replacement for Glympse, Google Maps and Telegram location sharing, etc. I.e. these were made to be temporary shares useful for meeting up at specific places and tracking how far away people are from each other.

Here's my second argument in favor of this feature request: short-term location sharing (the original purpose of Hauk) is also a great and useful functionality, and I don't really want to have two separate location sharing apps when I can just have one that works well and I can trust. For me as a user, I just want to share my location, the duration is just a tiny detail, and if an app is able to share my location indefinitely or only for 30 minutes, it is great. And Hauk actually already has fine-grained way to share location, which I love.

This is also reflected in the dependencies; usage of Memcached was intentional over a proper RDBMS like MariaDB or PostgreSQL, as Memcached is meant for short term storage (caching) of data.

I completely agree with @mcarbs on this one, we don't actually need location history, this tech stack is perfectly suited for the family use-case.


If I were to envision a perfect location sharing app, it would be what Hauk currently is with the following additions:

tuffnerdstuff commented 3 years ago

I just created hauk-snitch, a small server-side go application which forwards OwnTracks location updates to Hauk, managing sessions along the way. It can be configured to automatically start a new Hauk session once the old one expires and it sends you an email if it does so. While it might not target all your requirements, it might be worth a look.