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."
    }
}