camera.delete
指定された URI のファイルを削除します。このコマンドは API レベル 2 で変更されました。
パラメータ
- API レベル 1
<ph type="x-smartling-placeholder">
</ph>
- fileUri: 削除するファイルの URI。メーカーが決定
指定することもできます。クライアントはこれを不明瞭なものとして
あります。
- API レベル 2
<ph type="x-smartling-placeholder">
</ph>
- fileUrls: 削除するファイルの絶対 URL のリスト
カメラから取得された画像送信者
camera.listFiles
または camera.takePicture
コマンドを使用できます。特殊なケースが 3 つあります。
<ph type="x-smartling-placeholder"></ph>
- このリストには「all」という文字列のみが含まれます。カメラ内のすべてのファイルを削除します。
- このリストには「image」という文字列のみが含まれます。
カメラ。
- このリストには「video」という文字列のみが含まれます。
カメラ。
結果
- fileUrls: 正常に削除されなかったファイルの URL。
これは、fileUrl 内のすべての URL は有効であるのに、カメラでエラーが発生した場合に発生します。
一部を削除します。いずれかの URL が無効な場合、エラーコード
ファイルを削除せずに
invalidParameterValue
が返されます。
これは API レベル 2 で追加されました。
エラー
- missingParameter:
fileUri
が指定されていません。
- invalidParameterName: 入力パラメータ名を認識できません。
- invalidParameterValue: 入力パラメータ名が認識されます。
値が無効です。たとえば
fileUri
では、
API レベル 1 に存在しているか、API レベル 2 に fileUrl の URL が存在しない。
コマンド I/O |
コマンド入力(API レベル 1) |
{ "parameters": { "fileUri": "file URI" } } |
コマンド出力(API レベル 1) |
none |
コマンド出力(エラー)(API レベル 1) |
{ "error": { "code": "invalidParameterName", "message": "Parameter XYZ is unrecognized." } } |
コマンド入力(API レベル 2) |
{ "parameters": { "fileUrls": [ "url1", "url2", "url3", ... "urln" ] } } |
コマンド出力(API レベル 2) |
{ "results": { "fileUrls": [ "urln" ] } } |
コマンド出力(エラー)(API レベル 2) |
{ "error": { "code": "invalidParameterValue", "message": "Parameter url3 doesn't exist." } } |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-08-21 UTC。
[null,null,["最終更新日 2024-08-21 UTC。"],[[["The `deleteFile` command removes one or more files from the camera's storage."],["API level 1 uses `fileUri` to specify a single file for deletion, while API level 2 uses `fileUrls` to specify one or more files, or uses special values to delete all files, all images, or all videos."],["Errors are returned if parameters are missing, invalid, or if the specified files cannot be deleted."],["API level 2 introduced the `fileUrls` parameter and the ability to return a list of unsuccessfully deleted files in the results."]]],["This describes a command to delete files from a camera. In API level 1, it accepts a `fileUri` to delete a single file, where the URI's format is determined by the manufacturer. API level 2 was introduced to use the `fileUrls` parameter for multiple files, specified by absolute URLs. Special strings like \"all\", \"image\", or \"video\" delete all files, all images, or all videos. A list of `fileUrls` will return any files that did not delete correctly. Errors include invalid parameters or missing data.\n"]]