Repository navigation
feat(push): FCM system notifications (0.4.0) - #10
Merged
Merged
Conversation
…0.4.0) - push/: PushRegistrar (login/onNewToken/logout, silent re-auth), XbotMessagingService (data-only), Notifications (channel/deep link/stable ids), PushPresence (30s foreground lease). - remove ChatNotificationService/BootReceiver/AppVisibility and FOREGROUND_SERVICE*/RECEIVE_BOOT_COMPLETED permissions; no ongoing notification. - settings: notification permission card + FCM status/refresh/test; notification tap deep-links to the target chat. - commit google-services.json (client identifiers only; API key restricted by package); the server keeps the real service-account secret. - release script auto-extracts the CHANGELOG section; CHANGELOG 0.4.0. Tests: assembleDebug, assembleRelease, testDebugUnitTest, lintDebug. Real-device FCM delivery verified (foreground/background/process-killed).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the app's 24/7 foreground SSE notification service with real system push via FCM (data-only).
push/PushRegistrar: fetch/register the FCM token on login,onNewToken, logout; silent re-auth on 401.push/XbotMessagingService: parses{kind, chat_id, title, body, request_id}and renders the notification locally.push/Notifications:xbot_messageschannel, stable notification id per prompt/chat, deep link to the chat.push/PushPresence: 30s foreground lease; the server skips this device while it is visible.ChatNotificationService,BootReceiver,AppVisibility,FOREGROUND_SERVICE*/RECEIVE_BOOT_COMPLETEDpermissions, the ongoing notification and the legacy toggle.MainActivity/App.kt: notification tap openschat/{id}.Depends on
Server PR: ai-pivot/xbot#455 (
/api/push/*, FCM + WebPush). Without it the app still works; registration returns 404 and the UI shows “not registered”.Notes
app/google-services.jsonis committed: it only contains client identifiers (project_id/app_id/api_key; the API key is restricted by package name). The real secret is the server-side service-account JSON and is never committed.latest.json+xbot-android-25.apkare published athttps://minio.cjiw.site/uploads/share/android/.Tests
./gradlew :app:assembleDebug :app:assembleRelease :app:testDebugUnitTest :app:lintDebugDev channel note
versionCodeis 25 (0.4.0). If a newer dev build already exists on the device, the stable install needs the usualmax(stable, dev)+1bump.