camera.listImages

Lists all images in the camera. This command was deprecated in API level 2. Please use camera.listFiles instead.

If a camera doesn’t support the requested parameters, the camera must return the maximum capability available for the hardware. For example, a rare case might be the request: {entryCount: 500, maxSize: 2000}. Instead of throwing an error, the response should be based on the maximum capability supported by the camera, such as: {entryCount: 100, maxSize: 200}. Please throw errors for all other cases; for example, when the request is, {entryCount: 500, maxSize: -500}, it should throw the error invalidParameterValue since maxSize is negative.

Parameters

  • entryCount: Desired number of entries to return.
  • maxSize: Maximum size of thumbnail images; max(thumbnail_width, thumbnail_height). Required only when includeThumb is true (below).
  • continuationToken: (Optional) An opaque continuation token of type string, returned by previous listImages call, used to retrieve next images. Omit this parameter for the first listImages call. Note: The camera is responsible for the algorithm that generates the token.
  • includeThumb: (Optional) Defaults to true. Use false to omit thumbnail images from the result.

Results

  • entries: A list of image properties. Each entry should contain the following fields except for latitude and longitude, which are optional:
    • Name
    • URI
    • Size in bytes
    • Date, time, and time zone for the image, in the format: YYYY:MM:DD HH:MM:SS+(-)HH:MM. Use 24-hour format for the time. Date and time are separated by one blank character. Time zone is offset from UTC time.
    • (Optional) Latitude of the image capture location.
    • (Optional) Longitude of the image capture location.
    • Image width
    • Image height
    • Base64 encoded string for thumbnail image (when includeThumb == true).
  • totalEntries: Total number of entries in storage.
  • continuationToken: (Optional) Set only if the result is incomplete (incomplete means any listing that does not include the last image). To fetch remaining entries, the client should call listImages command again with the token.

Errors

  • missingParameter: Any required parameter is not specified; for example, entryCount is not specified.
  • invalidParameterName: The input parameter name is unrecognized.
  • invalidParameterValue: The input parameter name is recognized, but its value is invalid; for example, the continuationToken doesn't exist, is out of range, its data type is incorrect, the data type of includeThumb is incorrect, or maxSize has the wrong data type when includeThumb is true.

Command I/O

Command Input
{
    "parameters": {
        "entryCount": 50,
        "maxSize": 100,
        "includeThumb": true
    }
}
Command Output
{
    "results": {
        "entries": [
            {
                "name": "abc",
                "uri": "image URI",
                "size": image size in  of bytes,
                "dateTimeZone": "2014:12:27 08:00:00+08:00"
                "lat": 50.5324
                "lng": -120.2332
                "width": 2000
                "height": 1000
                "thumbnail": "ENCODEDSTRING"
            }
            ...
            {
                ...
            }
        ],
        "totalEntries": 250,
        "continuationToken": "50"
    }
}
Command Output (Error)
{
    "error": {
        "code": "invalidParameterValue",
        "message": "Parameter continuationToken is out of range."
    }
}

Enviar comentarios sobre…

Open Spherical Camera API