riot-android icon indicating copy to clipboard operation
riot-android copied to clipboard

[Feature] Share location

Open albuic opened this issue 7 years ago • 14 comments

Share location between people (and show it on an integrated map maybe)

albuic avatar May 04 '17 22:05 albuic

it is planned feature but not yet implemented.

ylecollen avatar May 05 '17 05:05 ylecollen

No need to integrate a map. You can link to a location as geo:48.85828,2.29449. Works with Riot as-is, and will open in any good map app you have installed. (OsmAnd, Google Maps, others...)

Example: https://matrix.to/#/#riot-android:matrix.org/%2414950160261511516pRlnj:matrix.org

ghost avatar May 17 '17 10:05 ghost

one year plus later, any update on this feature?

moralrebuild avatar Jul 16 '18 13:07 moralrebuild

@moralrebuild no idea @Matrixcoffee sharing a simple point of interest (like the geo:X,Y) or a real time location (with real time update) is not the same and can't be done with a geo:X,Y

albuic avatar Aug 13 '18 06:08 albuic

This feature may be consider as a meta regarding the Riot universe, and maybe the Matrix universe.

bmarty avatar Aug 22 '18 09:08 bmarty

@albuic Ah, I misunderstood the issue. I guess someone might be able to write an integration that does this. (Live map)

Anyway, as bmarty said, this isn't specific to the Android client. If you write an integration the proper way, it should work on all matrix clients that support integrations.

ghost avatar Sep 05 '18 16:09 ghost

Cool would we also if people could leave location aware comments, such as "saw a rare animal here" or "road needs fixing here" etc.

poVoq avatar Dec 30 '18 17:12 poVoq

It's a pity Osmand community haven't chosed matrix for powering their location sharing app. http://osmand.net/blog/osmand-telegram-released It would be amazing to have something similar powered by matrix rather than telegram.

pvagner avatar Jan 25 '19 12:01 pvagner

There's already a PR for riot-web, Location-Events by @Half-Shot . He went for Open Street Map for map service.

Now for android . Google maps service (which require Google Play Services) seems best but there are various android devices (like with Lineage OS) which don't use Google Play Services . And Riot runs on variety of android devices .

So best solution seems to be

  1. Integrate Both API (Google Maps and OSM)
  2. If (Google Api is available) Use it

RotBolt avatar Mar 10 '19 13:03 RotBolt

Please do not use anything google related if possible.

I would like to suggest Hauk - https://github.com/bilde2910/Hauk I installed it on my server and it is used a lot already. It is good and is using OpenStreetMap and it is really easy to set up. Maybe it should be a Widget.

natrius avatar Sep 01 '19 22:09 natrius

Hi, developer of Hauk here. If there is interest in using my project for location sharing, I'd be more than happy to help and will do my best to assist in incorporating the needed functionality on my end :-)

bilde2910 avatar Sep 03 '19 13:09 bilde2910

Hi, developer of Hemppa (a bot) here. It can translate location updates to human-readable (and clickable) links. It can also generate them from location names (via OSM api). There is still no way to send a real GPS position from a mobile device.

https://github.com/vranki/hemppa

vranki avatar Feb 04 '20 19:02 vranki

I do not know anything about the technical background here, but at least I would like to give an advice (before someone implements something terribly useless):

The XMPP client "Conversations" for Android has a "share location" implementation that -- although minimalistic -- already covers most of the use cases, IMHO:

  • You click on "Send location" ("Insert location" in the middle of the text you were typing would be even nicer).

  • A map gets shown, centered on your current location (with a green icon in the center).

  • You can now either just tap the "Share" button (or "Cancel") or you can zoom and pan the map to have the green Icon centered over the location you want to share. So if you are currently visiting Berlin/Germany, but want to show your chat partners where you live, you pan the map to London/England, the exact spot where your house is located, and then press "Share", which will send the location of your house in England. If after panning the map you want to re-center it to your current location, just hit the green round crosshair icon in the lower right hovering over the map.

  • After clicking on "Share", you'll get back to your message entry and can now just hit the "Send" icon on the right. For both you and your chat partner, the message will consist of a button labeled "SHOW LOCATION".

  • If you you click on that button, a map is shown, centered on that very location. It has two icons in the upper right corner for:

    • sharing (which lets you select things like "Copy to clipboard", "Save as..." (from the Amaze file manager), "Conversations", "Messages", "K-9 Mail" etc.)
    • Copy to clipboard (which will then contain the text "geo:51.513624917984316,-0.10244404062649437")
  • Additionaly, there is a round green icon in the lower right hovering over the map that is labeled with the typical "directions" arrow. After clicking it, you can select a navigation app ("ZANavi, OsmAnd~, Navit, Map, ...) which will then calcuate a route from your current location to that location you just shared.

mjk-gh avatar Sep 09 '20 12:09 mjk-gh

I like that design @mjk-gh . We could just copy that.

Another feature I would like to see is "location streaming" - tracking users movements continuously instead of sending a single location update.

For example Alice is driving a car and wants to share location with Bob:

  • Alice presses "Stream location" in a room with Bob
  • Alice's Element sends location updates automatically to room between configurable intervals. Default 1 minute?
  • User can end location streaming when not needed anymore

On Bob's side

  • Notification "Alice has started location streaming [Map button]"
  • Map button could be next to Alice's username in user list.
  • Pressing the button would open up a map with Alice's latest location shown.

Multiple users could stream their location in a room and their locations could be checked from per-user map button or room-wide button that would show all users who are sharing location. For example search and rescue situation could benefit from this.

Some things that need more thinking (perhaps more spec than Element specific stuff):

  • We need a way to distinguish between single location event and a location stream.
  • How would this work if a user has multiple devices sending location stream? Should the streams be per device or per user (previous stream stops if new one begins?)
  • Should one user be able to send multiple streams? For example a bot that could stream locations of multiple vehicles.

vranki avatar Sep 12 '20 11:09 vranki