Mitra: branded notification sound (halobestie_notif.ogg)

Drops the system notification ding for incoming mitra FCM (Curhat Baru,
Permintaan Perpanjang) and plays the HaloBestie audio mark instead.

Source: a 2.8s mono AAC inside a 3GPP container the user supplied;
converted to 32 KB OGG (Vorbis q5) for Android since the channel-sound
API needs `res/raw/<name>.<ext>` and OGG is the smallest universally
supported short-sound format on Android 5+.

- mitra_app: bump notification channel ID from `chat_messages` to
  `halobestie_chat_v1` (Android binds channel sound at create time
  on API 26+, so existing installs with the old channel need a fresh
  ID to pick up the new sound — can't mutate in place). Bind
  RawResourceAndroidNotificationSound('halobestie_notif') at both
  channel-create time and per-notification details (latter covers
  API 24/25 where channels don't exist).
- Backend: branch FCM `android.notification.channelId` by recipient
  type — mitras → `halobestie_chat_v1`, customers → `chat_messages`
  (unchanged). Customer app keeps system sound until/unless we ship
  a customer-side sound too.

Verified on emulator-5556 via `adb shell dumpsys notification` — the
new channel resolves to
`android.resource://com.mybestie.mitra/raw/halobestie_notif`. The OGG
ships inside the APK (32092 bytes, confirmed via `unzip -l`).

Follow-up (iOS): bundle the same sound as `.caf` under ios/Runner +
register as a Runner-target resource in pbxproj + reference filename
in the APS payload. Deferred until iOS testing comes back into scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-21 20:01:02 +08:00
parent 9fa4724b2a
commit 9de6b8a78f
3 changed files with 23 additions and 4 deletions