Class Notification

การแจ้งเตือน

การแจ้งเตือนที่แสดงต่อผู้ใช้เป็นการตอบสนองเมื่อโต้ตอบกับองค์ประกอบ UI

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)

ตั้งค่าข้อความให้แสดงในการแจ้งเตือน ต้องระบุ

พารามิเตอร์

ชื่อTypeคำอธิบาย
textStringข้อความแจ้งเตือน

รีเทิร์น

Notification — ออบเจ็กต์นี้สำหรับการทำเชน