Class EditorFileScopeActionResponseBuilder
內容詳盡的說明文件
requestFileScopeForActiveDocument()
為目前的編輯器文件要求 drive.file
範圍。
// Display a permissions dialog to the user, requesting `drive.file` scope for
// the current document on behalf of this add-on.
CardService.newEditorFileScopeActionResponseBuilder()
.requestFileScopeForActiveDocument()
.build();
注意:如要呼叫這個方法,您必須將 drive.file
範圍新增至外掛程式的資訊清單。
回攻員
EditorFileScopeActionResponseBuilder
:這個物件用於鏈結。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-21 (世界標準時間)。
[null,null,["上次更新時間:2024-12-21 (世界標準時間)。"],[[["`EditorFileScopeActionResponseBuilder` helps create responses for actions within Google Editors (Docs, Sheets, Slides)."],["It primarily offers two methods: `build()` to finalize the response and `requestFileScopeForActiveDocument()` to request necessary file access permissions."],["`requestFileScopeForActiveDocument()` specifically asks for 'drive.file' scope, enabling the add-on to interact with the user's current document."],["To use this functionality, you need to declare the 'drive.file' scope in your add-on's manifest file."]]],[]]