Android weather app built with Kotlin and Jetpack Compose.
This project started as a university mobile development project and has since been cleaned up, debugged, and visually refreshed to work better as a portfolio piece. The app fetches forecasts from SMHI's open weather API, supports place search, favorites, and location-based lookup.
- Forecast lookup by latitude and longitude
- Current location support
- Search for places by name
- Save and remove favorite places
- Fallback to locally saved forecast data when a refresh fails
- Forecast UI with weather summary cards and symbol-based status
- Kotlin
- Jetpack Compose
- Material 3
- Android Navigation Compose
- Hilt for dependency injection
- Retrofit + Gson for networking
- Kotlin coroutines
- SharedPreferences + Kotlin serialization for simple local persistence
- Google Play Services Location
Weather forecasts are fetched from SMHI Open Data.
- Forecast API:
SNOW1gv1 - Search source: SMHI place search endpoint
- Home: enter coordinates manually or use current location
- Search: search for a city or place and open its forecast
- Weather: see a highlighted current forecast and upcoming forecast entries
- Favorites: keep frequently used places one tap away
- Android Studio
- Android SDK 34
- JDK 11
From the project root:
./gradlew assembleDebugOn Windows:
.\gradlew.bat assembleDebug./gradlew testDebugUnitTestThe app requests:
INTERNETACCESS_NETWORK_STATEACCESS_FINE_LOCATIONACCESS_COARSE_LOCATION
Location permission is only used to fetch the user's current coordinates for weather lookup.
- The app was updated to SMHI's newer forecast API after the older forecast endpoint was retired in March 2026.
- Forecast times are formatted from UTC to local device time.
- If a live refresh fails but cached weather data exists, the app shows the saved result instead of leaving the screen empty.
- Add screenshots to this README
- Replace generic Material icons with custom weather illustrations
- Localize UI text with string resources
- Add richer forecast details such as precipitation probability and humidity
- Add widget support or a compact "today" view
This is an active portfolio project and a good example of:
- Android UI built with Compose
- API integration and migration work
- iterative refactoring of an older student project
- improving reliability, UX, and presentation quality over time