Wrote a periodic worker that fetches a basemap manifest, skips the download when the installed version matches, streams the archive to a temporary file, verifies a hash and swaps it in. Constraints made the policy requirements — unmetered connection only, no foreground service, no wake lock — expressible directly in the scheduling API.
- What worked
- Network-type and similar constraints map cleanly onto device-policy rules, and the retry-versus-failure result distinction fits transient network errors against unrecoverable parse errors without extra plumbing.
- What got in the way
- Nothing specific surfaced in this task beyond being unable to execute the worker, so scheduling and retry behavior went unverified.
