Notifications app checks for and requests notifications access

This commit is contained in:
James Babcock committed 2026-07-10 23:44:17 -07:00
1 parent 17cc0bba83
commit c71dbbc9f2
3 files changed
+48 -1

No files matched your search

+7
View File
@@ -8,6 +8,7 @@ import { startForegroundNotification, stopForegroundNotification, updateForegrou
import { mediaControllerBridge } from "../native/media-controller";
import { nightscoutBridge } from "../native/nightscout-bridge";
import { onAndroidNotificationPosted } from "../native/notification-icons";
import { isNotificationListenerEnabled, requestNotificationListenerAccess } from "../native/notification-access";
import { openEvenAppSettings, readEvenAppNotificationState } from "../native/even-app-conflict";
import { grayImageToPreviewSource } from "../native/gray-image-preview";
import { firmwareIncompatibilityMessage } from "./firmware-compat";
@@ -863,6 +864,12 @@ class DashboardController {
return;
}
if (appId === "notifications") {
// Without notification-listener access the tray reads as empty; prompt
// the user on the phone so the on-glasses "grant permission" message is
// actionable. The app still opens to show that message.
if (!isNotificationListenerEnabled()) {
requestNotificationListenerAccess();
}
await this.launchInProcessApp(NOTIFICATIONS_WINDOW_ID, NOTIFICATIONS_SURFACE_ID, createNotificationsAppWindow);
return;
}