๐ค Contributing to OSMTracker
November 7, 2025 ยท View on GitHub
Thank you for your interest in contributing! ๐
Whether you're fixing a bug, adding a new feature, or improving documentation โ all contributions are welcome.
๐ Table of Contents
- ๐ฐ Before You Start
- ๐ ๏ธ How to Run the App (Setup Guide)
- ๐งช Running Tests
- ๐ Translations
- ๐งโ๐ป Git Workflow (GitFlow)
- ๐ถ New Contributor Quick Guide (For Beginners)
- ๐ Code Style & Commit Guidelines
- ๐ How to Submit a Pull Request
- ๐ฌ Community & Support
๐ฐ 1. Before You Start
- Make sure you have Git and Android Studio installed.
- Familiarity with GitFlow is recommended (see below).
- If you're new to open/free source, check out our beginner section โ
๐ ๏ธ 2. How to Run the App Locally
# Clone the repository
git clone https://github.com/labexp/osmtracker-android/
cd osmtracker-android
- Install Android Studio. - Here is the official guide on how to install it on different operating systems
- Open the IDE and click
open an existing Android Studio project, then look for the folder where you cloned the repository - Build the project (
Ctrl + F9or the ๐ ๏ธ hammer button)
๐งช 3. Running Tests
This repository has an automated way to run the tests on branches but if you already have the project installed on you computer then you can also run them from a terminal. It's recommended to run the tests locally before making a new pull request to make sure the changes doesn't break any previous functionality. You can run the tests locally as follows:
- Make sure you are at the root directory of the project
$ cd YOUR_PATH/osmtracker-android
๐ฑ Instrumentation Tests (Require Emulator or Device)
- For running instrumentation tests it's needed to previously start up an emulator (or real device), you can do it from Android Studio but also without it using the command line. For that, you need to move to the Android SDK installation directory and look for a folder called
emulatoronce there, start any already created emulator by typing:$ ./emulator -avd NAMEto start the emulator called NAME (run$ ./emulator -list-avdsfor a valid list of AVD names)- When it's up, go back to the root project folder and run the instrumentation tests with
$ ./gradlew connectedAndroidTest
โ Unit Tests
- For running the unit tests no emulator or device is needed, just run
$ ./gradlew test
- Now just wait for gradle to run the tests for you, it'll show the results of which tests passed or failed when it's finished
๐ 4. Translations
OSMTracker is translated using Transifex (see the wiki). Once translations are complete, they will be updated via automated Transifex PR.
๐งโ๐ป 5. Git Workflow (GitFlow)
We use GitFlow branching model:
| Branch | Purpose |
|---|---|
master | Stable production releases |
develop | Main development branch |
feature/* | New features |
hotfix/* | Quick fixes for production |
- If you want more information, take a look here
๐ถ 6. New Contributor Quick Guide (Beginner-Friendly)
โจ If this is your first open-source contribution, start here!
-
โญ Fork the repository
After forking, make sure your fork includes all the required branches (especially
develop, not onlymaster).You can verify this by checking the branches tab in your fork on GitHub.
-
๐ฅ Clone your fork
git clone https://github.com/YOUR_USERNAME/osmtracker-android.git -
๐ (Optional) Add upstream to stay updated
git remote add upstream https://github.com/labexp/osmtracker-android.git -
๐ฑ Create a branch
git checkout develop git checkout -b feature/your-feature-name -
โ๏ธ Make changes + commit (atomic commits)
-
๐ Push your branch
-
๐ Open a Pull Request (PR)
๐ 7. Commit Message Convention
Use clear and descriptive commit messages.
โ Good:
feat: add option to export GPX file
fix: resolve crash when no GPS signal
docs: update contributing guide
โ Bad:
update stuff
fix bug
๐ 8. How to Submit a Pull Request
- Push your changes
- Go to GitHub โ Open PR
- Fill the PR template fully
- Wait for review โ
โ ๏ธ PRs without a complete template may be rejected.
๐ฌ 9. Community & Support
- Have questions? Open a Discussion or an Issue
- (Optional): Join the contributors chat/Telegram.
Let's build something awesome together! ๐