Class Notification

通知

作为对与界面元素互动的响应而向用户显示的通知。

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();
}

方法

方法返回类型简介
setText(text)Notification设置要在通知中显示的文本。

详细文档

setText(text)

设置要在通知中显示的文本。必填。

参数

名称类型说明
textString通知文本。

弃踢回攻

Notification - 此对象,用于实现链式处理。