Apache Cordova · Schema

CameraOptions

Options for configuring the Apache Cordova Camera plugin getPicture call

ApacheCross-PlatformHybrid AppsJavaScriptMobileOpen-SourcePlugins

Properties

Name Type Description
quality integer Quality of the saved image, expressed as a range of 0-100, where 100 is typically full resolution with no file compression loss.
destinationType integer Choose the format of the return value. 0 = DATA_URL (base64 encoded string), 1 = FILE_URI (image file URI).
sourceType integer Set the source of the picture. 0 = PHOTOLIBRARY, 1 = CAMERA, 2 = SAVEDPHOTOALBUM.
allowEdit boolean Allow simple editing of image before selection.
encodingType integer Choose the returned image file encoding. 0 = JPEG, 1 = PNG.
targetWidth integer Width in pixels to scale image. Must be used with targetHeight. Aspect ratio remains constant.
targetHeight integer Height in pixels to scale image. Must be used with targetWidth. Aspect ratio remains constant.
mediaType integer Set the type of media to select from. 0 = PICTURE, 1 = VIDEO, 2 = ALLMEDIA. Only works when sourceType is PHOTOLIBRARY or SAVEDPHOTOALBUM.
correctOrientation boolean Rotate the image to correct for the orientation of the device during capture.
saveToPhotoAlbum boolean Save the image to the photo album on the device after capture.
cameraDirection integer Choose the camera to use. 0 = BACK, 1 = FRONT.
View JSON Schema on GitHub

JSON Schema

apache-cordova-camera-options-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/apache-cordova/refs/heads/main/json-schema/apache-cordova-camera-options-schema.json",
  "title": "CameraOptions",
  "description": "Options for configuring the Apache Cordova Camera plugin getPicture call",
  "type": "object",
  "properties": {
    "quality": {
      "type": "integer",
      "description": "Quality of the saved image, expressed as a range of 0-100, where 100 is typically full resolution with no file compression loss.",
      "minimum": 0,
      "maximum": 100,
      "default": 50,
      "example": 75
    },
    "destinationType": {
      "type": "integer",
      "description": "Choose the format of the return value. 0 = DATA_URL (base64 encoded string), 1 = FILE_URI (image file URI).",
      "enum": [0, 1],
      "default": 1,
      "example": 1
    },
    "sourceType": {
      "type": "integer",
      "description": "Set the source of the picture. 0 = PHOTOLIBRARY, 1 = CAMERA, 2 = SAVEDPHOTOALBUM.",
      "enum": [0, 1, 2],
      "default": 1,
      "example": 1
    },
    "allowEdit": {
      "type": "boolean",
      "description": "Allow simple editing of image before selection.",
      "default": false,
      "example": false
    },
    "encodingType": {
      "type": "integer",
      "description": "Choose the returned image file encoding. 0 = JPEG, 1 = PNG.",
      "enum": [0, 1],
      "default": 0,
      "example": 0
    },
    "targetWidth": {
      "type": "integer",
      "description": "Width in pixels to scale image. Must be used with targetHeight. Aspect ratio remains constant.",
      "minimum": 1,
      "example": 800
    },
    "targetHeight": {
      "type": "integer",
      "description": "Height in pixels to scale image. Must be used with targetWidth. Aspect ratio remains constant.",
      "minimum": 1,
      "example": 600
    },
    "mediaType": {
      "type": "integer",
      "description": "Set the type of media to select from. 0 = PICTURE, 1 = VIDEO, 2 = ALLMEDIA. Only works when sourceType is PHOTOLIBRARY or SAVEDPHOTOALBUM.",
      "enum": [0, 1, 2],
      "default": 0,
      "example": 0
    },
    "correctOrientation": {
      "type": "boolean",
      "description": "Rotate the image to correct for the orientation of the device during capture.",
      "example": true
    },
    "saveToPhotoAlbum": {
      "type": "boolean",
      "description": "Save the image to the photo album on the device after capture.",
      "default": false,
      "example": false
    },
    "cameraDirection": {
      "type": "integer",
      "description": "Choose the camera to use. 0 = BACK, 1 = FRONT.",
      "enum": [0, 1],
      "default": 0,
      "example": 0
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/apache-cordova-camera-options"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.