Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
1 parent
87392f5e57
commit
ca21e22147
2 files changed
+12
-2
No files matched your search
@@ -5,7 +5,7 @@
|
|||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<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
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<service
|
<service
|
||||||
android:name=".notification.ChatNotificationService"
|
android:name=".notification.ChatNotificationService"
|
||||||
android:foregroundServiceType="dataSync"
|
android:foregroundServiceType="remoteMessaging"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
|
|||||||
@@ -29,6 +29,16 @@ import kotlinx.coroutines.launch
|
|||||||
* is backgrounded and posts a notification when a new assistant reply
|
* is backgrounded and posts a notification when a new assistant reply
|
||||||
* completes (MessageComplete event) while the app is not in the foreground.
|
* 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:
|
* Lifecycle:
|
||||||
* - Started by [NotificationHelper.start] when the user sends a message and
|
* - Started by [NotificationHelper.start] when the user sends a message and
|
||||||
* the app is about to go to the background (called from ChatScreen's
|
* the app is about to go to the background (called from ChatScreen's
|
||||||
|
|||||||
Reference in new issue
Block a user