{"id":25711345,"url":"https://github.com/lchristmann/tracker","last_synced_at":"2026-05-17T11:31:52.345Z","repository":{"id":278908045,"uuid":"937135107","full_name":"lchristmann/Tracker","owner":"lchristmann","description":"A geolocation tracker that lets you measure your location at regular intervals and send that data over the Internet","archived":false,"fork":false,"pushed_at":"2025-03-10T01:27:28.000Z","size":684,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-29T02:20:35.689Z","etag":null,"topics":["android","android-app","kotlin","kotlin-android","location-tracker"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lchristmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-22T12:23:30.000Z","updated_at":"2025-03-10T01:27:31.000Z","dependencies_parsed_at":"2025-08-28T22:36:18.148Z","dependency_job_id":"e19d9ffe-6079-4392-bcf0-00e640649994","html_url":"https://github.com/lchristmann/Tracker","commit_stats":null,"previous_names":["lchristmann/tracker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lchristmann/Tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lchristmann%2FTracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lchristmann%2FTracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lchristmann%2FTracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lchristmann%2FTracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lchristmann","download_url":"https://codeload.github.com/lchristmann/Tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lchristmann%2FTracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33136683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-app","kotlin","kotlin-android","location-tracker"],"created_at":"2025-02-25T10:33:42.512Z","updated_at":"2026-05-17T11:31:52.322Z","avatar_url":"https://github.com/lchristmann.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tracker - An Android App\n\n\u003cimg alt=\"Tracker App Icon\" style=\"float: right; margin-left: 12px;\" src=\"app/src/main/res/mipmap-xhdpi/ic_launcher.png\"\u003e\n\nThis is an Open Source Android Application, that lets you\n\n- track your location with your Android phone and \n- send that data over the Internet to a remote API\n\nThe app is embedded in a larger system, that can receive and visualize the location data in near real-time.\n\n![System Architecture](system-architecture.drawio.svg)\n\nThe project for the API can be found here: [tracker-api-aws-lambda-function](https://github.com/lchristmann/tracker-api-aws-lambda-function) (left side of diagram)\n\nThe project for the website can be found here: [tracker-website](https://github.com/lchristmann/tracker-website) (right side of diagram)\n\n\u003e Platform requirements: API-level 29, i.e. Android 10 (released in September 2019) or newer.\n\u003e\n\u003e **Usage of the application:**\n\u003e - when prompted, grant permissions for location and when forwarded to the Settings, **for location select \"Allow all the time\"** for background tracking to work.\n\u003e - grant both coarse and fine location\n\u003e - **uncheck the \"Pause app activity if unused\"** - just to be sure\n\n## The App's Architecture\n\nThe app uses the [MVVM (Model View ViewModel) Architecture Pattern in Android](https://www.geeksforgeeks.org/mvvm-model-view-viewmodel-architecture-pattern-in-android/) for structure (that's the top half of the diagram).\n\nThe database part is implemented with the recommended [Room database persistency library (using the Repository pattern)](https://medium.com/swlh/basic-implementation-of-room-database-with-repository-and-viewmodel-android-jetpack-8945b364d322) that [provides a powerful abstraction layer over SQLite](https://developer.android.com/training/data-storage/room) (that's the bottom half).\n\n![App Architecture](app-architecture.drawio.svg)\n\n## The Directory Structure\n\nThe classes displayed in above architecture diagram are organized into a proper folder structure:\n\n```text\n.\n├── api\n│   ├── LocationUploadRequest.kt\n│   └── TrackerApiService.kt\n├── data\n│   ├── LocationDao.kt\n│   ├── LocationDatabase.kt\n│   ├── LocationData.kt\n│   ├── LocationEntity.kt\n│   └── LocationRepository.kt\n├── LocationWorker.kt\n├── MainActivity.kt\n├── screens\n│   ├── HomeScreen.kt\n│   ├── LocationsScreen.kt\n│   ├── LocationsViewModel.kt\n│   ├── MapScreen.kt\n│   └── TrackingViewModel.kt\n└── utils\n    └── LocationUtils.kt\n```\n\n## How does the Location Tracking work\n\nThe location tracking works by utilizing the [Fused Location Provider API](https://developers.google.com/location-context/fused-location-provider) for Android.\n\n![Fused Location Provider Funktionsweise](https://heise.cloudimg.io/v7/_www-heise-de_/imgs/18/3/6/9/6/1/2/4/MicrosoftTeams-image__6_-fe0435ee6265148b.png?force_format=avif%2Cwebp%2Cjpeg\u0026org_if_sml=1\u0026q=85\u0026width=610)\u003cbr\u003eImage source: heise online Artikel \"[50 Jahre Notruf: So ortet die Leitstelle Ihr Mobiltelefon](https://www.heise.de/hintergrund/Notruf-112-So-ortet-die-Leitstelle-Ihr-Mobiltelefon-7490400.html?seite=5)\".\n\nAs shown by default this uses Google Play Services, but for the de-googled operating system eOS, this is replaced by [MicroG](https://community.e.foundation/t/discover-microg-and-what-it-is-used-for/43418), which is an open source implementation of the Google Play Services.\n\n## Details\n\nThe app tracks the location every 15 minutes in the background and tries to upload all locations that have not been uploaded yet on those occasions.\n\nThere's also a button to track the location once immediately and try to upload all local locations.\n\nThen there are two activities (\"screens\") for visualization:\n\n- a list view of the last 50 tracked locations\n- a map view of the last 50 tracked locations (implemented with [OSMDroid](https://github.com/osmdroid/osmdroid), see [docs are here](https://github.com/osmdroid/osmdroid/wiki#kotlin))\n\n### App Icon\n\nThe app icon is currently configured [like this](https://icon.kitchen/i/H4sIAAAAAAAAAzWQMY%2FDIAyF%2F4tvzcI1WbJ2uPWk63Y6nSA2BJXEKZBWVdX%2FXjttFzAffu%2BBb3C2aaUC%2FQ3Q5uNhpImg9zYVasCFPSfO0MPHznfGddCAD%2FsUF5urSgrJBkjerqnKZRx4FuAn%2FA%2FMCHftP1wXsYThJVPbFwrZYqT5yb7eB%2FEdNNZobmvQeC8NG%2FpU5HDXehJk55DEpu22mG%2BLGOeg8soL9KZtIMcwiqGWjmvl6Vkn8hsVnQs%2Fo90eU05rzIMYCp0Y16RT%2BZUQzBxRP8dF1gs5%2BLs%2FAFGiSo84AQAA) thanks to the [IconKitchen App Icon Generator](https://icon.kitchen).\n\n## Development Notes\n\n- add the API_KEY for the Tracker API to your `local.properties` file as shown below.\u003cbr\u003eThe implementation was done following Philipp Lackner's tutorial [How to Hide \u0026 Protect API Keys in Your Android App](https://www.youtube.com/watch?v=-2ckvIzs0nU) and this Medium article [How to safely store API keys in Android project](https://medium.com/@darayve/how-to-safely-store-api-keys-in-android-project-a-straightforward-guide-22c7fffd95e7).\n\n```text\nAPI_KEY=api-key-here\n```\n\n- use a new Android Studio with the new UI (made by JetBrains)\n- use Logcat, Build and App Inspection to get insights (bottom left bar)\n  - under App Inspection there's Database Inspection\n    - have the \"Keep database connections open\" option selected there, so you can keep inspecting the database when the app has closed\n  - under App Inspection there's Background Task Inspector -\u003e view my WorkManager Tasks and their status\n- when having changed the LocationEntity (or in general the database schema), you must go to the device's Settings \u003e Tracker (App) \u003e Storage \u003e Delete all storage (else the Room database will crash again and again, because it can't cope with the inconsistency of a changed schema)\n- for debugging SharedPreferences: you can go in the top right bar to \"Device Manager\" and then 3 dots \u003e Open in Device Explorer \u003e /data/data/com.lchristmann.tracker/shared_prefs/tracking_prefs.xml and download that file (there you can see the current value of `isTracking`)\n- `./gradlew clean build`, `./gradlew --version`, `./gradlew --warning-mode all`, `./gradlew build -stacktrace`\n\n## Release\n\n1. In Android Studio click on \"Build\" \u003e \"Build App Bundle(s) / APK(s)\" \u003e \"Build APK(s)\".\n2. Once done, a notification will appear saying: \"Build completed successfully for 1 module: Module 'Tracker.app': locate or analyze the APK.\" \u003e click on \"locate\"\n\nThat's the installable APK right there (in the `app/build/outputs/apk/debug/` folder).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flchristmann%2Ftracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flchristmann%2Ftracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flchristmann%2Ftracker/lists"}