📱MobileYear: 2025Maintained

MagicWatch

A comprehensive Islamic assistant for Android — prayer times, azan, Qur'an, Jalali clock, AOD and weather.

KotlinJetpack ComposeClean ArchitectureHiltRoomMedia3 ExoPlayerRetrofitWorkManager

What it is

MagicWatch is a complete Android companion for everyday Islamic practice, designed around simplicity, beauty and reliability. It combines time management (Jalali calendar + clock), precise prayer times, azan playback, Qur’an audio streaming, an always-on lock-screen display and a floating clock — all in one Material-3 Compose app.

The codebase follows Clean Architecture: data (Room, DataStore, Retrofit), domain (models, repositories, use cases) and presentation (Compose UI) are strictly separated across 62 Kotlin files.

Feature highlights

  • Jalali clock & calendar — hand-rolled JalaliCalendar.kt conversion, with widgets.
  • Prayer times — computed locally with global and local calculation methods (Tehran, ISNA, MWL, …), stored in Room (PrayerTimeDao) and cached for offline use.
  • Smart azan playback — Media3 ExoPlayer with top reciters; volume handling tuned for azan.
  • Qur’an player — direct streaming of surahs with reciter selection (via Retrofit + ExoPlayer).
  • Always-On Display (AOD) — lock-screen overlay with the time & date, double-tap to wake and pixel burn-in protection.
  • Floating clock — a persistent overlay (time, date, weather) drawn above other apps.
  • Task manager — prioritized daily TODO list with smart reminders (Room + WorkManager/AlarmManager).
  • Weather — current conditions, temperature, humidity and wind via a weather API with custom DTO mapping (CustomWeatherResponse).
  • Personalization — 4 themes (Default, Cyrus the Great, Islamic, Iran flag), custom background, Glass Morphism effects and 3D animations (AnimationExtensions.kt).

Architecture (from the source)

com.magicwatch/
├── core/            # audio player, location, permissions, JalaliCalendar, constants/utils
├── data/
│   ├── local/       # Room (MagicWatchDatabase, DAOs, entities) + DataStore settings
│   ├── remote/      # GeoApi, WeatherApi, DTOs (Retrofit + kotlinx.serialization)
│   └── repository/  # PrayerRepositoryImpl, TaskRepositoryImpl, WeatherRepositoryImpl
├── domain/
│   ├── model/       # PrayerTime, Task, Settings
│   ├── repository/  # interfaces
│   └── usecase/     # e.g. GetPrayerTimesUseCase
├── di/              # Hilt modules: Database, Network, Repository, Service
└── presentation/    # Compose screens, components, animation extensions

Dependency injection is centralized in four Hilt modules (DatabaseModule, NetworkModule, RepositoryModule, ServiceModule), which makes the app testable and swapping implementations trivial.

Key dependencies (from build.gradle.kts)

  • Core/UI: core-ktx, lifecycle-runtime, activity-compose, Compose BOM + material3, material-icons-extended, navigation-compose
  • DI: Hilt 2.51 (hilt-android, hilt-navigation-compose, hilt-work)
  • Persistence: Room 2.6 (room-runtime, room-ktx), DataStore Preferences
  • Network: Retrofit 2.11 + converter-kotlinx-serialization, OkHttp (+ logging), kotlinx-serialization-json
  • Async: Coroutines; Scheduling: WorkManager + AlarmManager
  • Audio: Media3 exoplayer / ui / session
  • Config: compileSdk 35, minSdk 26, Java 17, Compose compiler 1.5.14

Getting started

# open in Android Studio, then:
./gradlew assembleDebug
# install on a device/emulator (API 26+)
adb install app/build/outputs/apk/debug/app-debug.apk

Why it stands out

MagicWatch is a product, not just an app: it brings together locally-computed prayer times with correct Iranian calculation methods, a real Jalali calendar, background-aware audio, and polished Compose UI with glassmorphism — all structured with clean architecture and strict lint settings (warningsAsErrors = true). It demonstrates end-to-end Android engineering: offline-first data, notifications/scheduling and careful attention to Persian UX.

More projects