From an Android app to a cross-platform Flutter project
The project began as AndroidPrayerTimesApp. The current development effort re-engineers the application in Flutter under the Salawat / Salawat Quran identity, targeting Android and iOS from a shared Dart codebase. The goal is not simply to make the same screen appear on two platforms: platform conventions, background behavior, permissions, audio and release packaging all need deliberate attention.
The UI is being adapted to use Material-style controls on Android and a Cupertino-first experience on iOS. Shared domain logic stays in Flutter, while platform-specific behavior is handled through the relevant Flutter plugins and native project configuration.
What the application brings together
The Flutter application uses local storage for preferences and reading state. Prayer calculations and the bundled Quran reading experience are designed to work without a runtime prayer API. Optional location access improves convenience, but the core reading experience remains available offline.
Making scheduled Athan reminders dependable
Notifications are one of the most important parts of a prayer application—and one of the easiest features to get wrong. A reminder that works only while the app is open is not enough. The implementation work covers notification permissions, timezone-aware scheduling, local audio assets, and the lifecycle events that can invalidate scheduled alarms.
- Schedule prayer reminders locally rather than requiring a remote push service for the core alert.
- Bundle the Athan audio files with the application, including the Fajr Makkah recording, and verify that the release package actually contains them.
- Handle timezone configuration and rescheduling so reminders remain aligned with local prayer times.
- Check Android and iOS separately because their notification permissions, sound packaging and background execution rules differ.
The CI workflow explicitly checks that azan_fajr_makkah.mp3 is present in the Android APK and that the prepared iOS notification sound files are copied into the iOS application bundle. This catches packaging mistakes before a build is treated as ready.
One codebase, two platform experiences
Flutter makes it possible to share application logic, but a good cross-platform app should not force identical interaction patterns everywhere. The project uses adaptive controls and page scaffolding to respect platform expectations: Material behavior on Android and Cupertino presentation on iOS.
Arabic is a first-class part of the product. The app includes Arabic right-to-left layouts and English localization, with the Quran font and page assets bundled locally. That requires checking more than translated labels: navigation order, alignment, text direction and reading typography all affect the experience.
Key design decision: share the business logic and data, adapt the presentation and native integrations. Cross-platform should mean consistent capability—not identical UI at the expense of platform usability.
Testing the app beyond “it builds”
A successful Flutter build proves that the project compiles. It does not prove that the application installs, opens, stays alive, or that the expected audio files made it into the release artifact. The CI workflow therefore separates static checks, unit/widget tests, platform builds and an Android emulator smoke test.
flutter analyze and flutter test run on the Flutter application.The workflow also prepares the iOS notification sounds and configures the iOS WidgetKit and Apple Watch companion targets. Those platform artifacts need their own build and packaging checks; an Android success cannot stand in for an iOS verification.
Debugging the Android emulator setup
The emulator smoke test exposed two infrastructure problems that were unrelated to Flutter application code.
1. No hardware acceleration on the hosted runner
The first emulator attempt stopped because the GitHub-hosted Linux runner did not provide the hardware acceleration expected by the emulator. The workflow was adjusted to permit software CPU emulation through ANDROID_I_WANT_MY_TCG=yes and to allow a longer boot timeout. This makes the test slower, but lets the Android 13 API 33 emulator start in an environment without KVM acceleration.
2. The emulator action split a multi-line shell script
After the emulator booted, the smoke test failed with:
/usr/bin/sh: 1: Syntax error: end of file unexpected (expecting "fi")
The cause was the way the emulator action executed its script input: compound shell logic was being split across shell invocations, so an if block did not arrive with its matching fi. Moving the complete smoke test into a checked-in Bash script ensures variables and control-flow blocks run in one shell process.
The workflow now calls the standalone script as one command:
script: bash "$GITHUB_WORKSPACE/.github/scripts/android-emulator-smoke.sh"
The script anchors the APK path to GITHUB_WORKSPACE, checks that the file exists, waits for Android to finish booting, installs the release APK, launches the application and checks that its process and foreground activity remain alive. It then scans logcat for fatal exceptions, native fatal signals and ANRs.
Lesson learned: a green build is not a launch test. Keep emulator smoke-test logic in a real script file, execute it in one Bash process, and make artifact paths independent of the action's working directory.
Current verification status
What has been confirmed: earlier CI runs passed Flutter analysis/tests and the Android/iOS build steps; the Android 13 emulator successfully booted. The APK-path and shell-execution fixes have been committed to the feature branch.
What is still pending: a fresh workflow run must confirm that the updated standalone script installs the APK and launches the app successfully. The emulator smoke test is not being described as passed until that run completes.
Physical-device testing: emulator CI is useful for catching startup regressions, but real-device checks are still needed for exact alarms, background behavior, audio focus, compass accuracy and manufacturer-specific battery restrictions.
What this project taught me
- Offline-first design is a product decision: it reduces dependency on network availability for the app's most important daily workflows.
- Background notifications require platform-specific engineering, not just a timer in the UI.
- Cross-platform UI needs adaptive design, localization and RTL validation—not just a shared widget tree.
- Release verification should inspect the artifact and launch the app, not stop at compilation.
- CI infrastructure failures should be isolated from application failures before changing production code.
Explore the project
Salawat is an ongoing personal engineering project. The repository contains the Flutter application, platform setup, bundled assets and CI workflow.