plugins { id("common-conventions-app") } launcherIcon { symbol = "my_location" } android { defaultConfig { applicationId = "com.vayunmathur.networklocation" } } androidComponents { onVariants { variant -> variant.sources.jniLibs?.addStaticSourceDirectory( layout.buildDirectory.dir("rustJniLibs").get().asFile.absolutePath ) } } // Native code for this module, loaded as libnetworklocation.so: RANSAC + EM multilateration // device-position estimation over the resolved beacon fixes, AND the offline geocoder // search over geocoder.db. Both live in networklocation/src/main/rust/. rustNativeLib("networklocation") // The offline databases (geocoder.db, wifi.wpsdb up to ~2 GB, cells.wpsdb far // smaller) are NOT bundled. Shipping them as assets put a 3.5 GB APK in the MAOS system image, // which pushed the factory install zip past fastboot's 4 GiB zip limit. They are downloaded to // device-protected storage on request instead — see OfflineDatabases.kt. Until they arrive every // lookup misses, which the readers already treat as "no data": beacons stay unresolved and no // position is reported, and the geocoder reports itself unavailable. dependencies { // Compile-only stubs for the framework's unbundled provider API (com.android.location.provider). // Provided at runtime by ; must NOT be packaged. compileOnly(project(":library:locationprovider")) // Reporting loop + IO for the offline database fetch. implementation(libs.kotlinx.coroutines.android) // Resumable, checksummed, unmetered-only fetch of the offline databases, which are no // longer bundled (see OfflineDatabases). Also supplies the progress UI on the status screen. implementation(project(":library:downloadservice")) // The offline geocoder search runs natively (Rust/ruzstd) over geocoder.db; there is no // Kotlin-side DB code, so no zstd-jni / serialization deps are needed here. }