ci(#71): change FGS type from dataSync to remoteMessaging for indefinite WebSocket listener (#162)

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-06-20 14:07:46 +03:00
1 parent 87392f5e57
commit ca21e22147
2 files changed
+12 -2

No files matched your search

+2 -2
View File
@@ -5,7 +5,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING" />
<application
android:allowBackup="true"
@@ -27,7 +27,7 @@
<service
android:name=".notification.ChatNotificationService"
android:foregroundServiceType="dataSync"
android:foregroundServiceType="remoteMessaging"
android:exported="false" />
<receiver
@@ -29,6 +29,16 @@ import kotlinx.coroutines.launch
* is backgrounded and posts a notification when a new assistant reply
* completes (MessageComplete event) while the app is not in the foreground.
*
* FGS type: `remoteMessaging` — indefinite listener that maintains a
* long-lived connection to a remote server for receiving messages. This is
* the correct type per Android 14+ policy (dataSync has a time budget and
* is intended for finite sync operations).
*
* Channel importance: IMPORTANCE_MIN — the ongoing notification is a
* persistent indicator, not an alert. PRIORITY_MIN matches.
* The separate `hermes_chat` channel uses IMPORTANCE_HIGH for actual
* message notifications, which is correct.
*
* Lifecycle:
* - Started by [NotificationHelper.start] when the user sends a message and
* the app is about to go to the background (called from ChatScreen's