mirror of
https://github.com/PranshulGG/WeatherMaster.git
synced 2026-10-22 02:52:37 -05:00
b288db34f4c7904b06e9359084daaca8f03ba2ad
Two related device-location bugs found while investigating #1035: - WeatherViewModel only checked/refreshed the device location on manual pull-to-refresh (isManualRefresh gate), never on app-open, the 45-min auto-refresh timer, or app-resume from background. Decoupled the check from isManualRefresh so it always runs for a device-location entry, and forces a real refetch (via isForceRefresh, not isManualRefresh, which would still hit the 15-min throttle) only when the position actually moved. Also wired an immediate check into WeatherAutoRefreshForeground's existing ON_START observer, since that's the only hook that already fires on every foreground-resume, not just cold start. - DeviceLocationProvider.getDeviceLocation() still gated on the old single-provider selection (getProvider(), preferring NETWORK_PROVIDER) before ever reaching the dual-provider live-request logic added in the #938 fix. If that one provider happened to be present-but-disabled (e.g. "Device only" location mode, or no GMS/network-location backend), it failed instantly without ever trying GPS. Removed the stale gate. Tested on an AVD: reproduced #1035 (background app, move >1000m, reopen without refreshing -> location stayed stale), then confirmed the fix resolves it end-to-end (name, coordinates, and weather data all update on reopen, no manual refresh needed). Also confirmed the provider-gate fix resolves an instant "Current location not found" on a device with NETWORK_PROVIDER disabled but GPS enabled.
WeatherMaster
WeatherMaster: inspired by the Google Pixel weather app.
👁️ Screenshots
🌦️ Supported weather sources
- Open Meteo
- Met Norway
- NWS
- SMHI
- DWD
- Meteo-France
- FMI
- ECCC
- BMKG
- China
- AccuWeather
- Meteo AM
- IPMA
- WeatherApi.com
- Gismeteo
- Met Office (requires your own API key — sign up here)
- AEMET (requires your own API key — sign up here)
- IMD
- WMO Severe Weather Information Centre
- FOSS Public Alert Server
- And more to be added
Some sources need a free API key from the provider before you can select them — add yours from a location's weather source picker, or from Settings → Weather Sources → API key config.
🌐 Translate the app on Crowdin
Feel free to open an issue if you want to request a language
✉️ Contact
For any questions or feedback, feel free to open an issue on GitHub or contact pranshul.devmain@gmail.com
©️ License
This project is licensed under the GPL-3.0 license. See the LICENSE file for details.
Description
A Weather app for android with multiple sources 🌦🌞☔
androidapiipgeolocation-apijavajavascriptleafletopen-meteoopen-sourceopenweathermap-apirainvisualcrossingwebservicesweatherweather-apiwebview
Readme
GPL-3.0
442 MiB
0 Stars
1 Watchers
0 Forks





