מצלמה.updateSession
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מרענן את הזמן הקצוב לתפוגה של סשן. סשן מתעדכן באופן אוטומטי בכל
אינטראקציה עם המצלמה; לדוגמה, סשן מתחיל
הזמן הקצוב לתפוגה של 10 דקות אמור להתאפס ל-10 הדקות המלאות,
הפקודה takePicture
מבוצעת. הפקודה הזו הוצאה משימוש
ברמת API 2.
פרמטרים
- sessionId: מזהה סשן ייחודי של מחרוזת סוג.
- timeout: (אופציונלי) הזמן הקצוב לתפוגה של הסשן המבוקש, בשניות.
אם היא לא מופיעה (לבקשת HTTP אין גוף), היא צריכה לקבוע ערך סביר של
הזמן הקצוב לתפוגה.
תוצאות
- sessionId: מחרוזת של מזהה הסשן המאושר שהועברה
לפקודה.
- timeout: אושר הזמן הקצוב לתפוגה של סשן בשניות.
שגיאות
- missingParameter:
sessionId
חסר; לדוגמה,
sessionId
לא צוין.
- invalidParameterName: אחד או יותר מהשמות של פרמטרים של קלט הם
לא מזוהה.
- invalidParameterValue: שמות פרמטרים של קלט מזוהים,
אבל אחד או יותר מהערכים שמועברים לא תקינים. לדוגמה,
sessionId
לא קיים, הוא לא פעיל יותר, סוג הנתונים שלו שגוי, או
סוג הנתונים timeout
שגוי.
Command I/O |
קלט פקודה |
{
"parameters": {
"sessionId": "12ABC3",
"timeout": 50
}
} |
פלט הפקודה |
{
"results": {
"sessionId": "12ABC3",
"timeout": 50
}
} |
פלט הפקודה (שגיאה) |
{
"error": {
"code": "missingParameter",
"message": "Parameter sessionId is missing."
}
} |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-08-21 (שעון UTC).
[null,null,["עדכון אחרון: 2024-08-21 (שעון UTC)."],[[["\u003cp\u003eRefreshes the camera session timeout upon interaction and resets it to the initially specified duration.\u003c/p\u003e\n"],["\u003cp\u003eRequires a unique session identifier (\u003ccode\u003esessionId\u003c/code\u003e) and optionally allows specifying a desired timeout duration in seconds.\u003c/p\u003e\n"],["\u003cp\u003eReturns the confirmed session identifier and timeout or reports errors like missing or invalid parameters.\u003c/p\u003e\n"],["\u003cp\u003eThis command is deprecated and was replaced with newer methods in API level 2.\u003c/p\u003e\n"]]],["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"],null,["# camera.updateSession\n\nRefreshes the session timeout. A session automatically updates on any\ninteraction with the camera; for example, a session that starts with a\n10-minute timeout should reset to the full 10 minutes when a\n`takePicture` command executes. **This command was deprecated\nin API level 2.**\n\nParameters\n----------\n\n- **sessionId:** Unique session identifier of type string.\n- **timeout:** (Optional) Requested session timeout in seconds. If omitted (HTTP request has no body), the camera should determine a reasonable timeout.\n\nResults\n-------\n\n- **sessionId:** Confirmed session identifier string that was passed to the command.\n- **timeout:** Confirmed session timeout in seconds.\n\nErrors\n------\n\n- **missingParameter:** `sessionId` is missing; for example, `sessionId` is not specified.\n- **invalidParameterName:** One or more input parameter names are unrecognized.\n- **invalidParameterValue:** Input parameter names are recognized, but one or more passed value are invalid; for example, the `sessionId` doesn't exist, it is no longer active, its data type is incorrect, or `timeout` is the wrong data type.\n\n| Command I/O ----------- ||\n|----------------------------|-------------------------------------------------------------------------------------------------------|\n| **Command Input** | ```text { \"parameters\": { \"sessionId\": \"12ABC3\", \"timeout\": 50 } } ``` |\n| **Command Output** | ```text { \"results\": { \"sessionId\": \"12ABC3\", \"timeout\": 50 } } ``` |\n| **Command Output (Error)** | ```text { \"error\": { \"code\": \"missingParameter\", \"message\": \"Parameter sessionId is missing.\" } } ``` |"]]