Skip to content

Improving location sharing — asking before I open PRs #3657

Description

@Piero-93

Right now FluffyChat can share a location, but only the one the GPS reports, and only on mobile: the menu entry sits behind PlatformInfos.isMobile in chat_input_row.dart. There is no way to pick a place on a map, and the event that gets sent carries only geo_uri, without the MSC3488 fields that Element uses to tell somebody's own position apart from a place they picked.

Receiving has two rough edges. message_content.dart reads content['geo_uri']!, so an event that carries only the MSC3488 location — which is what a live share sends — crashes the bubble. And live shares themselves (MSC3672 beacon_info and beacon) are not handled at all, so a live location sent from Element shows up as nothing.

There is a smaller Android one too: geo:lat,lon is handed to the system as is, and Google Maps ignores coordinates in the path, so tapping a shared location opens the map app at your own position instead of the shared place.

I would like to work on this, in separate PRs:

  1. Pick a place on a map when sharing, and add the MSC3488 fields so Element and FluffyChat agree on what was shared. Also allow sharing on desktop and web.
  2. Fix the Android geo: handling. Small and independent of the rest.
  3. Open a shared location on a full screen map inside the app, with a button to hand it over to the map app.
  4. Show live locations received from other clients.

Sending a live location, which is what #3279 asks for, would come after that, and I would ask again before starting it, since it needs changes to the Android manifest and Info.plist.

Does this sound like the right direction to you? I have already built most of it locally while working out what was involved, so I can show you actual code rather than plans, if that is more useful. And if you would rather go another way, just say so — I am happy to rework it.

Activity

  1. krille-chan commented on Sep 25, 2026

    @krille-chan
    Owner

    Thank you so much for taking action here :-)

    Pick a place on a map when sharing, and add the MSC3488 fields so Element and FluffyChat agree on what was shared. Also allow sharing on desktop and web.

    geolocator now seems to support all platforms so sounds good to me.

    Fix the Android geo: handling. Small and independent of the rest.

    Yes please!! That would be so nice. It's really annoying that it is broken on Android.

    Open a shared location on a full screen map inside the app, with a button to hand it over to the map app.
    Show live locations received from other clients.

    That would be nice but sounds like a bigger task which would need some planning. I'd suggest to open it in a so called Scaffold-Dialog using the already existing showScaffoldDialog() method. This would mean it is full screen on mobile while on desktop it is in a very big dialog. You would then give this dialog the Timeline object and the event to display live location of all users sharing their location at the moment. Also this would make this feature nicely separated from everything else.

    Go ahead! Sounds great to me :-)

  2. Piero-93 commented on Sep 25, 2026

    @Piero-93
    ContributorAuthor

    Thanks! I will start with the first two then, and open them one at a time.

    showScaffoldDialog() — I had missed that it existed, I will use it.

    And showing everyone who is currently sharing on the same map makes more sense than what I had, which only followed the beacon you tapped. I will rework it that way.

    One thing I would like to get right before building it: should the full screen map also open for a plain shared location, the static m.location message, or only for live ones? I had it opening for both, so that tapping any location opens the map inside FluffyChat instead of jumping straight out to the map app, with a button to hand it over. If you would rather leave static locations as they are and keep the big map for live shares only, that is easy too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions