|
Android app: native push notifications via JS bridge + background hold
WebView has no Push API, so the app shows notifications natively: - NaviBridge JS interface (window.NaviAndroid): notify(), permission request with a 'navi-perm-result' event callback, background-mode start/stop and the Doze-exemption ask. - BackgroundService: dataSync foreground service + partial wake lock — holds the process (and the WebView WebSocket) open while the app is minimized; quiet persistent notification with a "Отключить фон" action. Notification channels: silent background presence, high-importance messages. - Manifest: POST_NOTIFICATIONS / FOREGROUND_SERVICE(_DATA_SYNC) / WAKE_LOCK / REQUEST_IGNORE_BATTERY_OPTIMIZATIONS + service entry; notification tap resumes MainActivity (singleTask) into open_url. - webclient: nativeBridge composable; usePush gets a bridge mode that replaces web-push entirely (settings toggle keeps working); chat store raises 'Navi ответила' through the bridge on stream end when the window is hidden. Fixed a latent undefined-variable in web syncState (notificationsSupported -> notifSupported()). - New unit tests for the bridge surface; 147 frontend tests + APK build pass. |
|---|
|
|
| android-client/app/src/main/AndroidManifest.xml |
|---|
| android-client/app/src/main/java/com/navi/client/BackgroundService.kt 0 → 100644 |
|---|
| android-client/app/src/main/java/com/navi/client/MainActivity.kt |
|---|
| android-client/app/src/main/java/com/navi/client/NaviNotifications.kt 0 → 100644 |
|---|
| android-client/app/src/main/res/drawable/ic_notification.xml 0 → 100644 |
|---|
| webclient/dist/assets/index-B6EXLnRo.css 0 → 100644 |
|---|
| webclient/dist/assets/index-Bg3aWTEG.css 100644 → 0 |
|---|
| webclient/dist/assets/index-Dp40tuNy.js 100644 → 0 |
|---|
|
Not supported
|
| webclient/dist/assets/index-vXGuKJlF.js 0 → 100644 |
|---|
|
Not supported
|
| webclient/dist/index.html |
|---|
| webclient/dist/sw.js |
|---|
| webclient/src/components/settings/NotificationSettingsPanel.vue |
|---|
| webclient/src/composables/nativeBridge.js 0 → 100644 |
|---|
| webclient/src/composables/usePush.js |
|---|
| webclient/src/stores/chat.js |
|---|
| webclient/tests/unit/composables/nativeBridge.test.js 0 → 100644 |
|---|