The starting point
The client synced survey projects through a PowerShell tool of about 1,400 lines, run on Windows laptops against a locally mounted cloud folder. Their field controllers run Android. So every sync meant a trip back to a laptop.
How I approached it
- Prove the risky part first. A throwaway spike confirmed the app could read the survey software’s project folders under Android’s scoped storage before any real code was written.
- Reverse-engineer before porting. Five planning documents took the script apart: its sync logic, data structures, workflows and the unwritten rules it encoded.
- Keep the domain rules. Some survey files are compared by size, because the survey software appends to them. Timestamps get a two-second tolerance. Scan data is excluded. A backup is taken before anything destructive.
What shipped
- Sign-in through the client’s Microsoft identity with OAuth 2.0 and PKCE.
- Push, pull and two-way “newer wins” sync, per file or per project, with progress, cancellation and chunked uploads for large files.
- Versioned backups with a 90-day purge and restore.
- The full project lifecycle: create, upload, archive, reactivate, remove.
- An in-app updater that pulls new signed builds from a shared folder.
- An offline banner, a first-run setup wizard and a folder browser.
The hard part was never the sync code. It was understanding the field process well enough to know what was safe to change.
Hand-off
The client received the signed release, the source, and a publishing guide covering keystores, signing, versioning and troubleshooting, so the release process is written down, not held in one person’s head.