Back to the blog

Designing a mobile app that works in West Africa

An app that works on a fiber-optic connection in Cotonou won’t necessarily work in Parakou on a 2019 Android device with intermittent 3G connectivity. Here are the practical techniques—file size, caching, offline-first design, and queues—that make a difference in the field.

Designing a mobile app in West Africa means, first and foremost, accepting that the development conditions bear no relation to the conditions of use. The testing phase goes smoothly. The app runs on the developer’s phone—connected via fiber in an air-conditioned office—on a two-year-old device with 8 GB of RAM. Everything responds in less than a second. Three weeks later, the sales rep testing it in Parakou can’t complete an order: the loading screen spins, the connection drops from 3G to nothing, and when it comes back, the form is empty. Between the two demonstrations, not a single line of code had changed: only the real-world conditions had come into play.

The problem isn’t the quality of the code. It lies in the implicit assumptions: that the network is available, that it’s fast, that it won’t drop out in the middle of a request, that the phone has enough memory, that the battery will last, and that the power will come back on. None of these assumptions are reliable here. This article lists what to do instead—specific techniques that can be applied to an ongoing project, along with the real-world cost of each.

The Real-World Context: What Does Your User Look Like?

Before the solutions, the diagnosis. The typical user of a business application in Benin, Togo, or Burkina Faso is not the one we imagine based on a mockup.

  • An entry-level device costing between 40,000 and 90,000 FCFA: 2 to 4 GB of RAM, a modest processor, and storage that’s often nearly full.
  • An older version of Android—often several generations behind—with a browser that doesn’t always support the latest APIs.
  • A data plan measured in megabytes, topped off in small increments. An app that uses 30 MB just to display a dashboard will be uninstalled.
  • A network that’s misleading: the phone shows four bars, the request is sent, but it never goes through. This is more common—and more disruptive—than having no network signal at all.
  • Power outages that interrupt data entry in progress, shut down the computer, or cut off the office router.
  • Users with limited digital literacy, for whom an unexplained technical error means “the app is broken.”

Designing a mobile app for West Africa starts with a substantial budget

On a severely degraded 3G network, the usable data rate hovers around 300 to 500 kbit/s with a latency of several hundred milliseconds. An initial load of 2 MB then takes between thirty and sixty seconds. No one waits a full minute.

So set a substantial budget right from the design phase, and treat it as a non-negotiable constraint, just like a deadline. Realistic targets:

ElementTarget
First full load of a web applicationless than 500 KB compressed
Code loaded at startupless than 150 KB compressed
Main image on a screenless than 80 KB
API response for a paginated listLess than 30 KB
Android installation file sizeless than 20 MB
Usable display on slow 3Gless than 5 seconds

The strategies for achieving this are well-known and inexpensive to implement:

  • Serve images in a modern, compressed format, in multiple sizes tailored to the actual screen size: this typically cuts the file size by half to a third compared to an uncompressed photo, with no visible loss of quality on a phone screen.
  • Load off-screen images only when the user reaches them: all browsers have been able to do this natively for several years.
  • Enable the most efficient server-side compression for all text: this typically yields a 15–20% greater reduction than default compression, without touching a single line of code.
  • Use system fonts rather than a remote font. A font family loaded from an external service requires a DNS lookup, a TLS negotiation, and adds 100 to 300 KB to the critical path.
  • Split the code by screen and load only what the currently displayed screen requires.
  • Count your dependencies. Every library added for a single function costs seconds in real-world performance. A manually formatted date is less expensive than a 70 KB library.

Offline-first: design for the absence of a network, not for its presence

The most important mindset shift: the application’s normal state is not “connected,” but “offline with synchronization pending.” An offline-first app opens, displays data, and accepts user input without a network connection. The network becomes an optional service, not a prerequisite for operation.

Reading: A cache that always displays something

In both web apps and installed apps, a local cache enables three simple strategies that can be combined. The app’s skeleton—the layout, styles, UI code, and icons—is served from the cache first, with updates occurring in the background. Business data is served from the cache and then refreshed as soon as the network responds. Non-essential resources are ignored offline rather than blocking the screen.

The key takeaway: displaying data from yesterday with the note “last updated: yesterday at 5:12 p.m.” is infinitely better than an endless loading screen. The user decides for themselves whether the data is recent enough for their needs.

Data Entry: A Queue, Not a Failed Form

This is where most applications fail. Data entered offline must be accepted, stored locally, and then replayed when the network connection is restored. In practice:

  • Store pending entries in a local queue on the device, time-stamped, regardless of the application’s chosen environment.
  • Generate identifiers on the terminal side rather than waiting for the server’s. The object exists and can be manipulated even before it has been sent.
  • Make each transaction idempotent: an idempotence key sent with the request allows the server to recognize a resubmission and avoid creating the same order twice. Without this, an unstable connection produces duplicates—the most costly issue to correct after the fact.
  • Display the status of each item: pending, sent, rejected. The user must be able to see what hasn’t been sent yet.
  • Define the conflict resolution rule in advance: last writer wins, field-by-field merge, or human arbitration. Failing to decide is the same as deciding at random.

Synchronization: Send as little as possible

Never retrieve an entire dataset every time the application is opened. Delta synchronization—where the client sends the date of its last sync, and the server returns only what has changed since then—reduces 4 MB to 20 KB. Add strict pagination, limit API responses to only the absolutely necessary fields, and prioritize the synchronization order: first pending writes, then critical data, and finally the rest.

The network doesn’t go down—it lies

A request that receives no response is harder to handle than a clear error. Three rules are enough to make an application robust in the face of this.

  • Short, explicit timeouts. Ten seconds are enough: beyond that, you must cancel and notify the user—don’t let the request keep running.
  • Randomly spaced retry attempts. Retry after 1 s, 2 s, 4 s, 8 s, with random variation, to prevent all terminals on a team from reloading at the exact same moment the network comes back online.
  • A maximum number of attempts, beyond which the request remains in the local queue and awaits manual intervention. An infinite retry loop drains the battery and uses up the data plan.

Power outages are a design consideration, not an accident

An entry interrupted by an outage and lost means a user who won’t open the app again the next day. The solutions are simple and require just a few hours of development:

  • Automatic local saving of any long form whenever a field is exited, and restoration upon reopening.
  • State restoration: the app reopens where it left off, with the data already entered.
  • Break down long operations into short steps that are validated one by one, rather than a three-minute process that a power outage cancels entirely.
  • On the server side, recoverable processes: an import of 5,000 rows that was interrupted should resume from row 3,200, not from zero.

Entry-level devices and older Android versions

A 50,000 FCFA phone does not execute the same code at the same cost as a recent model. Some practical tips: limit resource-intensive animations and complex shadows; avoid long lists rendered in full in favor of a virtualized list; do not keep large decoded images in memory, deliver to each device only what corresponds to its model rather than a single package that includes everything, and set a realistic minimum Android version rather than the latest one.

Two often-overlooked interface considerations: touch areas with a side length of at least 44 pixels, because users operate these apps while standing, walking, or using just one hand; and high contrast, because an entry-level screen in the midday sun in Cotonou displays practically nothing in light gray on white.

Mobile Money payments: where there’s no room for approximation

Payment is the moment when network instability becomes a financial issue. The golden rule: never consider a payment validated simply because the user has returned to a confirmation page. They may have closed the browser, lost network connectivity, or been redirected too early.

  • The definitive source is the server-to-server notification (webhook) sent by the aggregator, supplemented by an active verification of the transaction’s status.
  • Every transaction must include a unique reference generated by you, which is reused during each verification.
  • Explicitly include the “pending confirmation” status in the interface, with a clear message rather than a technical error.
  • Implement a daily reconciliation between your records and those of the aggregator: with Mobile Money, a few transactions per month remain in an ambiguous state, and a process is needed to handle them.

Test under real-world conditions

None of these techniques can be verified on a development machine. Acceptance testing must include, at a minimum: a test on a real, entry-level phone purchased specifically for this purpose; a test with airplane mode enabled while data is being entered; a test with network throttling set to 400 kbit/s and 400 ms latency; and a test simulating an abrupt disconnection while submitting a form. These are four scenarios; they take half a day, and they reveal more defects than three weeks of unit testing.

These four scenarios aren’t just for mobile devices. On the PÈNATO ERP system we develop at IK'ART—a web application hosted on a dedicated instance per client (and which therefore requires an internet connection to use)—we run them in the same way: instance isolation prevents an incident at one client’s site from affecting others and ensures that their data is not shared with anyone else, and write operations are designed to be resumed without creating duplicates, with server-side processing that picks up where an outage left off rather than starting from scratch. This is the lesson that can be applied elsewhere: what makes software usable under our network conditions isn’t a lightly promised offline capability, but the fact that an interrupted session never destroys the work already done. In a mobile app, this same requirement takes the form of the local queue described above.

Where to Start with an Existing App

If your app is already in production and is struggling in the field, the following approach yields the best results with the least amount of work:

  1. Measure first. Measure the size of the first page, the time it takes to display useful content on a throttled network, and the size of the three most frequently called API responses. Without baseline metrics, you won’t know if you’re making progress.
  2. Optimize images and fonts. These often account for 60% of the page weight, and this requires no changes to business logic.
  3. Add local form saving. It requires little code and has an immediate impact on user trust.
  4. Switch to a “cache-then-refresh” approach for the two or three most-viewed screens.
  5. Make write operations idempotent and queue them. This is the most labor-intensive task—do it last, but do it: it’s what eliminates duplicates and data loss.

None of the above depends on a specific development environment. These are design decisions, and they apply equally to the web and mobile, regardless of the technology your project requires—and, if you already have an existing system, to yours as well. In fact, this is the only right way to ask a service provider: not “what do you code with,” but “what happens, screen by screen, when the network goes down.”

An app that works in West Africa isn’t a stripped-down app by default. It’s an app where we’ve decided, screen by screen, what still needs to work when the network, power, and phone all fail at the same time. This decision is made during the design phase—or you’ll pay twice as much for it six months after launch.

A software project to scope?

Tell us what you need. We come back with a scope and a costed quote.

Discuss my project