Skip to content

Latest commit

 

History

History
179 lines (124 loc) · 9.31 KB

README.md

File metadata and controls

179 lines (124 loc) · 9.31 KB

Geo Share app icon

Geo Share

An Android app to turn Google Maps links into geo: links.

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

Usage

  1. Go to Google Maps or a web browser and share a link with Geo Share:

    Screenshot of a Google Maps link being shared with Geo Share

  2. Geo Share will turn the link into a geo: link and open it with one of your installed apps:

    Screenshot of Geo Share sharing a geo: link

Geo Share supports many Google Maps URL formats. Still, if you find a link that doesn't work, please report an issue on GitHub.

How it works & anti-features

There are three scenarios how Geo Share turns a Google Maps URL into a geo: URI. Two of them can connect to Google's servers.

  1. If the Google Maps URL already contains geographical 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 geographical 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.

Go to Preferences to permanently allow or deny connecting to Google instead of always asking, which is the default.

Screenshots

Geo Share screenshot Geo Share screenshot in dark mode

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 run, build and test the app.

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.