camera.startSession
一定の時間が経過するとタイムアウトするセッションを開始します。カメラを
カメラがスリープ状態にならないようにします。なお、
新しいセッションは常に許可されるようにします。既存のセッションがある場合は
新しいセッションを開始する前に、カメラによって自動的に閉じる必要があります。
このコマンドは API レベル 2 で非推奨になりました。
パラメータ
- timeout: (省略可)リクエストされたセッション タイムアウト(秒単位)。
省略した場合(HTTP リクエストに本文がない場合)、カメラは妥当な HTTP であると判断する必要があります。
あります。
結果
- sessionId: 文字列型の一意のセッション ID。
- timeout: 確認されたセッション タイムアウト(秒単位)。
エラー
- invalidParameterName: 入力パラメータ名を認識できません。
- invalidParameterValue: 入力パラメータ名は認識されますが、
渡された値が無効です。例: 値が範囲外であるか、そのデータが
タイプが正しくありません。
コマンド I/O |
コマンド入力 |
{ "parameters": { "timeout": 50 } } |
コマンド出力 |
{ "results": { "sessionId": "12ABC3", "timeout": 50 } } |
コマンド出力(エラー) |
{ "error": { "code": "cameraInExclusiveUse", "message": "Camera already in exclusive use, new session can't be started." } } |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-08-21 UTC。
[null,null,["最終更新日 2024-08-21 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"]]