Add a consolidated single export to each app

This commit is contained in:
James Babcock committed 2026-08-03 00:51:57 -07:00
1 parent 9b3832d7a7
commit f38366df6e
23 files changed
+597 -337

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import { isNotificationListenerEnabled, requestNotificationListenerAccess } from "../../native/notification-access";
import { type AppDefinition } from "../app-definition";
import { createNotificationsAppWindow, NOTIFICATIONS_SURFACE_ID, NOTIFICATIONS_WINDOW_ID } from "./notifications-app";
const notificationsApp: AppDefinition = {
appId: "notifications",
title: "Notifications",
icon: "bell",
launch: (ctx) => {
// 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();
}
return ctx.launchInProcessApp(NOTIFICATIONS_WINDOW_ID, NOTIFICATIONS_SURFACE_ID, createNotificationsAppWindow);
},
};
export default notificationsApp;