kvision / pl.treksoft.kvision.cordova / Camera

Camera

(js) object Camera

Main object for Cordova camera.

Types

(js)

CameraPopoverOptions

iOS popover options.

data class CameraPopoverOptions
(js)

DestinationType

Camera destination types.

enum class DestinationType
(js)

Direction

Camera facing types.

enum class Direction
(js)

EncodingType

Picture encoding types.

enum class EncodingType
(js)

MediaType

Picture/video media types.

enum class MediaType
(js)

PictureSourceType

Camera picture/video sources.

enum class PictureSourceType
(js)

PopoverArrowDirection

iOS popover arrow directions.

enum class PopoverArrowDirection

Functions

(js)

addCameraResultCallback

An Android specific function to get picture from the camera after resume when the application webview intent is killed.

fun addCameraResultCallback(resultCallback: (Result<String, CameraException>) -> Unit): Unit
(js)

cleanup

Removes intermediate image files that are kept in the temporary storage after calling getPicture.

fun cleanup(resultCallback: ((Result<String, CameraException>) -> Unit)? = null): Unit
(js)

getPicture

Suspending function to get picture from the camera.

suspend fun getPicture(options: CameraOptions): Result<String, CameraException>

A function to get picture from the camera.

fun getPicture(options: CameraOptions, resultCallback: (Result<String, CameraException>) -> Unit): Unit