HostApp
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
适用于 Google Workspace 插件或 Google Chat 应用的 Google Workspace 应用。
对于插件,是启动 Google Workspace 插件的 Workspace 应用。对于 Chat 应用,托管应用始终为 CHAT
。
枚举 |
UNSPECIFIED_HOST_APP |
Google 无法识别托管应用。 |
GMAIL |
该插件会从 Gmail 启动。 |
CALENDAR |
该插件会从 Google 日历启动。 |
DRIVE |
插件会从 Google 云端硬盘启动。 |
DEMO |
未使用。 |
DOCS |
插件会从 Google 文档中启动。 |
MEET |
该插件会从 Google Meet 启动。 |
SHEETS |
该插件会从 Google 表格启动。 |
SLIDES |
该插件会从 Google 幻灯片启动。 |
DRAWINGS |
该插件会从 Google 绘图中启动。 |
CHAT |
Google Chat 应用。不适用于 Google Workspace 加载项。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe \u003ccode\u003eHostApp\u003c/code\u003e enum indicates the Google Workspace application from which a Google Workspace Add-on or Google Chat app launches.\u003c/p\u003e\n"],["\u003cp\u003eFor add-ons, the \u003ccode\u003eHostApp\u003c/code\u003e specifies the originating application like Gmail, Calendar, or Drive, while for Chat apps, it's always \u003ccode\u003eCHAT\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eUNSPECIFIED_HOST_APP\u003c/code\u003e is used when Google cannot identify the host app, and \u003ccode\u003eDEMO\u003c/code\u003e is not utilized.\u003c/p\u003e\n"]]],["The content defines the host applications for Google Workspace add-ons and Google Chat apps. For add-ons, host apps include Gmail, Calendar, Drive, Docs, Meet, Sheets, Slides, and Drawings. Each of these indicates where the add-on is launched from. For Chat apps, the host app is always `CHAT`. An `UNSPECIFIED_HOST_APP` means Google can't identify the host. `DEMO` is listed but not used for either add-ons or Chat apps.\n"],null,["# HostApp\n\nThe Google Workspace application for a Google Workspace add-on or Google Chat app.\n\nFor add-ons, the Workspace application from which a Google Workspace add-on launches. For Chat apps, the host app is always `CHAT`.\n\n| Enums ||\n|------------------------|-----------------------------------------------------------|\n| `UNSPECIFIED_HOST_APP` | Google can't identify a host app. |\n| `GMAIL` | The add-on launches from Gmail. |\n| `CALENDAR` | The add-on launches from Google Calendar. |\n| `DRIVE` | The add-on launches from Google Drive. |\n| `DEMO` | Not used. |\n| `DOCS` | The add-on launches from Google Docs. |\n| `MEET` | The add-on launches from Google Meet. |\n| `SHEETS` | The add-on launches from Google Sheets. |\n| `SLIDES` | The add-on launches from Google Slides. |\n| `DRAWINGS` | The add-on launches from Google Drawings. |\n| `CHAT` | A Google Chat app. Not used for Google Workspace add-ons. |"]]