https://github.com/jakubvalenta/geoshare
An Android app to open Google Maps in other map apps and to create geo: links
https://github.com/jakubvalenta/geoshare
android geo gmaps googlemaps link openstreetmap osm url
Last synced: 18 days ago
JSON representation
An Android app to open Google Maps in other map apps and to create geo: links
- Host: GitHub
- URL: https://github.com/jakubvalenta/geoshare
- Owner: jakubvalenta
- License: gpl-3.0
- Created: 2024-11-05T12:02:30.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-03-27T20:34:09.000Z (about 1 month ago)
- Last Synced: 2025-04-10T01:07:08.469Z (18 days ago)
- Topics: android, geo, gmaps, googlemaps, link, openstreetmap, osm, url
- Language: Kotlin
- Homepage: https://f-droid.org/packages/page.ooooo.geoshare/
- Size: 3.44 MB
- Stars: 83
- Watchers: 3
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: COPYING
Awesome Lists containing this project
README
# Geo Share
An Android app to open Google Maps in other map apps and to create geo: links.
[
](https://f-droid.org/packages/page.ooooo.geoshare/)
[](https://apt.izzysoft.de/packages/page.ooooo.geoshare)
[](https://hosted.weblate.org/engage/geoshare/)
## When to use Geo Share
If someone sends you a Google Maps link, but you prefer using OpenStreetMap, you
can share the link with Geo Share. The app will open it in an installed map app
of your choice, such as OsmAnd or Organic Maps.If you like finding places on Google Maps but prefer a different app for
navigation, you can share the location from Google Maps with Geo Share. The app
will open it in your favorite navigation app.You can also use the app to copy Google Maps links as geo: links to your
clipboard.## Intro
### How to view Google Maps locations in other map apps
Share a location from Google Maps app or from your web browser.
Choose _Share geo\:_ and Geo Share will let you open the location in any
installed map app.
### Configure Android to open links to Google Maps in alternative maps (optional)
First, go to Settings > Apps > Maps > _Open by default_ and turn off the opening
of links in this app.
Then go to Settings > Apps > Geo Share > _Open by default_, turn on the opening
of links in this app, and tap Add links.
Select at least `maps.google.com` and `maps.app.goo.gl`. If some links are
grayed out, other Google apps are set to open them by default. You can find
these apps and turn off the opening of links for them, like we did for Google
Maps.### How to create geo: links
Select _Copy geo\:_ when sharing from Google Maps.
Or open Geo Share and paste your Google Maps link there.
## How it works and privacy considerations
Geo Share converts Google Maps links into geo: links that can be opened by other
map apps. To create a geo: link, geographic coordinates are required. Geo Share
extracts them from the Google Maps URL.However, not all Google Maps URLs include coordinates. In such cases, Geo Share
will **prompt you for permission to connect to Google** and retrieve the
coordinates from either HTTP headers or the HTML document of the link.More precisely, there are three scenarios how Geo Share converts a Google Maps
URL into a geo: URI:1. If the Google Maps URL already contains geographic coordinates (for example
`https://www.google.com/maps/place/Central+Park/data=!3d44.4490541!4d26.0888398`),
then it's parsed and no request to Google's servers is made.2. If the Google Maps URL doesn't contain geographic coordinates (for example
`https://www.google.com/maps/place/Central+Park/`), then Geo Share asks you
if it can connect to Google.If you allow connecting to Google, then Geo Share makes an **HTTP GET
request** to Google Maps and parses the coordinates from the HTML response.
You can imagine it as `curl https://www.google.com/maps/place/Central+Park/ |
grep -E '/@[0-9.,-]+'`.If you don't allow connecting to Google, then Geo Share creates a geo: link
with a place search term (for example `geo:0,0?q=Central%20Park`).3. If the Google Maps URL is a short link (for example
`https://maps.app.goo.gl/TmbeHMiLEfTBws9EA`), then Geo Share asks you if it
can connect to Google.If you allow connecting to Google, then Geo Share makes an **HTTP HEAD
request** to the short link and reads the full link from the response
headers. You can imagine it as `curl -I
https://maps.app.goo.gl/TmbeHMiLEfTBws9EA | grep location:`. Then Geo Share
continues with scenario 1 or 2, depending on whether the full link contains
coordinates or not. In case of scenario 2, another connection to Google will
be made, but this time without asking.If you don't allow connecting to Google, then Geo Share cancels the creation
of the geo: link.To permanently allow or deny connecting to Google instead of always asking (the
default), go to the app's Preferences.## Compatibility with the GMaps WV app
You don't need Geo Share when using the GMaps WV app, because that app already
produces geo: links. So you can directly share a location from GMaps WV with
another map app.## Reporting issues
Geo Share supports many Google Maps URL formats. Still, if you find a link that
doesn't work, please report an [issue on
GitHub](https://github.com/jakubvalenta/geoshare/issues).## Screenshots
[
](./metadata/en-US/images/phoneScreenshots/1.png)
[](./metadata/en-US/images/phoneScreenshots/2.png)
[](./metadata/en-US/images/phoneScreenshots/3.png)
[](./metadata/en-US/images/phoneScreenshots/4.png)
## Installation
### From an app store (recommended)
Get the app on
[](https://f-droid.org/packages/page.ooooo.geoshare/)
or [](https://apt.izzysoft.de/packages/page.ooooo.geoshare).### From an APK file
1. Download the APK from
[](https://github.com/jakubvalenta/geoshare/releases/latest/download/page.ooooo.geoshare.apk).2. Verify the APK signature:
```shell
apksigner verify --print-certs page.ooooo.geoshare.apk
```Expected output:
```
Signer #1 certificate DN: CN=Jakub Valenta, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=DE
Signer #1 certificate SHA-256 digest: 1b27b17a9df05321a93a47df31ed0d6645ebe55d0e89908157d71c1032d17c10
Signer #1 certificate SHA-1 digest: f847c6935fa376a568a56ca458896b9236e22b6c
Signer #1 certificate MD5 digest: 6bcaa6bd5288a6443754b85bf6700374
```3. Install the APK on your phone using adb:
```shell
adb -d install page.ooooo.geoshare.apk
```## Development
Open this repo in Android Studio to build and run the app, and to run unit tests
and instrumented tests.### Generating a signed release APK
```shell
make sign keystore_path=/path/to/your/keystore.jks
```### Installing the release APK on your phone
```shell
make install
```### Testing various Google Maps links
Link with coordinates in URL:
```shell
adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d 'https://www.google.com/maps/place/Pozna%C5%84+Old+Town,+61-001+Pozna%C5%84,+Poland/data=!4m6!3m5!1s0x47045b49399cf863:0xf61cbcaacd7d3070!7e2!8m2!3d52.4083009!4d16.929066199999998' page.ooooo.geoshare.debug
```Link with view centerpoint coordinates in URL:
```shell
adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d 'https://www.google.com/maps/place/Berlin,+Germany/@52.5067296,13.2599309,11z/' page.ooooo.geoshare.debug
```Short link:
```shell
adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d 'https://maps.app.goo.gl/eukZjpeYrrvX3tDw6' page.ooooo.geoshare.debug
```Link with coordinates only in HTML:
```shell
adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d 'https://www.google.com/maps/place/Berlin,+Germany/' page.ooooo.geoshare.debug
```Place list link:
```shell
adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d 'https://www.google.com/maps/placelists/list/mfmnkPs6RuGyp0HOmXLSKg' page.ooooo.geoshare.debug
```Google Search link:
```shell
adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d 'https://g.co/kgs/91UYXud' page.ooooo.geoshare.debug
```Link shared as a SEND Intent:
```shell
adb -s emulator-5554 shell am start -W -a android.intent.action.SEND -t text/plain -e android.intent.extra.TEXT "https://www.google.com/maps/place/Berlin,+Germany/@52.5067296,13.2599309,11z/" page.ooooo.geoshare.debug
```## Contributing
Your contributions are welcome! To show that you'd like to work on a bug, or feature request, please comment on the relevant [GitHub
issue](https://github.com/jakubvalenta/geoshare/issues) or create a new one.### Translating
Geo Share is [available under Weblate](https://hosted.weblate.org/engage/geoshare/) thanks to their libre tier!
More instructions can be found under *Info* in it.[](https://hosted.weblate.org/engage/geoshare/)
__Feel free to remix this project__ under the terms of the GNU General Public
License version 3 or later. See [COPYING](./COPYING) and [NOTICE](./NOTICE).