@gphone/sdk
    Preparing search index...

    Function usePhoneNotification

    • OS Service Hook for sending toast notifications and system alerts.

      Returns {
          dismissNotification: (id: string) => void;
          sendNotification: (options: SendNotificationOptions) => string;
          toast: {
              archive: (id: string) => Promise<void>;
              clear: () => void;
              dismiss: (id: string) => void;
              pauseDismiss: (id: string) => void;
              resumeDismiss: (id: string, delay?: number) => void;
              show: (options: Partial<ToastMessage> & { message: string }) => string;
              showCall: (
                  options: {
                      name?: string;
                      number: string;
                      onAccept: () => void | Promise<void>;
                      onDecline?: () => void | Promise<void>;
                      onExpire?: () => void | Promise<void>;
                  },
              ) => string;
              showContactShare: (
                  options: {
                      avatar?: string;
                      name: string;
                      onAccept: () => void | Promise<void>;
                      onClick?: () => void | Promise<void>;
                      onDecline?: () => void | Promise<void>;
                      phone: string;
                  },
              ) => string;
              showIncomingMessage: (
                  options: {
                      avatar?: string;
                      message: string;
                      onClick?: () => void;
                      onReply: (replyText: string) => void | Promise<void>;
                      sender: string;
                  },
              ) => string;
              showMail: (
                  options: { onClick?: () => void; sender: string; subject: string },
              ) => string;
              subscribe: (
                  this: void,
                  run: Subscriber<ToastMessage[]>,
                  invalidate?: () => void,
              ) => Unsubscriber;
          };
      }