GeoLocationProvider is an Android multi-module SDK and sample app for recording, storing, exporting, and uploading location data.
At a high level, it:
- records location samples into a Room database
- optionally generates Dead Reckoning (DR) samples (requires accelerometer + gyroscope; otherwise DR is suppressed)
- exports data as GeoJSON or GPX (optionally zipped)
- uploads exports/snapshots to Google Drive (nightly backup and optional realtime upload)
Translations:
- Japanese:
README_JA.md - Spanish:
README_ES.md
- Run the sample app: start with this README, then
app/README.md. - Reuse the SDK in your own app: start with
core/README.mdandstorageservice/README.md. - Export/upload to Drive: see
datamanager/README.mdand one of the auth modules.
Prerequisites:
- Android Studio (or Gradle) with JDK 17
- Android SDK installed
- a local
secrets.propertiesfile at the repo root (not committed)- use
local.default.propertiesas a template
- use
Build and install:
./gradlew :app:assembleDebug
./gradlew :app:installDebugBasic flow in the app:
- Press
Startto run the foreground tracking service. - Set GPS/DR intervals and press
Save & Apply. - Use
Mapto visualize providers (GPS / GPS(EKF) / Dead Reckoning). - Use
Driveto sign in and set a Drive folder. - Use
Uploadto enable nightly or realtime.
Root docs:
- Repository guidelines and module responsibilities:
AGENTS.md(alsoAGENTS_JA.md,AGENTS_ES.md) - Overview:
README.md(EN),README_JA.md(JA),README_ES.md(ES)
Per-module docs (recommended for "how to use across module boundaries"):
app/README.md(JP:app/README_JP.md, ES:app/README_ES.md)core/README.md(JP:core/README_JP.md, ES:core/README_ES.md)storageservice/README.md(JP:storageservice/README_JP.md, ES:storageservice/README_ES.md)gps/README.md(JP:gps/README_JP.md, ES:gps/README_ES.md)deadreckoning/README.md(JP:deadreckoning/README_JP.md, ES:deadreckoning/README_ES.md)dataselector/README.md(JP:dataselector/README_JP.md, ES:dataselector/README_ES.md)datamanager/README.md(JP:datamanager/README_JP.md, ES:datamanager/README_ES.md)auth-credentialmanager/README.md(JP:auth-credentialmanager/README_JP.md, ES:auth-credentialmanager/README_ES.md)auth-appauth/README.md(JP:auth-appauth/README_JP.md, ES:auth-appauth/README_ES.md)
Note: module Japanese docs use the filename README_JP.md, while the root Japanese overview is README_JA.md.
Data flow:
:gpsproducesGpsObservationvalues (currently viaLocationManagerGpsEngine).:core(GeoLocationService) converts observations intoLocationSamplerows and inserts them via:storageservice.:deadreckoningcan be used by:coreto generate additional DR samples (provider="dead_reckoning").:datamanagerexports and uploads:- nightly worker: per-day ZIP to Downloads and Drive
- realtime manager: snapshot file in cache and Drive (then delete uploaded DB rows)
- Auth modules implement
GoogleDriveTokenProviderand are registered viaDriveTokenProviderRegistry.
Module boundary rule of thumb:
- Only
:storageservicetouches Room DAOs directly. - Other modules must use
StorageServiceand the documented contracts (ordering, ranges, error behavior).
local.properties(not committed): Android SDK path and local settingssecrets.properties(not committed): Secrets Gradle Plugin values, for example:
CREDENTIAL_MANAGER_SERVER_CLIENT_ID=YOUR_SERVER_CLIENT_ID.apps.googleusercontent.com
APPAUTH_CLIENT_ID=YOUR_APPAUTH_CLIENT_ID.apps.googleusercontent.com
GOOGLE_MAPS_API_KEY=YOUR_GOOGLE_MAPS_API_KEY./gradlew test
./gradlew lint- Production source files are ASCII-only to avoid encoding issues (documentation can be multilingual).
- Do not commit secrets (
secrets.properties,google-services.json, etc.).