6

I'm using Google MLKit for barcode scanner. When I use imageProxy.image, IDE shows a warning;

"This declaration is opt-in and its usage should be marked with '@androidx.camera.core.ExperimentalGetImage' or '@OptIn(markerClass = androidx.camera.core.ExperimentalGetImage.class)'"

And it forces to use @SuppressLint("UnsafeOptInUsageError") annotation. I don't know what is it and couldn't find any resource(even official resource) about that. So why should this annotation be used?

Mehmet Gür
  • 503
  • 7
  • 20

1 Answers1

2

This waring is from CameraX library rather ML Kit and you can suppress it by annotating the caller method with @ExperimentalGetImage like this.

zhouyi
  • 226
  • 1
  • 4