camera.updateSession
重新整理工作階段逾時。如果有
如何與相機互動舉例來說,工作階段開頭為
系統應會在 10 分鐘時將逾時時間重設為完整
系統會執行 takePicture
指令。這個指令已淘汰
在 API 級別 2 中運作
參數
- sessionId:類型字串的不重複工作階段 ID。
- timeout:(選用) 要求的工作階段逾時 (以秒為單位)。
如果省略 (HTTP 要求沒有主體),相機應決定合理的
逾時。
結果
- sessionId:傳遞的已確認工作階段 ID 字串
新增至指令
- timeout:確認的工作階段逾時 (以秒為單位)。
錯誤
- missingParameter:缺少
sessionId
;例如
未指定 sessionId
。
- INVALIDParameterName:一或多個輸入參數名稱
則無法辨識。
- invalidParameterValue::系統會辨識輸入參數名稱,
但一或多個傳送的值無效;例如,
sessionId
不存在、已無效、資料類型不正確,或
timeout
是錯誤的資料類型。
指令 I/O |
指令輸入 |
{ "parameters": { "sessionId": "12ABC3", "timeout": 50 } } |
指令輸出 |
{ "results": { "sessionId": "12ABC3", "timeout": 50 } } |
指令輸出 (錯誤) |
{ "error": { "code": "missingParameter", "message": "Parameter sessionId is missing." } } |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-21 (世界標準時間)。
[null,null,["上次更新時間:2024-08-21 (世界標準時間)。"],[[["Refreshes the camera session timeout upon interaction and resets it to the initially specified duration."],["Requires a unique session identifier (`sessionId`) and optionally allows specifying a desired timeout duration in seconds."],["Returns the confirmed session identifier and timeout or reports errors like missing or invalid parameters."],["This command is deprecated and was replaced with newer methods in API level 2."]]],["The core function is to refresh a camera session's timeout. It utilizes a `sessionId` string for identification. An optional `timeout` parameter (in seconds) can be set; otherwise, the camera determines a reasonable duration. Successful execution returns the confirmed `sessionId` and `timeout`. Errors occur with missing or invalid `sessionId`, or invalid parameter names/values. This command has been deprecated from API level 2.\n"]]