Geoshare
An Android app to open map links in other map apps and copy coordinates
#
GeoShare: Jump Between Maps
An Android app to open map links in other map apps and copy coordinates.
If you’d like to help getting the app published on Google Play, write me an
email to jakub at jakubvalenta dot cz and I’ll invite you to the testing
program.
Share a map link with GeoShare and the app will open it in another installed map app.
Supported map links
- Google Maps
- Apple Maps
- 2GIS
- Amap (AutoNavi)
- Baidu Map (beta)
- Cartes IGN
- CoMaps
- HERE WeGo
- Magic Earth
- Maps.me
- Mapy.com
- OpenStreetMap
- Organic Maps
- OsmAnd
- Plus Codes (global only)
- Urbi
- Waze
- Yandex Maps
- coordinates
Example use cases
When someone sends you a Google Maps link, but you prefer using OpenStreetMap, you can quickly open the same location in OsmAnd or Organic Maps.
When you like Google Maps for finding places, but you prefer a different app for navigation, you can easily switch from Google Maps to your favorite navigation app.
Other features
- Shows the geographic coordinates of a map link and allows copying them to clipboard in various formats, for example as a geo: link.
- Shows all points of a place list link.
- Allows performing an action automatically when a map link is processed.
- Allows launching navigation in all apps that support it, including TomTom.
- Allows opening a location in web maps, pre-installed ones or your own.
- Allows saving a location as a GPX file.
- Allows sending a location via a messaging app.
- Allows saving a location to a contact.
- Retries on patchy internet connection.
- Allows pasting map links directly into the app, instead of sharing them with it.
- Interface adapts to tablets.
#Intro
#How to show a map location in another map app
Share a location from your map app or web browser.
Choose GeoShare and the app will let you open the same 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 > GeoShare > Open by default, turn on the opening of links in this app, and tap Add links.
Select maps.app.goog.gl, maps.google.com, and www.google.com. These are the common Google Maps links. You can choose other maps or the more rare links too, but it’s not essential.
If some links are grayed out, other map 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 it works
GeoShare converts map links (e.g. https://maps.app.goo.gl/…) into geo: links that can be opened by other map apps. To create a geo: link, geographic coordinates are required. GeoShare extracts them from the map URL.
However, not all map URLs include coordinates. In such cases, GeoShare will prompt you for permission to connect to the map service (Google Maps, Apple Maps etc.) and retrieve the coordinates from:
- either HTTP headers, e.g.
Location: https://google.com/maps/@40.78,-73.96,19z - or HTML document, e.g.
<meta property="place:location:latitude" content="40.78"> - or the API of the map service, e.g.
GET https://geocode.googleapis.com/v4/geocode/address/… - or the live web page including JavaScript.
If you don’t allow connecting to the map service, then GeoShare creates a geo: link with a search term instead of coordinates, or it stops, depending on the particular link.
To permanently allow or deny connecting to the map service instead of always asking (the default), go to the app’s preferences.
#Privacy considerations
When possible, GeoShare converts map links offline. If the map link requires online conversion, the app will ask you before connecting to the map service (Google Maps, Apple Maps, etc.). If you allow the connection, the map service will receive the map link, and it will be able to read your IP address.
For some map links, GeoShare calls a remote server, the open-source GeoShare Server. This server then calls the map service API (e.g. the Google Maps API). GeoShare Server doesn’t keep logs of map links. To apply rate limiting, it stores a public key that identifies your device and separately your IP address for limited time.
For some map links, GeoShare loads the live web page of the map service and executes its JavaScript. This happens in a restricted environment, which blocks tracking scripts and doesn’t store cookies.
#Location permission
GeoShare asks for location permission when launching the TomTom navigation and when sharing a GPX route, because in these cases the app needs to create a GPX route that starts at your current location. The location information is discarded immediately after the creation of the route.
#Reporting issues
GeoShare supports many types of map links. If you still find a link that doesn’t work, please report an issue.
#Screenshots
#Installation
#From an app store (recommended)
Get the app on F-Droid (recommended) or Izzy on Droid.
#From an APK file
-
Download the APK from GitHub.
-
Verify the APK signature:
apksigner verify --print-certs page.ooooo.geoshare.apkExpected 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
-
Install the APK on your phone using adb:
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.
#Running unit tests using the command line
./gradlew testFreeDebugUnitTest testProDebugUnitTest
#Lint using the command line
./gradlew lintFreeDebug lintProDebug
#Generating a signed release APK
export STORE_FILE=path/to/keystore.js export STORE_PASSWORD=mypassword export KEY_ALIAS=com.example.android export KEY_PASSWORD=mypassword make clean make build
#Setting up Google Play publishing
Create file fastlane/Appfile with the following content:
json_key_file("path/to/play-store-credentials.json")
package_name("page.ooooo.geoshare.pro")
#Updating Google Play metadata
fastlane metadata
#Taking screenshots for F-Droid and Google Play listing
-
Start a
Medium Phoneemulator. -
Install CoMaps and OsmAnd, because these apps should appear on the screenshots on the conversion result screen.
-
Take the screenshots:
SCREENGRAB_DEVICE_TYPE=phone fastlane screenshots
-
Repeat the process for a small tablet:
- Emulator:
Nexus 7(portrait orientation) - Command:
SCREENGRAB_DEVICE_TYPE=sevenInch fastlane screenshots
- Emulator:
-
Repeat the process for a medium tablet:
- Emulator:
Medium Tablet(landscape orientation) - Command:
SCREENGRAB_DEVICE_TYPE=tenInch fastlane screenshots
- Emulator:
-
Then install
optipngand optimize all the screenshot PNG files:find ./fastlane/metadata/android/en-US/images -name '*.png' -exec optipng -preserve '{}' \; find ./fastlane/metadata_pro/android/en-US/images -name '*.png' -exec optipng -preserve '{}' \;
#Taking screenshots for documentation (Weblate translations)
-
Most screenshots can be taken on a Gradle-managed device, so you don't need to have an emulator set up. Run:
./gradlew :app:mediumPhoneApi37FreeDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.package=page.ooooo.geoshare.screenshots ./gradlew :app:mediumPhoneApi37ProDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.package=page.ooooo.geoshare.screenshots ./gradlew :app:mediumPhoneApi37DemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.package=page.ooooo.geoshare.screenshots ./gradlew :app:copyScreenshots
-
Some screenshots require the OsmAnd~ and Conversations apps installed. Install these apps in an emulator, start it, and run:
./gradlew :app:connectedFreeDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.package=page.ooooo.geoshare.screenshotsThen copy the following screenshots from
build/outputs/connected_android_test_additional_output/freeDebugAndroidTest/connected/<device>todocs/screenshots:main_strings/automation_share_gpx_route_success.webpmain_strings/automation_share_gpx_route_waiting.webpmain_strings/automation_share_waiting.webpmain_strings/conversion_result_app_messaging.webpmain_strings/conversion_result_app_osmand.webp
-
A few screenshots require the TomTom app installed. It seems to be easier to install the app on a physical device. So install the app on a physical device, start it, and run:
./gradlew :app:connectedFreeDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.package=page.ooooo.geoshare.screenshotsThen copy the following screenshots from
build/outputs/connected_android_test_additional_output/freeDebugAndroidTest/connected/<device>todocs/screenshots:main_strings/conversion_result_location_loading_indicator.webpmain_strings/conversion_result_location_rationale.webpmain_strings/conversion_result_message_error.webp
#Manual testing
To share a URI input with the app running in emulator, run:
adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d "https://maps.apple.com/?q=Central+Park\&sll=50.894967,4.341626\&z=10\&t=s" page.ooooo.geoshare.debug
Don’t forget to escape the & character.
To share a text input, run:
adb -s emulator-5554 shell am start -W -a android.intent.action.SEND -t text/plain -e android.intent.extra.TEXT "N-68.648556,\ E-152.775879" page.ooooo.geoshare.debug
#Running against local API server
adb reverse tcp:8080 upd:8080
#Contributing
Contributions are welcome. To claim a bug or feature request, comment on the relevant GitHub issue or open a new one.
#Translating
GeoShare is available on Weblate thanks to their libre tier. Further instructions are in the Overview tab there.
#License
Feel free to remix this project under the terms of the GNU General Public License version 3 or later. See COPYING and NOTICE.
Some components are derived from third-party code under other compatible licenses; see individual subdirectories.
Map data is derived from Natural Earth and Marine Regions.
#References
Flanders Marine Institute (2023). Maritime Boundaries Geodatabase: Maritime Boundaries and Exclusive Economic Zones (200NM), version 12. Available online at https://www.marineregions.org/. https://doi.org/10.14284/632

