Appo

Camera

Request camera permission and capture photos.

Access via appo.camera.

Type Definition

Prop

Type

Usage

Request Permission

const status = await appo.camera.requestPermission();
// status: 'granted' | 'denied' | 'undetermined'

Take a Picture

if (status === 'granted') {
  const result = await appo.camera.takePicture();
  console.log(result.uri, result.width, result.height);
  // result.base64 is available if the native handler provides it
}

Prop

Type

Browser Fallback

MethodFallback
requestPermission()Returns 'denied'
takePicture()Throws Error

On this page