Functions that allow an Eitri-App to use the device's camera through the operating system's native APIs.

Methods

Methods

  • Opens the camera and scans for QR Codes.

    try {
    const deeplink = await Eitri.exposedApis.camera.startScanner()
    if (!deeplink) {
    setAlertMessage('QRCode not detected')
    setShowErrorAlert(true)
    return
    }
    handleQRCode(deeplink)
    } catch (error) {
    console.log("startScanner.error: ", error);
    }

    Returns Promise<string>

    returns the content of the QR Code as a string if one is scanned.