מצלמה.startSession
מתחיל סשן שתם הזמן הקצוב שלו לתפוגה לאחר מרווח זמן קבוע. נועל את המצלמה באמצעות
שמבקש לקוח ומוודא שהמצלמה לא במצב שינה. לידיעתך, החל
צריך לאפשר תמיד סשן חדש. אם יש סשן קיים,
אמורה להיסגר אוטומטית על ידי המצלמה לפני התחלת הסשן החדש.
הפקודה הזו הוצאה משימוש ברמת API 2.
פרמטרים
- timeout: (אופציונלי) הזמן הקצוב לתפוגה של הסשן המבוקש, בשניות.
אם היא לא מופיעה (לבקשת HTTP אין גוף), היא צריכה לקבוע ערך סביר של
הזמן הקצוב לתפוגה.
תוצאות
- sessionId: מזהה סשן ייחודי של מחרוזת סוג.
- timeout: אושר הזמן הקצוב לתפוגה של סשן בשניות.
שגיאות
- INVALIDParameterName: השם של פרמטר הקלט לא מזוהה.
- 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." } } |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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"]]