Camera.startSession
เริ่มเซสชันที่หมดเวลาหลังจากครบระยะเวลาที่กำหนดไว้แล้ว ล็อกกล้องไว้ที่
กำลังขอไคลเอ็นต์และตรวจสอบว่ากล้องยังทำงานอยู่ โปรดทราบว่า เริ่มที่
ควรอนุญาตเซสชันใหม่เสมอ หากมีเซสชันเดิมอยู่
กล้องควรปิดโดยอัตโนมัติก่อนเริ่มเซสชันใหม่
เลิกใช้งานคำสั่งนี้ใน API ระดับ 2 แล้ว
พารามิเตอร์
- timeout (ระยะหมดเวลา): (ไม่บังคับ) ระยะหมดเวลาของเซสชันที่ขอเป็นวินาที
หากไม่ระบุ (คำขอ HTTP ไม่มีเนื้อความ) กล้องควรระบุ
หมดเวลา
ผลลัพธ์
- sessionId: ตัวระบุเซสชันที่ไม่ซ้ำกันของสตริงประเภท
- timeout (ระยะหมดเวลา):ระยะหมดเวลาของเซสชันที่ได้รับการยืนยันเป็นวินาที
ข้อผิดพลาด
- invalidParametersName: ระบบไม่รู้จักชื่อพารามิเตอร์อินพุต
- invalidParameterValue: ระบบจดจำชื่อพารามิเตอร์อินพุตได้ แต่
ค่าที่ส่งผ่านไม่ถูกต้อง ตัวอย่างเช่น ค่าอยู่นอกช่วงหรือมีข้อมูล
ประเภทไม่ถูกต้อง
Command 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." } } |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-08-21 UTC
[null,null,["อัปเดตล่าสุด 2024-08-21 UTC"],[[["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"]]