Skip to content

Add Android TV app (Compose) with backend APIs, registration UI, and CI APK build - #2

Open
hafriz wants to merge 1 commit into
mainfrom
codex/build-masjid-smart-screen-system-o9pas4
Open

Add Android TV app (Compose) with backend APIs, registration UI, and CI APK build#2
hafriz wants to merge 1 commit into
mainfrom
codex/build-masjid-smart-screen-system-o9pas4

Conversation

@hafriz

@hafriz hafriz commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provide a complete Android TV frontend and Laravel SaaS backend so masjid/surau sites can self-register and pair a TV display using a unique ID.
  • Cache official JAKIM e-Solat prayer times and expose tenant-specific screen payloads so displays remain offline-first and resilient.
  • Ship a Kotlin/Compose Android app scaffold with UI states, local caching, periodic sync, and simple alert sounds for on-device behavior.
  • Add a CI workflow to automate APK builds and make the debug artifact available from commits touching Android sources.

Description

  • Added an Android project scaffold with Gradle/Kotlin DSL (android/*), AndroidManifest.xml, MainActivity.kt, Compose UI screens (SetupScreen.kt, SmartScreen.kt), audio helper (BeepSoundManager.kt), data models (PrayerModels.kt), networking (PrayerApi.kt, PrayerRepository.kt), and a PrayerSyncWorker for periodic sync.
  • Implemented Laravel backend endpoints, views, models, service, and migration to support registration and screen payloads: controllers under backend/app/Http/Controllers, models MosqueSetting, PrayerTime, ScreenContent, JakimPrayerTimeService, Blade views, API and web routes, backend/config/android.php, and backend/public/android/latest.json.
  • Added database migration 2026_07_20_000001_create_masjid_smart_screen_tables.php to create mosque_settings, prayer_times, and screen_contents tables and related casts/queries.
  • Added CI workflow .github/workflows/android-tv.yml that runs gradle :app:assembleDebug on Android changes and uploads the debug APK artifact, plus .gitignore entries and a top-level README.md describing the feature and local validation commands.

Testing

  • A GitHub Actions workflow was added that runs gradle :app:assembleDebug and uploads the debug APK artifact for commits affecting the Android files.
  • No automated tests were executed as part of this PR rollout (CI will run on repository pushes/pull requests that match the workflow triggers).

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a4b425c65c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

super.onCreate(savedInstanceState)
val store = MasjidSetupStore(getSharedPreferences("screen_setup", MODE_PRIVATE))
setContent {
SetupScreen { id -> store.masjidId = id }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Show the paired screen after saving the ID

On any Android TV after the user enters a valid Masjid/Surau ID, this callback only persists the value and MainActivity still renders SetupScreen unconditionally on every composition and relaunch. I checked the Android sources and nothing else calls SmartScreen, PrayerRepository, or starts a sync, so the app never leaves setup or loads the tenant screen payload that this flow is supposed to pair.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant