Initially, I managed to make the ImageAnalyis.setAnalysis work. It returned me an ImageProxy object.
ImageAnalyis.setAnalysis
ImageProxy
This was without the ArFragment
ArFragment