HuKi is an Android app for hikers, which helps you plan trips and discover the hiking trails of Hungary.
The app is available in Google Play: HuKi - Hungarian Hiking App
The project was born for two primary reasons:
- My personal entertainment - it's my beloved pet project in which I can try out Android stuff outside of my job.
- It comes in handy for hikers to have trips in Hungary. No need to download tiles or setup layers manually.
The inspiration of the project was turistautak.openstreetmap.hu, I've been using their webapp since I started hiking.
The route planner function is powered and supported by Graphhopper, it uses the cloud version of the Routing API for creating navigation plans.
Huge thanks to the Graphhopper team for the opportunity!
- Out-of-the-box integration with the Hungarian hiking trails
- Free-text search for places in OpenStreetMap databases
- Landscapes, routes-nearby function
- Current location monitoring with elevation support
- Route planner
- Importing and displaying routes from GPX files
- Dark mode support
- Custom layers with styles - Locus, OsmAnd are perfect choices for advanced layer customization.
- Recording hikes - Almost every fitness tracker/watch has its own functionality in this regard.
- Pre-recorded hike collection - Természetjáró for president.
- Community based hike sharing - AllTrails, Komoot etc.
- Tile render - OsmDroid library
- Base layers
- Hiking tiles - TuraReteg.sqlitedb privately hosted in an AWS S3 bucket
- OpenStreetMap data provider - Overpass API
- Search engine - Photon
- Route planner - Graphhopper Routing API
- Location service
- Google Fused Location Provider integrated with OsmDroid
- Hike recommendations
- Kirándulástippek link with area tags like
"budai-hegyseg"
- Természetjáró link with search query parameter
- Kirándulástippek link with area tags like
Since the hiking tiles are hosted in an AWS S3 bucket funded by me, I had to make some preliminary optimization to reduce the cost of the service.
- The S3 bucket is only accessible by my app via
Amazon Amplify
- The hiking tiles are synced by
TuraReteg.sqlitedb
every month - The app uses a local tile range map created by the
TuraReteg
database to avoid unnecessary requests of empty tiles - 14 days cache mechanism is applied by the
OsmDroid
tile renderer. - The app also caches the empty tiles (HTTP 404 responses also count as paid S3 requests)
In the future I may have to make additional changes or re-consider the current setup completely based on the server costs.
The project is my playground, and I don't like to be overly-attached to a specific architecture, but the currently used stack can be summarized by:
Component | Responsibilities | Key classes |
Activity
|
The project currently contains a single screen without fragments or navigation. | HomeActivity |
ViewModel
|
It provides the data for the UI via multiple StateFlow streams (MVVM approach). It requests the data from the Interactor and maps domain models to UI models. |
HomeViewModel |
Interactor
|
It converts direct suspend network calls to Flow streams and calls Repository functions. |
HikingLayerInteractor, LandscapeInteractor |
Repository
|
Fetches the data through the network or local repository via suspend functions while mapping network models to domain models. |
OsmPlacesRepository, FileBasedHikingLayerRepository |
The project uses GitHub Actions
to ensure code quality and to automatically deploy to Google Play Store
.
I'm a big fan of testing so the project is fairly covered with Unit and Instrumentation tests.
The following steps are running on the CI server on master
push:
- Detekt
- Android lint
- Unit tests
- Instrumentation tests on Firebase Test Lab (using two devices with
minApi
andtargetApi
) - Auto-versioning of the apks
- Release app signing
- Publishing to
Google Play Store
with release notes
- Move the last release notes to folder app/src/main/assets/whatsnew/v1.X.X
- Update the actual release notes app/src/main/assets/whatsnew/latest
- Create an internal release (
track: internal
) - Create a prod release (
track: production
) - Create an annotated
TAG
with a final version likev1.X.X
. The apk version is generated by versions.gradle - Push the code with tags
Since the project is still in its early stages, I would be happy to receive ideas, advices or even a code review :)
- If you've found a bug, please file an issue.
- If you want to be a contributor, please reach out to me.
The app is built upon many OpenStreetMap
related services. There is an in-app licences dialog that can be shown by clicking © OpenStreetMap contributors
on the map view.
- OpenStreetMap - https://www.openstreetmap.org/copyright
- Hungarian Hiking Layer (turistautak.openstreetmap.hu) - https://data2.openstreetmap.hu/
- Komoot - Photon (Search engine) - https://photon.komoot.io/
- OsmDroid - Tile render - https://github.com/osmdroid/osmdroid
- Graphhopper - Routing API - https://www.graphhopper.com/
- Kirándulástippek - Hike recommendation - https://kirandulastippek.hu/
- Természetjáró - Hike recommendation - https://www.termeszetjaro.hu/
- OKT - National Blue Trail - https://www.kektura.hu/
- TuHu (turistautak.hu) - Base layer - https://turistautak.hu/
- MerreTekerjek (merretekerjek.hu) - Base layer - https://merretekerjek.hu/
- Google Satellite - Base layer - https://developers.google.com/maps/documentation/tile/satellite
MIT License
Copyright (c) 2020-2023 Roland Mostoha
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.