Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detection Not calling in IOS #53

Open
mastashake08 opened this issue May 30, 2023 · 1 comment
Open

Detection Not calling in IOS #53

mastashake08 opened this issue May 30, 2023 · 1 comment

Comments

@mastashake08
Copy link

The camera will start if I manually create a MLKitView but no callback received

Steps to recreate

mounted() {
      LocalNotifications.requestPermission().then(() => {
        this.sendNotification('Starting scan', 'Scan your cards')
        this.initMLKit()
      })
    }
.......
initMLKit() {
        const image = new MLKitView();
        image.cameraPosition = CameraPosition.Front
        image.detectionType = DetectionType.Text
        image.torchOn = true

        image.requestCameraPermission().then(() => {
          console.log(image.detectionType)
          image.on('detection', this.onDetection)
        });
      },
      onDetection(event) {
        alert(event)
        if(event.type === DetectionType.Image){
          const text = event.data;
          this.sendNotification('Card recognized', event.data)
       }
      }
    }

I see the camera opens but I get zero detections

@brooklax
Copy link

Same thing happening on my side, tried with iOS device running 16.6 and 17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants