ae548a851d
Implements a 5-layer always-on notification system that maintains persistent WebSocket connections to the user's inbox relays for real-time notification delivery, eliminating the dependency on the external push server seeing all relays. Layer architecture: - L1: Foreground service (specialUse type, no Android 15 time limit) keeps the shared NostrClient alive by collecting relayServices flow - L2: FCM/UnifiedPush (existing, unchanged) as wakeup trigger - L3: WorkManager periodic worker (15-min catch-up safety net) - L4: BOOT_COMPLETED receiver (restart service after reboot) - L5: AlarmManager watchdog (5-min health check for OEM killers) Key design: the foreground service shares the same NostrClient as the UI. When the app foregrounds, both the UI and service are subscribers to the relay pool. When the app backgrounds, UI subscriptions drop but service subscriptions remain — zero reconnection needed. New files: - NotificationRelayService: foreground service with persistent notification - BootCompletedReceiver: restarts service on device boot - NotificationCatchUpWorker: WorkManager fallback for missed events - ServiceWatchdogManager: AlarmManager-based health monitor - AlwaysOnNotificationServiceManager: coordinates all 5 layers Settings: opt-in toggle in App Settings, persisted per-account. https://claude.ai/code/session_01LEPfmgGnwjB9a5SDFw5U8t