'How to identify whether the face is in the frames while detecting by ml kit?

I'm doing an Android project that uses google ml kit to detect faces. I am having a problem is how to know when a face appears in the frame when FaceDetection works. I tried a few ways to display the results but it always stopped and did not return anything from the processor.

Is there any way to do that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source