skip to content

In a weather app, why is 'the phone is on cellular' the wrong input for data decisions, and what should replace it?

level: middleimportance: should knowfreq 42%

answer

  1. two questions, not one
  2. cost is metered or not
  3. the user can ask to save data
  4. quality is measured, not named
  5. warnings never held back by the app

basics

~20 s

Network type blends two separate questions. Cost should come from what the OS reports, whether the network is metered and whether the user asked to save data, and quality from the throughput and latency the app measures on its own requests.

solid answer

~50 s

'Cellular' answers neither question the app really has. **Cost**: Wi-Fi can be metered (another phone's hotspot, paid hotel or satellite Wi-Fi) and a cellular plan can be unlimited, so read the OS's signals: whether the network is metered, and whether the user has asked to save data, which is a direct statement of intent. **Quality**: a nominally fast network can deliver 40 KB/s in a valley, so measure throughput and latency on the app's own recent requests. Then map the pair to behaviour: on a cheap, good link load the full radar and prefetch; on a metered one fetch on demand; when the user asks to save data, no speculative prefetch, smaller radar tiles and non-urgent uploads deferred; on a slow link, the text forecast first and fewer frames. The app's own saving policy never holds back severe-weather warnings or anything the user explicitly taps.

go deeper

for a junior

Recall that Wi-Fi isn't always free, cellular isn't always slow or expensive, and the user can ask the phone to save data.

for a middle

Explain the two axes, cost from the metered and data-saving signals and quality from measured throughput and latency, and map them to concrete behaviour such as no speculative prefetch and smaller tiles.

for a senior

Cover the edge cases, such as hotspots, paid Wi-Fi and full bars on a congested cell, and the rules above the table: the app never holds back warnings or explicit taps, and the user sees why quality dropped.

for a principal

Define one network-policy layer that every feature queries instead of reading connectivity itself, so data-saving behaviour stays consistent across teams and can be audited per release.

## Network type is a proxy for two different questions A weather app asks two things before it moves data: **will these bytes cost the user something they care about**, and **how fast will they arrive**. "Is the phone on cellular?" answers neither reliably: - Wi-Fi can be **metered**: a phone tethered to another phone's hotspot, a hotel or train network that charges by the megabyte, a satellite link at a remote farm. - Cellular can be effectively **unmetered**: an unlimited plan at home. - Wi-Fi can be **slow**: a congested café or a hotel network shared by hundreds of guests. - Cellular can be **fast**, and the same network can be fast in town and crawling in a valley an hour later. One platform's networking guidance says this directly: the transport is a poor proxy for a network's bandwidth or meteredness, and an app cannot assume Wi-Fi is always unmetered or always faster than mobile. ## Cost: read what the OS reports Both native platforms tell the app about cost, in slightly different words: - **Metered or expensive.** One platform marks a network as metered when the user is sensitive to heavy use of it, whether for money, data limits or battery. The other classifies most cellular networks and personal hotspots as expensive. - **The user's data-saving choice.** Both let the user ask for less data. On one platform, with that setting on and a metered network, the system blocks the app's background data (unless the user exempts the app) and asks apps to use less in the foreground too. The other platform reports the user's low-data choice as a separate signal and recommends basing an app's policy on it rather than on the expensive flag, because it is the user's own decision. The neutral design reads both facts: the OS tells the app whether this network is metered and whether the user asked to save data. A cross-platform app reads the same two facts through its framework's connectivity layer. ## Quality: measure the link the app is actually on The OS can offer an estimate of bandwidth, but the most honest number is the app's own: the throughput and latency of its last few requests, kept as a short moving average and reset when the network changes. The weather app then decides from evidence ("the last five radar tiles averaged 40 KB/s with 900 ms before the first byte") instead of from a label. No extra test download is needed; the traffic the app sends anyway is the measurement. ## The policy table | Situation the app detects | What the weather app does | |---|---| | Unmetered, good measured link | full radar loop; prefetch the next hours with the forecast burst | | Metered, no data-saving request | everything on demand; prefetch only when context makes use likely | | User asked to save data | no speculative prefetch, smaller radar tiles and fewer frames, deferrable uploads held for later | | Slow measured link, any cost | text forecast first, radar at lower quality, nothing optional in the same burst | | No network | the cached forecast with its age; nothing hunts for a signal | Two rules sit above the table: 1. **Safety and explicit requests win.** The app's own policy never holds back a severe-weather warning or anything the user explicitly asks for on this screen; at most it lowers the quality. What the OS itself blocks in the background is outside the app's control, which is one reason warnings arrive by push. 2. **Say what changed.** A banner such as "Saving data: radar at lower quality, tap to load full" keeps the user in control and explains why the map looks coarser. ## Where the edges are - Which exact image size or video rendition a lower-quality mode requests is the media pipelines' decision; this design decides *when* to ask for less. - The connectivity API a particular framework exposes, and how to read it, belongs to that framework's networking topic. - Testing the app over a slow or lossy link is a test-design subject; the design here is what the app does once it knows the link is slow. ## What a good answer sounds like A junior answer says "don't download big things on cellular". A middle answer separates cost from quality, names the metered and data-saving signals, and refuses to treat Wi-Fi as free. A stronger answer adds the measured link, the rule that the app never holds back warnings or explicit taps, and a visible explanation for the user.

  • The user has the OS's data-saving setting on but taps 'Load full radar'; what should the app do?
    Load it. The setting expresses a default, and an explicit tap on this screen is a more specific request. Fetch the full loop once, for this view, without switching prefetching back on, and keep the saving behaviour for everything speculative. The same principle covers severe-weather warnings: the app's own saving policy never holds back what the user needs or explicitly asks for.
  • How should the app measure link quality without spending more data on tests?
    Use the traffic it sends anyway: record bytes, elapsed time and time to first byte for each response, and keep a short moving average per network that resets when the network changes. A separate speed-test download burns the very data the user is trying to save, and a single measurement goes stale as the phone moves.
  • On a phone tethered to a friend's hotspot, what does the app see and do?
    The connection looks like Wi-Fi, but the OS can report it as metered or expensive because it rides someone's cellular plan. The app treats it as metered: no speculative prefetch, radar on demand. It is exactly the case a Wi-Fi-means-free rule gets wrong.

  • Wi-Fi is free, so anything goes once the phone is on Wi-Fi.
  • The data-saving setting only concerns background traffic, so the foreground can ignore it.
  • Network type tells you bandwidth: Wi-Fi is fast and cellular is slow.
  • Full signal bars mean the link is fast right now.
  • In data-saving mode, block every request, severe-weather warnings included.