Skip to content

Project · Kotlin and Android App Development

Project: Mausam, a weather app that works offline

Projectexpert· about 16 hours· 8 steps

The brief

You build Mausam, a weather app for Indian cities. It calls a real public API with Retrofit, keeps the last result in DataStore so it still shows something on a train with no signal, asks for approximate location only when the user taps a button (with a city picker if they say no), uses Material 3, and is tested, linted and signed as a release App Bundle.

Why it matters

Real apps must cope with patchy networks, users who refuse permissions and Play Store release rules. Interviewers for mid-level Android roles ask about exactly these: offline-first design, the permission flow, testing and signing. This project gives you a complete, shippable example to talk through.

Skills you practise

  • reading an API with curl
  • Retrofit with kotlinx.serialization
  • DataStore as an offline cache
  • runtime permissions with a fallback
  • Material 3 and stateless composables
  • JUnit and Compose UI tests
  • lint, R8 and a signed App Bundle

You need

  • Android Studio (Ladybug or newer) with an emulator that has Google Play services (a "Google APIs" or "Google Play" system image), or an Android phone
  • curl (built into Windows 10/11 as curl.exe, macOS and Linux)
  • adb on your PATH, or Android Studio's Terminal and Logcat windows
  • Internet access for the free Open-Meteo API (no key needed)

What you will have at the end

The Mausam app: live weather from a real API, an offline cache, a location permission with a fallback, Material 3 screens, passing unit and Compose UI tests, a clean lint run and a signed release App Bundle.

How it is marked (rubric, 100 points)
Works online, offline and without permissionLive weather loads; airplane mode shows the saved copy with its time; denying location leads to the city picker with no crash.35
Tests and checksFive unit tests and four Compose UI tests pass; lint runs clean or every warning left is a deliberate choice.25
Architecture and codeRepository, ViewModel with a sealed UiState, stateless composables, no hard-coded colours, no work on the main thread.20
Release-readyA signed, shrunk AAB; signing details kept out of Git; a README that explains the offline and permission behaviour.20

0/8 steps done

Step 1 of 8

Read the API before you code

curl returns Open-Meteo's current weather for Pune as JSON, with the temperature, humidity and weather code.

Before writing a single Retrofit line, call the API by hand and read the reply. You will see which fields exist, their names (temperature_2m, not temperature) and their types. The current block holds the values you need; current_units holds their units as text.

On Windows PowerShell type curl.exe, because plain curl there is a different command. Keep the URL in double quotes, because it contains & characters.

Run this on your machine, then paste the output below
$ curl -s "https://api.open-meteo.com/v1/forecast?latitude=18.52&longitude=73.86&current=temperature_2m,relative_humidity_2m,weather_code&timezone=Asia%2FKolkata"

Also check yourself

Your notes: libs.versions.toml, ForecastApi.kt, WeatherText.kt, WeatherRepository.kt, LocationPermission.kt, signing.gradle.kts

Write down each command you ran. It goes into your project summary.