Repository navigation
Inappropriate way of sending locations is used #13006
Copy link
Copy link
Open
Labels
Description
The Signal app currently uses the following method of sharing a user's location, after the user has selected a location on the in-app map.
- Load Google Map.
- Wait for Google Map to finish loading.
- Take snapshot of Google Map.
- Remove Google Map and replace it with its snapshot.
- Once the user hits send, send this snapshot as an image.
This is implemented in the following snippet:
Signal-Android/app/src/main/java/org/thoughtcrime/securesms/components/location/SignalMapView.java
Lines 77 to 96 in 55af6ca
| public static ListenableFuture<Bitmap> snapshot(final LatLng place, @NonNull final MapView mapView) { | |
| final SettableFuture<Bitmap> future = new SettableFuture<>(); | |
| mapView.onCreate(null); | |
| mapView.onResume(); | |
| mapView.setVisibility(View.VISIBLE); | |
| mapView.getMapAsync(googleMap -> { | |
| googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(place, 13)); | |
| googleMap.addMarker(new MarkerOptions().position(place)); | |
| googleMap.setBuildingsEnabled(true); | |
| googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL); | |
| googleMap.getUiSettings().setAllGesturesEnabled(false); | |
| googleMap.setOnMapLoadedCallback(() -> googleMap.snapshot(bitmap -> { | |
| future.set(bitmap); | |
| mapView.setVisibility(View.GONE); | |
| mapView.onPause(); | |
| mapView.onDestroy(); | |
| })); | |
| }); |
The two issues are:
- 1.-4. is an inappropriate way of generating a snapshot. It is better to use a lite mode map instead, because this implements exactly what is needed (non-interactive snapshot of a map).
- An instance in which the current implementation is inappropriate is when
onMapLoadedandonSnapshotReadyhave not yet been called, but the activity hosting the map is destroyed. In this case, the activity'sonDestroymethod must call the map'sonDestroymethod (which is not implemented). Lite mode maps do not expect lifecycle methods to be called, except foronCreate. - In fact, Signal currently forgets to call a few of the lifecycle methods. See Call all lifecycle methods on snapshot
mapView#13008. - Additional info: this is also related to Unable to share location on Android #12723 (comment), because microG does not implement
GoogleMap.OnMapLoadedCallbackcorrectly (ImplementGoogleMap.OnMapLoadedCallbackcorrectly microg/GmsCore#1960).
- An instance in which the current implementation is inappropriate is when
- 5. is in violation of the contract of the
snapshotAPI, and by extension likely also of the terms of usage of the Google Maps API.Note: Images of the map must not be transmitted to your servers, or otherwise used outside of the application. If you need to send a map to another application or user, send data that allows them to reconstruct the map for the new user instead of a snapshot.
Reactions are currently unavailable
Activity
stale commentedon Sep 10, 2023
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
fynngodau commentedon Sep 10, 2023
ggdupont commentedon Sep 11, 2023
Just discovered the feature today (potentially a very useful feature). Then I understood it uses google map... to transmit a screenshot??
I share the technical concerns expressed by @fynngodau here: why send a screenshot when coordinates would be enough? On which I would add a privacy concern: would it be possible to use alternative privacy-friendly apps like OSM?
stale commentedon Nov 10, 2023
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
fynngodau commentedon Nov 10, 2023
stale commentedon Jan 9, 2024
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
fynngodau commentedon Jan 9, 2024
stale commentedon Jan 21, 2024
This issue has been closed due to inactivity.
fynngodau commentedon Jan 21, 2024
20 remaining items
mxa commentedon Mar 31, 2025
Bad bot! That the signal team seem to have different priorities hopefully doesn't mean this will never be fixed.
MichaelZ4714 commentedon Jun 24, 2025
I really wish that this problem will be solved soon!!
c4tb3rt commentedon Aug 29, 2025
This really seems like the best idea.
jayaddison commentedon Oct 15, 2025
On the other hand: it is helpful for sighted users to have visual imagery of a map location; a standalone
geo:URI alone might not provide that.mxa commentedon Oct 15, 2025
True, but since sharing the sent location with a map provider is a privacy issue, the preview feature should at best be a n opt-in preference, not the default.
jayaddison commentedon Oct 15, 2025
After spending some time thinking about it, it makes sense to me that the app has to connect out to retrieve a map image from a remote service, because that data -- that evolves on a continuous basis, for example businesses, road layouts, etc -- is not going to ship inside the app with today's mobile network / map data size tradeoffs.
Also, it could be an option for every recipient to make a decision about whether to display the sender's location as a map preview. However, given that Signal supports large-ish group sizes, a single sender causing
n(wherencould easily be greater than 10) recipients to reveal their location to a remote map service, means we should probably prefer for the sender -- precisely 1 user -- to choose.I do think your suggestion that it could be opt-in is reasonable. I would suggest perhaps a prompt-on-first-share, with a choice of user selections from:
geo:URIs when I share my location.An orthogonal issue is: what map preview providers are supported (currently, AFAICT, this is Google Maps only -- however others could be added).
clijsters commentedon Oct 27, 2025
Just jumping in with a user-perspective: I am using /e/OS, which has microG enabled - the map preview works without the classic google maps invocation. But the link which gets generated is a google maps link.
What my recipient gets, is a map picture that suggests its a MapLibre location (no one know the difference between map providers and navigation apps) and a link to
maps.google.comI'd say a
geo:link as default would be a good start and a user selection for if a preview should get generated, like suggested by @jayaddison makes sense to me.I'm impressed, that this topic is open since 2023
hamishmb commentedon Jun 2, 2026
This feature doesn't work at all for me, as I am on LineageOS without Google Play Services, which is disappointing.
dylanbabel commentedon Jun 2, 2026
bordenc commentedon Jun 11, 2026
Would this be related to the fact that Signal recognises geo URIs as phone numbers and not geo URIs? I second the others that the users should decide what mapping app to use, not Signal.
dylanbabel commentedon Jun 12, 2026
joe-123 commentedon Sep 29, 2026
I would greatly appreciate a way of easily sending the location without google maps. geo URI could be a possibility.
Drawback: one could only send the current position (which might be off). If you want to send a different position the proposed solution doesn't work, right!?
Side note: Signal currently doesn't turn geo URIs into clickable links. Someone opened a PR for that. But Signal closed it for now:
#14838
Would be great if Signal would implement it :)