Android

Offline first is a feature: lessons from shipping a no-account Android app

By Zuber Amin6 min read

CV Spark has no login and no server. Your résumé lives on your phone. That was a product decision before it was a technical one: a CV contains your phone number, your address and your work history, and I did not want to hold any of it.

One slot per document

The first version saved one résumé under one key. When people asked for several drafts, the lazy answer was to store a list of résumés under that same key. That means parsing every résumé to show a list of titles.

Instead, each résumé gets its own storage slot, plus a small index of lightweight metadata (id, title, template, last edited). The home screen reads only the index. A full résumé is parsed only when you open it.

Migrate on first load, quietly

Changing storage format in an offline app is scary because you cannot run a server-side migration. CV Spark checks on start-up: if the old single key exists and no slots exist yet, it moves that résumé into a new slot, writes the index and only then removes the old key. If anything fails halfway, the old data is still there on the next launch.

In an offline app the user's phone is the database. Treat every migration as if there is no backup, because there isn't one.

Render what the user can't see

One bug taught me a lot. Exported PDFs were missing icons, but only on long résumés. The capture used a RepaintBoundary inside a scroll view, which only paints what is on screen. The fix was a hidden, full-height Offstage copy of the résumé that exists only to be captured. Offline apps can't hand rendering to a server, so this kind of detail is your job.

Be honest about "offline"

CV Spark builds, edits and exports with no connection. It does hold the Internet permission, because extra fonts are downloaded from Google Fonts the first time you pick one. The privacy policy says so. "Offline" should mean your data never leaves the device, and the policy should list every exception.

Related project: CV Spark: Fifty résumé designs, fully offline, on the phone already in your hand.