Class Notification

Notification

A notification shown to the user as a response to interacting with a UI element.

var action = CardService.newAction().setFunctionName("notificationCallback");
CardService.newTextButton().setText('Save').setOnClickAction(action);

// ...

function notificationCallback() {
  return CardService.newActionResponseBuilder()
      .setNotification(CardService.newNotification()
          .setText("Some info to display to user"))
      .build();
}

Methods

MethodReturn typeBrief description
setText(text)NotificationSets the text to show in the notification.

Detailed documentation

setText(text)

Sets the text to show in the notification. Required.

Parameters

NameTypeDescription
textStringthe notification text.

Return

Notification — this object, for chaining.

フィードバックを送信...

ご不明な点がありましたら、Google のサポートページをご覧ください。