Enum Interaction
Số lượt tương tác
Loại enum chỉ định việc cần làm để phản hồi một lượt tương tác với người dùng, chẳng hạn như người dùng nhấp vào một nút trong thông báo thẻ.
Chỉ dành cho ứng dụng Google Chat. Không dùng được cho các tiện ích bổ sung của Google Workspace.
Để gọi một enum, bạn gọi lớp mẹ, tên và thuộc tính của enum đó. Ví dụ:
CardService.Interaction.OPEN_DIALOG
.
Thuộc tính
Thuộc tính | Loại | Mô tả |
INTERACTION_UNSPECIFIED | Enum | Giá trị mặc định. action thực thi như bình thường. |
OPEN_DIALOG | Enum | Mở một hộp thoại, một giao diện dựa trên thẻ mà các ứng dụng Chat sử dụng để tương tác với người dùng. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-01-30 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-01-30 UTC."],[[["`Interaction` is an enum type used to define how a Google Chat app responds to user actions, like clicking a button."],["This feature is exclusive to Google Chat apps and is not supported in Google Workspace Add-ons."],["To utilize an enum, you need to reference its parent class, name, and property, such as `CardService.Interaction.OPEN_DIALOG`."],["`Interaction` includes properties like `OPEN_DIALOG` for opening card-based interfaces and `INTERACTION_UNSPECIFIED` for default actions."]]],["This content defines the `Interaction` enum for Google Chat apps, which dictates the app's response to user interactions. It's exclusive to Google Chat apps and unavailable for Google Workspace add-ons. The enum includes properties like `INTERACTION_UNSPECIFIED`, which executes the default action, and `OPEN_DIALOG`, which triggers a card-based dialog. To use these properties call it with its class name for example `CardService.Interaction.OPEN_DIALOG`.\n"]]