Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

Help for owners

My app does not work without internet

Short answer

An app works offline only if it keeps a copy of the data on the phone and syncs later. Android's guidance calls this offline-first, with a local database as the source of truth. Decide first what users must be able to do without signal, because reading offline is much simpler than writing offline.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Does this sound like your situation?

  • Users see a blank screen or an error when the signal drops.
  • Field staff work in places with no coverage.
  • Work entered offline is lost.
  • The app reloads everything each time it opens.
  • My developer says offline mode is a big change.

Why does this happen?

  1. The app talks to the server for every screen

    A normal app asks the server each time and has nothing to show without it. Network availability is not always there, because of limited bandwidth or short interruptions such as an elevator or a tunnel.

  2. There is no local copy of the data

    Android's offline-first guide says an offline-first app needs at least one data source that does not need the network, and that at minimum it must be able to read without network access.

  3. Writing offline is harder than reading

    The guide notes that writing data offline needs more thought than reading because of conflicts. When two devices change the same record, the app needs a rule, and a common one is last write wins.

  4. Some services already do part of the work

    Cloud Firestore keeps a local cache and, on Android and Apple platforms, offline persistence is on by default, while for web it is off by default. Writes made offline are queued and synced when the device reconnects.

What can I do about it today?

  1. List what must work without signalViewing a list, filling a form, taking a photo. Each one has a different cost, so be specific.
  2. Decide what happens to conflicting changesIf two people edit the same record, who wins? This is a business rule, and you are the right person to set it.
  3. Ask what the app stores todayWhether a local database already exists decides how big the job is.
  4. Do not promise offline to customers yetWait until a developer has told you what is feasible for your app.
  5. Think about sensitive dataAnything stored on the phone is on the phone. Say which data should never be kept offline.

When should I bring someone in?

  • Lost offline work costs you money or trust.
  • Your staff work in places without signal.
  • Your app handles payments or stock and must never double-count.

How do I handle it?

  1. Agree the offline scope in writingI list which screens read and which write offline, and what happens on conflict. I write it down before building.
  2. Add the local data layerI add a local database as the source of truth and have the app read from it.
  3. Build the sync carefullyWrites are queued and sent when the network returns, with clear handling for failures and repeats.
  4. Test with the signal offI test by switching airplane mode on and off during real tasks, then check nothing is lost or duplicated.

The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.

What do owners ask about this?

Can every feature work offline?

Not always. Some tasks, such as a payment, need the server in real time, and the app should say so clearly.

Does Firebase do this for me?

Cloud Firestore offers offline persistence, on by default on Android and Apple platforms. It helps if your app already uses it, but it does not decide your business rules.

What if two people change the same record?

The app needs a conflict rule. Last write wins is common but it can overwrite someone's work, so choose deliberately.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.