camera.startSession
Stay organized with collections
Save and categorize content based on your preferences.
Starts a session that times out after a fixed interval. Locks the camera to the
requesting client and makes sure the camera stays awake. Please note, starting
a new session should always be allowed. If there is an existing session, it
should be closed automatically by the camera before starting the new session.
This command was deprecated in API level 2.
Parameters
- timeout: (Optional) Requested session timeout in seconds.
If omitted (HTTP request has no body), the camera should determine a reasonable
timeout.
Results
- sessionId: Unique session identifier of type string.
- timeout: Confirmed session timeout in seconds.
Errors
- invalidParameterName: The input parameter name is unrecognized.
- invalidParameterValue: The input parameter name is recognized, but the
passed value is invalid; for example, the value is out of range or its data
type is incorrect.
Command I/O |
Command Input |
{
"parameters": {
"timeout": 50
}
} |
Command Output |
{
"results": {
"sessionId": "12ABC3",
"timeout": 50
}
} |
Command Output (Error) |
{
"error": {
"code": "cameraInExclusiveUse",
"message": "Camera already in exclusive use, new
session can't be started."
}
} |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 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."]]],[]]