Weekly Weather 4.0: From the Weather Now to Tonight's Sky
- tags
- #Android #Kotlin #Jetpack-Compose #Weather #Open-Source #Development
- published
- reading time
- 6 minutes
Weekly Weather 3 gave the app a radar map. 4.0 is the biggest update it has had: the weather card became four pages you swipe through, from the weather now to tonight’s sky, and the map got a rain forecast, labels for every city and a layer for dark skies. It went to Google Play today.
One card, four pages
The card at the top now swipes between four pages, and the rows below it change with it.
Now is the card it always was, with what was missing added: feels-like, the chance of rain, the wind’s direction, and a strip that says when rain starts in the next two hours.
Week shows every day’s low and high as a bar on one scale shared by the whole week, so a warm Tuesday stands out from a cold Friday at a glance. Below it, each day’s temperature is drawn hour by hour, night shaded.
Day is about the sun. The card has a big sun with the cloud over it, how long the day is and whether it’s getting longer, the UV peak, the golden hours, the air quality and the strongest pollen. Each day’s row draws the sun’s path across the sky, golden hours at both ends, and the cloud at three heights: low cloud hides the sun, high cloud only veils it.
Night is the page I wanted most. The moon in tonight’s phase, lit from the side it really is for your place and hour, moonrise and moonset, the dark hours, and what the sky will show you: the Milky Way, only bright stars, or nothing much. Each night’s row runs from sunset to sunrise, with the moon’s arc and stars that fade as the moon rises, cloud rolls in or a city’s glow takes over. The whole screen turns to night as you swipe to it.
Tap an hour on any row, or drag along it, and the card moves through the hours with your finger. The Day and Night pages have a key that explains how their drawings work, with a small drawing beside each line.
The map
Every layer now labels the place you’re looking at and the main cities around it with what that layer shows: the temperature and sky, the rain rate, the wind, or how dark the sky is. A long press anywhere opens that place’s weather.
Rain carries on past the radar: after RainViewer’s last frames come six hours of forecast rain from Open-Meteo, on the same timeline. Wind is the animated particle map from 3.x. Light pollution is new, from the World Atlas of Artificial Night Sky Brightness, and the same data dims the stars on the Night page.
There’s a new light theme in the dark theme’s blue, the map follows the app’s theme, and on a tablet the card sits beside the rows.
Things that were harder than they looked
- Free weather has limits. Everything comes from Open-Meteo’s free API, which allows so many requests a minute, an hour and a day. A rain forecast over a map is a grid of points, and a careless grid spends a day’s allowance in an hour. The grid is as coarse as the view is large, twice as fine only where it rains, and finer again only where that found detail the coarser one missed, so a whole continent costs about as many requests as a city. The forecast, the map and the search share one budget, a request only counts once Open-Meteo has answered, and the map shows how much is left when it runs low.
- Open-Meteo’s clock doesn’t change. It gives every time in the forecast in one fixed offset, so after the clocks go back, the sunrise it gives for next week is an hour off the clock on your wall. The moon, the golden hours and the dark hours are worked out on the phone with Astronomy Engine, and all of it now runs on Open-Meteo’s offset so the sky lines up with the hours drawn under it.
- The midnight sun broke everything. Under the midnight sun, Open-Meteo says the sun rises at midnight and sets at midnight the next day; in the polar night, it rises and sets at the same instant. The first made every forecast fail to load, and the second drew the day as a line of zero length. McMurdo’s live forecast showed exactly what comes back, and Svalbard, northern Norway and Alaska now get their weeks of endless day and night.
- Reading rain back from a picture. The radar is just coloured tiles, but a label wants a number. The labels read each city’s pixel from the tiles the map has already loaded and turn its colour back into a rain rate, without fetching anything new.
- The world’s night sky in 4 MB. The atlas packs the night-sky brightness of every cell on Earth into four bits, so the map layer and the night rows need no network at all.
- A release build that crashed. Every library module also ran its own R8 shrinking pass in release builds, and that pass can’t see the calls from other modules. It quietly removed the light pollution atlas’s one public method, so the first 4.0 release build crashed on every forecast while the debug build was fine. I caught it taking the store screenshots from a release build. 4.0 shipped with a keep rule, and the next version only shrinks the app as a whole.
Privacy
There are no accounts and no ads, and your saved places and settings stay on your phone. Your location goes to the services that show its weather and its map: Open-Meteo, RainViewer and Google Maps.
4.0 also reports its own crashes, to a GlitchTip server I run, the same way as sBrowser and Gas On Route: no breadcrumbs, no screenshots, no time zone, and anything that looks like a coordinate or a place name is stripped from error messages before a report leaves the phone.
And one I’m not proud of: the usage statistics in 3.x included the map’s GPS position, what you searched for and the names of your places. 4.0 doesn’t send any of them. My Umami server now only sees which screens and features are used. The new privacy policy says what goes where.
How it’s built
Same architecture as before: MVI with a pure state reducer per screen, Koin, Room, Retrofit and Moshi, and Jetpack Compose throughout. Place search moved into its own module so the weather screen and the map share it, and crash reporting got one too, so it’s now ten modules. 3.1.5 had 168 Kotlin files and 10 test files; 4.0 has 252 and 34, with 174 unit tests, most of them for the sky: polar days, clock changes, the night already under way at midnight, and golden hours that last until midnight in a Reykjavík June.
All 35 languages got every new string, including the keys that explain the Day and Night pages.
Built with Claude Code
Like sBrowser 5.0, Gas On Route and Hyprr, 4.0 was built in close collaboration with Claude Code. I decided what the app should show and how it should look, tried every build on my phone and sent plenty of it back; it did much of the typing and the astronomy, reviewed the release with a handful of review agents before I shipped it, drove the emulators for the store screenshots, translated the store listing and filled in the Play Console forms.
Try it
Weekly Weather is free on Google Play, and open source under the MIT licence on git.codeskraps.com. The project page has more screenshots.