Skip to content

Latest commit

 

History

History
252 lines (176 loc) · 12.1 KB

README.md

File metadata and controls

252 lines (176 loc) · 12.1 KB

Geo Share app icon

Geo Share

An Android app to open Google Maps in other map apps and to create geo: links.

Get it on F-Droid Get it on Izzy on Droid

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.

Screenshot of Google Maps' share screen

Choose Share geo: and Geo Share will let you open the location in any installed map app.

Screenshot of Geo Share's share screen

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.

Screenshot of Google Maps' Open by default settings

Then go to Settings > Apps > Geo Share > Open by default, turn on the opening of links in this app, and tap Add links.

Screenshot of Geo Share's Open by default settings

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.

Screenshot of Google Maps' share screen

Or open Geo Share and paste your Google Maps link there.

Screenshot of Geo Share's geo: link conversion form

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.

Screenshots

Screenshot of Geo Share's main screen Screenshot of Geo Share's share screen Screenshot of Geo Share asking for permission to connect to Google Screenshot of Geo Share's intro screen

Installation

From an app store (recommended)

Get the app on F-Droid or Izzy on Droid.

From an APK file

  1. Download the APK from GitHub.

  2. Verify the APK signature:

    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:

    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

make sign keystore_path=/path/to/your/keystore.jks

Installing the release APK on your phone

make install

Testing various Google Maps links

Link with coordinates in URL:

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:

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:

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:

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:

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:

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:

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

Feel free to remix this project under the terms of the GNU General Public License version 3 or later. See COPYING and NOTICE.