Skip to content

Notifications: scheduled & triggered local notifications (calendar / interval / location) #96

Description

@proggeramlug

notificationSend always fires with a 0.1s UNTimeIntervalNotificationTrigger (crates/perry-ui-macos/src/notifications.rs:41) — no way to schedule.

Scope

  • New TS surface:
    export function notificationSchedule(opts: {
      id: string;
      title: string;
      body: string;
      trigger: { type: "interval"; seconds: number; repeats?: boolean }
             | { type: "calendar"; date: Date }
             | { type: "location"; latitude: number; longitude: number; radius: number };
    }): void;
    export function notificationCancel(id: string): void;
  • iOS/macOS: UNTimeIntervalNotificationTrigger / UNCalendarNotificationTrigger / UNLocationNotificationTrigger.
  • Android: AlarmManagerNotificationManager for interval/calendar; Geofencing API for location.
  • Windows: toast scheduling via ToastNotifier.AddToSchedule.
  • Linux/Web: best-effort; document limits.

Identifier map lives runtime-side so cancel works.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew capability or improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions