Skip to content

IdBarcodeRecognizer TimeOut.  #212

Description

@aarango

I need activate one time out or know the lecture numbers for know if the camera don't recognize the barCode, I search in the options but I dont see results , this is possible? - I need help.

This property exist ?

This is my implementation.


import React, { useEffect } from 'react'
import * as BlinkIDReactNative from 'blinkid-react-native'
import { useIsFocused } from '@react-navigation/native'
import { View, Platform } from 'react-native'
import Constants from 'expo-constants'
import { styles } from './styles'

const licenseKey = Platform.select({
  ios: Constants.manifest.extra.iosApiKeyBlinkId,
  android: Constants.manifest.extra.androidBlinkIdApiKey,
})

function CameraPDF417({ onScanedQr, title = '' }) {
  const isFocused = useIsFocused()

  async function scan() {
    try {
      const uiSettings = new BlinkIDReactNative.BlinkIdOverlaySettings()
      uiSettings.firstSideInstructionsText = title

      const idBarcodeRecognizer = new BlinkIDReactNative.IdBarcodeRecognizer()

      const scanningResults = await BlinkIDReactNative.BlinkID.scanWithCamera(
        uiSettings,
        new BlinkIDReactNative.RecognizerCollection([idBarcodeRecognizer]),
        licenseKey,
      )
      if (scanningResults) {
        console.log('scanningResults', scanningResults)
        // onScanedQr(scanningResults)
      } else {
        console.log('scanningResults', scanningResults)
      }
    } catch (error) {
      console.log('ERROR CAMERA', error)
    }
  }

  useEffect(() => {
    ;(async () => {
      await scan()
    })()
  }, [isFocused])

  return <View style={styles.container} />
}

export { CameraPDF417 }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions