camera.startSession
啟動在固定的時間間隔後逾時的工作階段。將攝影機鎖定在
來要求用戶端,並確保相機保持喚醒狀態。請注意,開始日期:
應一律允許新的工作階段。如有現有的工作階段,則
在開始新的工作階段前,相機會自動關閉。
這個指令已在 API 級別 2 中淘汰。
參數
- timeout:(選用) 要求的工作階段逾時 (以秒為單位)。
如果省略 (HTTP 要求沒有主體),相機應決定合理的
逾時。
結果
- sessionId:類型字串的不重複工作階段 ID。
- timeout:確認的工作階段逾時 (以秒為單位)。
錯誤
- INVALIDParameterName:無法辨識輸入參數名稱。
- invalidParameterValue::系統會辨識輸入參數名稱,但
傳送的值無效;例如值超出範圍或其資料
類型不正確。
指令 I/O |
指令輸入 |
{ "parameters": { "timeout": 50 } } |
指令輸出 |
{ "results": { "sessionId": "12ABC3", "timeout": 50 } } |
指令輸出 (錯誤) |
{ "error": { "code": "cameraInExclusiveUse", "message": "Camera already in exclusive use, new session can't be started." } } |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-21 (世界標準時間)。
[null,null,["上次更新時間:2024-08-21 (世界標準時間)。"],[[["Starts a session that locks the camera to the requesting client and keeps it awake, timing out after a specified or default interval."],["A new session can always be started, automatically closing any existing session."],["This command, deprecated in API level 2, returns a unique session ID and the confirmed timeout duration."],["Possible errors include invalid parameter names or values, or the camera already being in exclusive use."]]],["The core action initiates a timed camera session, locking the camera to the client and ensuring it remains active. A new session is always permitted, automatically ending any existing session. The user can optionally specify a session timeout in seconds; otherwise, the camera sets a default. The output includes a unique session ID and the confirmed timeout. Errors can occur if parameter names or values are invalid. This command has been deprecated after API level 2.\n"]]