An Android trail navigation app with USGS maps, GPX trails, and downloadable map coverage. Import a route or choose a community trail, save its maps, and use both without a network connection.
Requires Android 8.0 (API 26) or newer. No TrailRelay account or user API key required.
Find the latest release and available downloads on GitHub Releases.
Click a screenshot to view it larger.
Trail navigation |
Route details |
My Trails |
Offline maps and storage |
- USGS / The National Map Aerial, Hybrid, and Topo maps with a remembered map choice.
- Foreground GPS location, North Up / Heading Up, follow, recenter, zoom controls, and a GPS speed HUD.
- Open either trail endpoint in an installed map app.
- A map-first Browse view of saved GPX trails, plus a selected-trail details sheet with neutral A/B route context and an overlapping-route chooser.
- Local GPX import and a persistent My Trails library.
- Community search, filtering, route preview, and GPX downloads.
- Downloads & Storage for route files and independent offline Aerial, Hybrid, and Topo packages, with progress, pause/resume, and separate removal.
- Settings with Keep screen awake, Heading offset for angled mounts, and an optional offline tile-coverage grid.
- No TrailRelay account, backend, or user API key required.
TrailRelay is Android-only, written in Kotlin with Android Views/XML and MapLibre Native. It supports Android 8.0 (API 26) and newer.
Choose a map mode, open a locally stored trail, and choose Download Map. Review the coverage information and start the download. Wait for Available Offline, then check the trail with networking disabled before heading out.
New downloads follow a corridor around the GPX trail with about 1.5 km of surrounding context, at zooms 12–16. Large downloads are rejected before downloading. Aerial, Hybrid, and Topo coverage must be downloaded separately; existing aerial packages remain usable. Map tiles outside the downloaded corridor or zoom range may need a network connection. An interrupted download can be resumed from Downloads & Storage.
The current release is 0.4.0. See the release notes and GitHub Releases.
TrailRelay is a solo project. Trail and catalog metadata may be incomplete, and downloaded coverage should be checked before relying on it remotely. You are responsible for checking trail legality, closures, land access, and safe navigation. Keep another navigation and safety option available; TrailRelay should not be your sole system in remote areas.
Community trails are GPX-based. The public static catalog and trail data live in TrailRelay-Trails, with the catalog hosted on GitHub Pages. The app searches and filters the catalog locally and saves downloaded GPX files for offline use.
Maps come from USGS / The National Map: USGSImageryOnly (Aerial), USGSImageryTopo (Hybrid), and USGSTopo (Topo). Aerial attribution: USDA, USGS The National Map: Orthoimagery; Hybrid and Topo credits are shown in the map chooser. See The National Map. TrailRelay is an independent project and is not endorsed by USGS.
Use Android Studio compatible with the project's Android Gradle Plugin (currently 9.4.1), and install Android SDK Platform 37 through SDK Manager. The Gradle daemon is pinned to JDK 17 in gradle/gradle-daemon-jvm.properties; the wrapper is configured to provision that toolchain when needed. Initial setup and dependency downloads require internet access.
git clone https://github.com/AldogPlays/TrailRelay.git
cd TrailRelayOpen the project in Android Studio and let Gradle sync finish. From the repository root:
./gradlew :app:testDebugUnitTest
./gradlew :app:assembleDebugOn Windows, use gradlew.bat. The debug APK is written to:
app/build/outputs/apk/debug/app-debug.apk
Development testing currently primarily uses a physical Android device. An emulator is not required for these JVM tests or the debug build. Successful compilation does not verify GPS or offline behavior on a device.
Validation runs locally; this repository has no GitHub Actions workflow, and GitHub Actions is disabled in the repository settings. Run the unit tests and debug build above before submitting changes. Release preparation also requires ./gradlew :app:assembleRelease and git diff --check. For signing and physical-device upgrade checks, follow the local release instructions.
Source lives under app/src/main/java/com/trailrelay/app/:
| Area | Responsibility |
|---|---|
map/ |
MapLibre Native map, bundled USGS style, and GPX overlay |
location/ |
Foreground GPS updates |
trails/ |
GPX parsing/import, My Trails, and local persistence |
trails/community/ |
GitHub Pages catalog, local search/filtering, and GPX downloads |
offline/ |
MapLibre offline regions, trail association, and download lifecycle |
GPX is the canonical trail geometry format. SQLite (SQLiteOpenHelper) indexes trail metadata; original GPX files remain in app-private persistent storage. A disposable app-private cache retains derived geometry for faster cold starts. MapLibre manages downloaded imagery in its offline database.
Keep trails local, avoid account requirements, and use portable GPX files that users own. Favor an uncluttered, map-first interface and small, verified milestones over large rewrites.
This roadmap is non-binding; priorities may change:
- UI/UX polish
- Trail catalog improvements
- Tracks and waypoints
Copyright 2026 Jeffrey Conton.
TrailRelay source code is licensed under the Apache License 2.0. The license text is reproduced from the Apache Software Foundation. Third-party dependencies, imagery, and trail data retain their respective terms and attribution requirements.