owntracks / ios

OwnTracks' iPhone App
http://owntracks.org
Other
336 stars 91 forks source link

Enhancement: hard location geofence capability #815

Open nickswalker opened 3 hours ago

nickswalker commented 3 hours ago

I am interested in having a user-understandable guarantee that the client won't transmit data except for when it's within a predefined region. Wanted to start a discussion as I'd be interested in contributing toward this capability in the medium term (next 6 months).

The benefit would be to make users more comfortable when connecting to a broker they don't control. My specific use case involves many event participants downloading and using owntracks to share their location while participating in a particular area for e.g. a weekend. It is a difficult ask for some without guardrails so that they don't unintentionally broadcast more than they intended.

The closest that's possible now would be to use Region Monitoring with automatic monitoring mode change to switch into manual mode when leaving a region. This doesn't protect the user from manually flipping the mode, or pressing the "send location now" (though that button is fairly explicit 😄). The other issue is that the interface for this feature is currently somewhat obscure; new users do not know what the pipe and number tags on regions mean. The subtlety of what "quiet" means is also probably not clear to new users.

I think it would make sense to build from the existing region system to introduce some kind of "incognito" mode (to take a familiar term). When specified, these regions (or one special mega region?) would be checked as an allowlist before the device sends out any message. This would have to be thought through to ensure that it doesn't become a source of silent failure if misconfigured, but I believe could be made sense-able by e.g. rendering specially on the map. My use case calls for fairly granular fencing, like using 100s of point radius pairs to hone in to within a couple of block radius around a marathon course through the neighborhoods that participants live and work in.

Related: discussion on why it was useful to enhance a hook in the recorder to support a hard location filter https://github.com/owntracks/recorder/issues/458

jpmens commented 2 hours ago

This sounds to me like a bit of a niche use-case useful only in situations such as the one you describe. If I understand you correctly this would be for a group of people who meet for a weekend or so and who would a) need to install OwnTracks and b) correctly configure it. After using the app for a couple of days most would likely uninstall it.

(IIRC this has been done before -- for a race or marathon; a number of years ago...)

Furthermore, you are proposing this idea for our iOS app; do you plan on doing the same for the Android app, or is that beyond scope? (We try to attempt feature parity though to be honest we're far from it.)

Edit to add: I am of the opinion that our app is becoming too complicated with too many distinct scenarios which are not easy to understand.