kvision / pl.treksoft.kvision.cordova / Camera / getPicture

getPicture

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

Suspending function to get picture from the camera.

Note: On Android platform you must also use addCameraResultCallback listener.

Parameters

options - camera options

Return
a Result class containing the picture or the exception

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

A function to get picture from the camera.

Note: On Android platform you must also use addCameraResultCallback listener.

Parameters

options - camera options

resultCallback - a callback function to get the Result, containing the picture or the exception