Files
faceclaw/app/native/notification-types.ts
T
James Babcock 032797f0f6 Add support for embedded icons and custom layouts in Android notifications
The practical upshot of this is that gmail, messages and similar apps
show the sender's profile picture on the glasses, the Dexcom app shows a
2026-10-31 12:39:20 -07:00

24 lines
1.3 KiB
TypeScript

/** Shared notification model; Android names are retained for existing callers. */
export type AndroidNotificationAction = { index: number; title: string; enabled: boolean };
export type AndroidNotification = {
key: string; packageName: string; appName: string; title: string; text: string;
bigText: string; subText: string; infoText: string; summaryText: string;
category: string; lines: string[]; postTime: number; when: number;
actions: AndroidNotificationAction[]; dismissLabel?: string;
/** Posted by a foreground service (Android): a "this app is working" status notification. */
foregroundService?: boolean;
/** Carries a picture (Android BigPictureStyle), fetched separately by readNotificationPicture. */
hasPicture?: boolean;
/** Carries a large icon (Android: a sender's avatar or logo), fetched separately by readNotificationLargeIcon. */
hasLargeIcon?: boolean;
/** Has its own layout (Android RemoteViews), drawn by readNotificationCustomView. */
hasCustomView?: boolean;
/**
* The custom layout's text, one entry per text view, when the notification has no title or
* text of its own (Dexcom's glucose reading and units).
*/
customText?: string[];
/** Full message size reported by iOS, even when the fetched text is bounded. */
messageSize?: number;
};