מצלמה.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)."],[[["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"]]