camera.startSession
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.
[null,null,["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."]]],["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"]]