Methods for interacting with camera on devices

Notice for App Developers

To use these methods some configurations in the native app are needed

  • IOS:

    • Add to info.plist the config with a description:
      • Privacy - Camera Usage Description
  • Android:

    • Add to AndroidManifest.xml
<manifest [...]>
<uses-permission android:name="android.permission.CAMERA" />
[...]
</manifest>

Hierarchy

  • Camera

Methods

  • Take a picture with the device camera.

    Example:

    await Eitri.camera.takePicture({quality: 0.5, width: 480, keepAspectRatio: true})
    
    await Eitri.camera.takePicture({quality: 0.5, width: 768, height: 1024})
    

    Compatibility Control

    • API LEVEL 26 - Functionality added
    • API LEVEL 27 - Added width, height and keepAspectRatio attributes to CameraTakePictureInput

    Parameters

    Returns Promise<EitriFile>

Generated using TypeDoc