Skip to content

Mygod/reactmap-android

Repository files navigation

ReactMap for Android

CircleCI API Releases Language: Kotlin Codacy Badge License

Use ReactMap as an Android app with battery improvements, including:

  • Use Google location services to follow location.
  • Reduce animations.
  • Pause location following when jumping to a new location.
  • Disable popups from automatically panning the map.

Other features:

  • See map even behind your status bar and navigation bar!
  • More conveniently refresh the webpage when fullscreen. (During network congestion, Chrome HTTP/3 implementation seems buggy. Lots of hacks were added to get around this to get refresh working.)
  • Login button is clicked automatically (Discord login only).
  • You could make alerts follow location in background.
  • Handle links to the map without opening a new tab (requires custom build for custom domains).
  • Compressed graphql payload to save bandwidth.

For best experiences, ReactMap should be updated to this commit or later: https://github.com/WatWowMap/ReactMap/commit/addb5f3b27c49fe9d7165c8b76f54a5b10912f67

Guide for custom build

Setup instructions

  1. If you have not already, generate a signing key with keytool. Using RSA with a key length of 4096, 8192, or 16384 bits is recommended.
  2. (Required for deep link support on Android 12+) Create the following file at https://mymap.com/.well-known/assetlinks.json by creating the file in /path/to/reactmap/public/.well-known/assetlinks.json:
    [
      {
        "relation": [
          "delegate_permission/common.handle_all_urls"
        ],
        "target": {
          "namespace": "android_app",
          "package_name": "be.mygod.reactmap.com.mymap",
          "sha256_cert_fingerprints": [
            "insert your sha256 cert fingerprint"
          ]
        }
      }
    ]
    where the fingerprint can be obtained via keytool -list -v -keystore /path/to/keystore. (If you prefer to using Android Studio to create this file with a wizard, see here for instructions.)
  3. (Optional) Make modifications to the source code if you wish.

Build instructions

Build with injected properties (modifying these values as you wish):

./gradlew assembleRelease \
 -Pandroid.injected.signing.store.file=$KEYFILE \
 -Pandroid.injected.signing.store.password=$STORE_PASSWORD \
 -Pandroid.injected.signing.key.alias=$KEY_ALIAS \
 -Pandroid.injected.signing.key.password=$KEY_PASSWORD \
 -Preactmap.defaultHost=mymap.com \
 -Preactmap.packageName=be.mygod.reactmap.com.mymap

See gradle.properties for a complete list of supported properties. An alternative to using -P switches is to adding your properties to the gradle.properties file in the root directory.

Success! Find your apk in app/build/outputs/apk/release.

Support in-app GitHub update checking

In-app update checking is supported if you use your custom GitHub repository to distribute built apks. To do this, it is required to use a release name of format [v]X.Y.Z with an arbitrary optional suffix followed by -. The app version name should follow the same format (usually without v prefix), and the X,Y,Z in the version name will be compared to determine the latest update. You may configure this by using properties reactmap.versionCode,reactmap.versionName,reactmap.githubReleases (see gradle.properties for details).

About

Android WebView app for ReactMap with added goodies

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published