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.
1 parent e68c33e commit 51804dc769c7f5abcdba6a6478ff1183bfa270e8
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 13 hours ago
Showing 16 changed files
View
android-client/app/src/main/AndroidManifest.xml
View
android-client/app/src/main/java/com/navi/client/BackgroundService.kt 0 → 100644
View
android-client/app/src/main/java/com/navi/client/MainActivity.kt
View
android-client/app/src/main/java/com/navi/client/NaviNotifications.kt 0 → 100644
View
android-client/app/src/main/res/drawable/ic_notification.xml 0 → 100644
View
webclient/dist/assets/index-B6EXLnRo.css 0 → 100644
View
webclient/dist/assets/index-Bg3aWTEG.css 100644 → 0
View
webclient/dist/assets/index-Dp40tuNy.js 100644 → 0
Not supported
View
webclient/dist/assets/index-vXGuKJlF.js 0 → 100644
Not supported
View
webclient/dist/index.html
View
webclient/dist/sw.js
View
webclient/src/components/settings/NotificationSettingsPanel.vue
View
webclient/src/composables/nativeBridge.js 0 → 100644
View
webclient/src/composables/usePush.js
View
webclient/src/stores/chat.js
View
webclient/tests/unit/composables/nativeBridge.test.js 0 → 100644