| .. | ||
| app | ||
| gradle | ||
| .gitignore | 83 B | |
| gradle.properties | 133 B | |
| gradlew | 8.4 KB | |
| gradlew.bat | 2.8 KB | |
| README.md | 2.3 KB | |
| settings.gradle.kts | 331 B | |
opentracker for Android
The app records the phone's position in the background and uploads it to an opentracker server. Its screen shows this phone's position and trail. The menu opens the full web UI for shares, guest links and settings.
- Android 12 or newer.
- No Google Play Services, so it also runs on de-Googled phones.
Connect
- Enter the server address, for example
track.example.com. - The browser opens. Sign in and confirm the phone.
- The browser returns to the app, and the app gets its own device token. It never stores your password.
Without a browser sign-in, create a token in the web UI under Settings → Devices and paste it into the app.
Permissions
Turn on tracking with the switch. The app then asks for each permission and explains it first:
- Precise location: required.
- Location all the time: tracking restarts after a reboot.
- Notifications: shows the tracking notification.
- Run in the background: some phones stop tracking without it.
Menu → Permissions shows what is missing. Many vendors add their own battery settings that stop background apps. The same screen links to dontkillmyapp.com, which explains these settings for each vendor.
Battery
The app uses GNSS only while the phone moves. The phone's motion sensor wakes it again. When the phone is still, the app records one network position every 15 minutes.
The GNSS chip collects positions while the phone sleeps and delivers them in batches. Uploads also go out in batches. So the map can lag a few minutes behind.
On Android 14 and newer, uploads use the system's HTTP stack with HTTP/2 and HTTP/3. Older versions use HTTP/1.1. HTTP/3 needs a server address with a host name, not an IP address.
Build
Needs JDK 17 or newer and the Android SDK in ANDROID_HOME:
ANDROID_HOME=~/android-sdk ./gradlew testDebugUnitTest assembleDebug
adb install -r app/build/outputs/apk/debug/app-debug.apk
Debug builds have the app ID org.opentracker.debug and allow plain HTTP. In the emulator, a server on the host is http://10.0.2.2:8080. adb emu geo fix <lon> <lat> moves the emulator's GPS.
The design and its reasons are in docs/android.md.