提供附件圖示
日曆外掛程式可讓開發人員透過使用 EventAttachmentTrigger,將自訂附件新增至日曆活動。這些自訂附件可選擇指定圖片網址,在日曆活動中顯示為附件圖示。由於這些圖片會直接用於 Google 日曆,因此您必須在 Google 基礎架構中代管這些圖片。具體來說,您必須使用 Google Workspace Marketplace 商店資訊中外掛程式的圖示。
如要取得可用於 attachment.iconUrl
的圖片網址,請按照下列步驟操作:
- 開啟 Google Cloud 控制台。
- 視需要切換至代管外掛程式的專案。
- 依序按一下左上方的「選單」圖示 menu >「API 和服務」。
- 在底部的清單中,按一下「Google Workspace Marketplace SDK」。
- 選取「商店資訊」分頁。
- 在「圖像資源」部分中,上傳所需的附件圖示圖片,並設為「32x32 應用程式圖示」。
- 複製產生的圖片網址,並將其用作
attachment.iconUrl
。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-16 (世界標準時間)。
[null,null,["上次更新時間:2025-02-16 (世界標準時間)。"],[[["Calendar add-ons allow developers to add custom attachments with optional icons to Calendar events using the EventAttachmentTrigger."],["Attachment icons must be hosted on Google's infrastructure and be the same icon used for the add-on's Google Workspace Marketplace store listing."],["To obtain the image URL for attachment icons, developers need to upload the icon as an \"Application Icon 32x32\" in the Google Cloud console's Google Workspace Marketplace SDK Store Listing section and use the resulting URL."]]],[]]