camera.getMetadata
Returns file metadata given its URI. The image header
lists the Exif and XMP fields. This command was deprecated in API level 2.
Parameters
- fileUri: URI of the target file. Manufacturers decide whether
to use absolute or relative URIs. Clients may treat this as an opaque identifier.
Results
- metadata: Exif (including GPS information), Photo Sphere XMP in
JSON format. Does not include image or thumbnail.
Errors
- missingParameter:
fileUri
is not specified.
- invalidParameterName: The input parameter name is unrecognized.
- invalidParameterValue: The input parameter is recognized, but its
value is invalid; for example, the
fileUri
doesn't exist, or its data
type is incorrect.
Command I/O |
Command Input |
{
"parameters": {
"fileUri": "file URI"
}
} |
Command Output |
{
"results": {
"exif": {
...
"ImageWidth": 2000,
"ImageLength": 1000,
...
},
"xmp": {
"ProjectionType": "equirectangular",
"UsePanoramaViewer": true,
...
}
}
} |
Command Output (Error) |
{
"error": {
"code": "invalidParameterValue",
"message": "Parameter fileUri doesn't exist."
}
} |
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."],[[["Returns file metadata such as Exif and XMP data for a given file URI."],["This command is deprecated and was previously used in API level 2."],["Important parameters include the `fileUri`, which specifies the location of the target file."],["Potential errors encompass missing or invalid parameters, including an invalid or non-existent `fileUri`."],["The command output provides Exif and Photo Sphere XMP data in JSON format if successful."]]],["This command retrieves a file's metadata using its URI. It's deprecated in API level 2. Input requires a `fileUri`. The output provides Exif data (including GPS) and Photo Sphere XMP in JSON format, excluding the image itself. Possible errors include a missing or invalid `fileUri`, or an unrecognized parameter name. Example input shows providing a file URI, with successful output including `exif` and `xmp` fields, and error output shown when a file URI does not exist.\n"]]