An ultra-minimalist, offline-first Islamic prayer reminder, Hadith hub, and spiritual companion app for Android.
Built with pure Kotlin, Jetpack Compose (Material 3), and Jetpack Glance AppWidgets, Hayya prioritizes deterministic astronomical accuracy, Doze-resilient exact alarms, and zero telemetry.
Regional Scope — Pakistan (Larkana Division): Calibrated and verified for Pakistan, featuring complete offline directory coverage for Larkana Division (all 5 districts and 37 towns/talukas), University of Islamic Sciences, Karachi (
18.0° / 18.0°) twilight angles, and Hanafi Asr defaults.
- Core Features
- Download & Installation
- Background & Alarm Reliability
- Permissions
- Tech Stack & Architecture
- Build & Verification
- Changelog & License
- Offline-First & Private: Zero analytics, zero ads, zero trackers. All prayer times, Hijri calendar dates (
java.time.chrono.HijrahDatewith configurable -2d to +2d regional moonsighting offset for Pakistan Ruet-e-Hilal), Qibla bearings, city coordinates, and bundled starter Hadiths execute locally on-device. - Dual Astronomical Solver: Powered by Batoul Apps
adhan(1.2.1) with an offline Jean Meeus solar solver (SolarAstronomicalCalculator) fallback for extreme latitudes. - Regional Mosque Conventions (
SindhMosqueSchedule): Models Sehri Ihtiyat (10m safety window), Ishraq, Zawal, pre-Maghrib Makrooh buffers, and seasonal Summer/Winter Adhan-to-Jama'at intervals. - Larkana Division Offline Directory: Covers 37 municipal corporations, taluka headquarters, and town committees across Larkana, Qambar Shahdadkot, Shikarpur, Jacobabad, and Kashmore.
- 3-Tier Alert Pipeline: Optional 15-minute Pre-Reminder (
T0 - 15m), Main Call (T0) with lockscreenFullScreenIntentwake (usingsetShowWhenLockedwithout forcing premature keyguard unlock), and 20-minute Last Call warning (T_end - 20m). - Familiar Alarm Audio: Uses your device's default alarm tone (
RingtoneManager.TYPE_ALARM) onUSAGE_ALARM, with dedicated foreground notification IDs/actions, transientAudioFocushandling, active phone/VoIP call suppression (MODE_IN_CALL/MODE_IN_COMMUNICATION), optional gradual volume escalation (10s–30s), and smooth 2-second fade-out. - Mosque Auto-Silent (
AutoMuteManager): Automatically switches the ringer to Silent (via Do Not Disturb access) or Vibrate during Salah (15–30m) and Jumu'ah Khutbah (45–60m), saving exact prior ringer mode and stream volumes and retaining recovery state with an actionable prompt if DND access is revoked mid-window.
- Multilingual Offline Library: Bundled authentic starter Hadiths across 5 spiritual pillars (Prayer & Worship, Creed, Virtues, Manners, Quran & Tafsir) in Arabic, English, Urdu, and Sindhi, stored locally in SQLite + FTS4 (
docid-indexed updates and sanitized queries) with Noto Naskh Arabic RTL typography across Hadith, Dua, Takbirat, Tasbih, and Wake views. - Optional On-Demand Sync: Download thematic packs from HadeethEnc.com (with resumable page tracking and Sindhi support) or full canonical Hadith collections (40 Nawawi, 40 Qudsi, Sahih al-Bukhari, Sahih Muslim, Tirmidhi, Abu Dawud, Nasa'i, Ibn Majah, Muwatta Malik) from
fawazahmed0/hadith-api. - WhatsApp Status Card Generator & Sunrise Reminder: Export clean
9:16or1:1PNG cards (HadithStatusCardRendererwith RTL bidi directionality and safe canvas clipping) and receive an optional daily Sunrise Hadith notification.
- Companion Suite: True-north magnetic-declination-calibrated Qibla compass (
QiblaOrientationSensor+GeomagneticField, lifecycle-aware pause/resume), tactile OLED Tasbih counter, 7-day Prayer Habits tracker, Night & Tahajjud calculator (Islamic Midnight & Last Third), Friday (Jumu'ah) checklist & Salawat counter, and Ramadan & Eid Hub (30-day timetable, fast tracker, Qadha counter, Sunnah Duas, Suhoor wake-up alarm). - 5 Jetpack Glance Home Screen Widgets:
Hayya Next Prayer(2x2) — Upcoming prayer, countdown, and window progress barHayya Full Timetable(4x2) — Dual-pane next prayer hero and full 5-prayer scheduleHayya Daily Prayers(4x2) — Interactive 1-tap prayer check-off trackerHayya Quick Strip(4x1) — Compact bar with interactive prayer completion pipsHayya Night & Fasting(3x2) — Suhoor, Iftar, Last Third (Tahajjud), and Midnight times
- In-App GitHub Releases Updater (
AppUpdateEngine): User-togglable update checker (Auto-Check Updates on Launch, disableable for strict zero-network operation) enforcing strict HTTPS GitHub host allowlisting across redirects and fail-closed SHA-256 checksum verification before guided APK installation. - Visual Craft: Pure OLED Dark (
#07080A/#000000lockscreen), Warm Sand Light (#F8F4EC), System Auto, optional Material You dynamic color (Android 12+), andtnumtabular figures for jitter-free countdowns.
- Download
Hayya-v1.1.2.apk(and optionallyHayya-v1.1.2.apk.sha256) from the GitHub Releases page. - (Optional) Verify the APK integrity before installing:
sha256sum -c Hayya-v1.1.2.apk.sha256
- Install on Android 8.0+ (API 26+):
- Open the APK on your device and allow installation from your browser/file manager, or install via ADB:
adb install -r Hayya-v1.1.2.apk
- Open the APK on your device and allow installation from your browser/file manager, or install via ADB:
- Complete the 3-step Welcome Setup to select your town in Larkana Division, choose your Asr juristic school (Hanafi or Standard), and grant Notifications, Unrestricted Battery, and Exact Alarm permissions.
- Doze Bypass (
AlarmManager.setAlarmClock): Schedules a 7-day rolling queue exclusively viaAlarmManager.setAlarmClockwith deterministic request codes:requestCode = (dayOfYear * 100) + (prayerOrdinal * 10) + tierOrdinal. - WakeLock Safety Contract:
PrayerAlarmReceiveracquires a boundedPARTIAL_WAKE_LOCKinsidegoAsync(), dispatches notifications or startsPrayerAudioService, and releases the WakeLock infinally. - Foreground Protection & Safe Shutdown:
PrayerAudioService(mediaPlayback) uses a dedicated foreground notification ID decoupled fromCHANNEL_MAIN_CALLalerts; an optionalPinnedPrayerStatusService(specialUse) anchors the process and falls back gracefully to a static ongoing notification when Android 12–16 restricts background FGS starts from system broadcasts. - Reboot & Clock Resilience (
SystemClockChangedReceiver): Validates incoming system actions (BOOT_COMPLETED,TIME_SET,TIMEZONE_CHANGED,MY_PACKAGE_REPLACED), runs inside an 8-secondgoAsync()/WakeLockbudget, clears prior/shifted alarm windows on backward clock jumps, refreshes Glance widgets once viaPrayerWidgetReceiver, and recovers interrupted auto-mute state.
| Permission | Purpose |
|---|---|
USE_EXACT_ALARM, SCHEDULE_EXACT_ALARM (maxSdkVersion="32") |
Exact prayer, Suhoor, Tahajjud, and auto-unmute scheduling |
WAKE_LOCK, RECEIVE_BOOT_COMPLETED |
CPU retention during dispatch and post-reboot rescheduling |
USE_FULL_SCREEN_INTENT |
Lockscreen wake screen (PrayerWakeActivity) |
POST_NOTIFICATIONS |
Prayer alerts, pre-reminders, and ongoing status (Android 13+) |
VIBRATE |
Haptic feedback and vibrate-mode auto-mute |
ACCESS_NOTIFICATION_POLICY |
Optional Mosque Auto-Silent Do Not Disturb control |
FOREGROUND_SERVICE (MEDIA_PLAYBACK, SPECIAL_USE) |
Active alarm playback and optional pinned status notification |
REQUEST_IGNORE_BATTERY_OPTIMIZATIONS |
Battery optimization check and OEM exemption shortcut |
INTERNET |
Optional GitHub Releases update checks and on-demand Hadith library sync |
REQUEST_INSTALL_PACKAGES |
User-initiated in-app APK installation from GitHub Releases |
Hardware features android.hardware.sensor.compass and android.hardware.sensor.accelerometer are declared with required="false" for the offline Qibla compass.
- Language & Build: Kotlin
2.0.21, Android Gradle Plugin8.7.2, JDK 17,minSdk 26/targetSdk 36/compileSdk 36 - UI & Widgets: Jetpack Compose (BOM
2024.10.01, Material 3), Jetpack Glance1.1.1 - Persistence & Time: Jetpack DataStore Preferences
1.1.1, SQLite + FTS4,kotlinx-datetime0.6.0,kotlinx-coroutines1.8.1 - Astronomical Engine:
com.batoulapps.adhan:adhan:1.2.1
core/src/main/kotlin/dev/hayya/core/
├── HayyaApplication.kt # App-scoped DataStore, engine, Hadith & updater singletons
├── data/
│ ├── hadith/ # HadithDatabase (SQLite+FTS4), sync clients & starter pack
│ ├── preferences/ # UserPreferencesRepository (DataStore)
│ ├── prayerlog/ # PrayerLogRepository (7-day prayer habit history)
│ └── ramadan/ # FastTrackerRepository (fasting log, Qadha & Suhoor)
├── domain/
│ ├── calculation/ # Astronomical calculators, PrayerCalculationEngine,
│ │ # NightFastingCalculator, SindhMosqueSchedule
│ ├── friday/ # FridayReminders (Surah Al-Kahf & Salawat)
│ ├── hadith/ # HadithModels, parsers, topic filter & daily selector
│ ├── model/ # PrayerModels, PreferenceModels, CityCatalog, PostAdhanDua
│ ├── prayerlog/ # DailyPrayerLog & RollingPrayerHistory
│ ├── qibla/ # QiblaCalculator (great-circle bearing & smoothing)
│ ├── ramadan/ # RamadanModels, RamadanDuasStore, EidGuide, Hijri helper
│ ├── tasbih/ # TasbihModels & milestone helper
│ └── update/ # UpdateModels, SemVer comparator & SimpleJsonParser
├── system/
│ ├── alarm/ # PrayerAlarmScheduler (7-day setAlarmClock queue)
│ ├── audio/ # PrayerAudioService & AutoMuteManager
│ ├── hadith/ # HadithStatusCardRenderer (PNG share cards)
│ ├── notifications/ # PinnedPrayerStatusService
│ ├── oem/ # OemPowerManager (battery & autostart settings)
│ ├── receivers/ # PrayerAlarmReceiver & SystemClockChangedReceiver
│ ├── sensor/ # QiblaOrientationSensor
│ ├── ui/ # PrayerWakeActivity (lockscreen wake host)
│ └── update/ # AppUpdateEngine (GitHub Releases & SHA-256 verifier)
├── ui/
│ ├── MainActivity.kt # Root navigation, permissions, updater & FGS sync
│ ├── components/ # DockedNavBar, UpdateComponents & VisualComponents
│ ├── screens/ # Dashboard, Hadith, Companion, Settings, Onboarding & tools
│ ├── theme/ # OLED Dark, Warm Sand Light, Dynamic Color & typography
│ └── viewmodel/ # PrayerViewModel & HadithViewModel (StateFlow)
└── widget/ # 5 Glance AppWidgets, receivers, updater & theme
- Android SDK: Copy
local.properties.exampletolocal.propertiesand setsdk.dirto your local Android SDK path. - Release Signing: Copy
keystore.properties.exampletokeystore.propertiesand setstoreFile,storePassword,keyAlias, andkeyPassword— or exportHAYYA_KEYSTORE_FILE,HAYYA_KEYSTORE_PASSWORD,HAYYA_KEY_ALIAS, andHAYYA_KEY_PASSWORD.
# Run all unit tests (domain, data, system, UI, widgets)
./gradlew :core:testDebugUnitTest
# Run Android Lint
./gradlew :core:lintDebug
# Assemble minified & signed release APK -> core/build/outputs/apk/release/core-release.apk
./gradlew :core:assembleRelease./scripts/verify_alarm_engine.sh- Pushes and pull requests to
mainrun:core:testDebugUnitTestand:core:lintDebug. - Pushing a
v*tag (e.g.,v1.0.0) runs verification, decodesHAYYA_KEYSTORE_BASE64, signs:core:assembleRelease, and publishesHayya-<tag>.apkandHayya-<tag>.apk.sha256to GitHub Releases. - Required repository secrets:
HAYYA_KEYSTORE_BASE64,HAYYA_KEYSTORE_PASSWORD,HAYYA_KEY_ALIAS,HAYYA_KEY_PASSWORD.
- See CHANGELOG.md for release notes.
- Copyright © 2026 dev-Aatif. All Rights Reserved. Licensed under a proprietary license — see LICENSE for full terms. Public source visibility on GitHub is provided for transparency and security inspection only and does not grant rights to copy, modify, redistribute, or publish derivative builds.