Enum Interaction
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אינטראקציה
סוג enum שמציין מה לעשות בתגובה לאינטראקציה עם משתמש, למשל לחיצה של משתמש על לחצן בהודעה בכרטיס.
האפשרות הזו זמינה רק לאפליקציות של Google Chat. לא זמין לתוספים של Google Workspace.
כדי לקרוא למאפיין enum, צריך לקרוא לכיתה ההורה, לשם ולנכס שלו. לדוגמה,
CardService.Interaction.OPEN_DIALOG
.
מאפיינים
נכס | סוג | תיאור |
INTERACTION_UNSPECIFIED | Enum | ערך ברירת המחדל. הפקודה action פועלת כרגיל. |
OPEN_DIALOG | Enum | פתיחת תיבת דו-שיח, ממשק שמבוסס על כרטיסים שבו אפליקציות Chat משתמשות כדי לקיים אינטראקציה עם משתמשים. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003e\u003ccode\u003eInteraction\u003c/code\u003e is an enum type used to define how a Google Chat app responds to user actions, like clicking a button.\u003c/p\u003e\n"],["\u003cp\u003eThis feature is exclusive to Google Chat apps and is not supported in Google Workspace Add-ons.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize an enum, you need to reference its parent class, name, and property, such as \u003ccode\u003eCardService.Interaction.OPEN_DIALOG\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eInteraction\u003c/code\u003e includes properties like \u003ccode\u003eOPEN_DIALOG\u003c/code\u003e for opening card-based interfaces and \u003ccode\u003eINTERACTION_UNSPECIFIED\u003c/code\u003e for default actions.\u003c/p\u003e\n"]]],["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"],null,["# Enum Interaction\n\nInteraction\n\nAn enum type that specifies what to do in response to an interaction with a user, such as a user\nclicking a button in a card message.\n\nOnly available for Google Chat apps. Not available for Google Workspace add-ons.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.Interaction.OPEN_DIALOG`. \n\n### Properties\n\n| Property | Type | Description |\n|---------------------------|--------|-----------------------------------------------------------------------------------|\n| `INTERACTION_UNSPECIFIED` | `Enum` | Default value. The `action` executes as normal. |\n| `OPEN_DIALOG` | `Enum` | Opens a dialog, a card-based interface that Chat apps use to interact with users. |"]]