NativeScript / nativescript-camera

NativeScript plugin to empower using device camera.
Apache License 2.0
92 stars 47 forks source link

[Android][Android 9 - API 28][Photo Capture confirmed screen requires to click multiple times on OK button] #241

Open misostack opened 4 years ago

misostack commented 4 years ago

Hello guys, the plugin works very well on IOS. But i got this issue. After user take the photo, it requires to click multiple times on "OK" button to comeback to the app screen. This is bug or is there any ways to go through. Thank you guys.

This is my implementation based on the official doc.

  onTakePhoto(){
    const options : camera.CameraOptions = {
      width: 250,
      height: 250,
      keepAspectRatio: true,      
      saveToGallery: false,
      allowsEditing: false,  
      /**
       * The initial camera. Default "rear".
       * The current implementation doesn't work on all Android devices, in which case it falls back to the default behavior.
       */
      // cameraFacing: "front" | "rear"      
    }
    camera.takePicture(options).then(
      imageAsset => {
            const source = new ImageSource();
            console.log("Result is an image asset instance", imageAsset);
            source.fromAsset(imageAsset).then(source => {
               let fingerImage = <Image>this.fingerImageRef.nativeElement;
               fingerImage.imageSource = source;          
            })
      }
      ).then( err => console.log(err))  
    return;
  }

Link Image : https://pasteboard.co/IYqbkLx.png