I have an app that detects the eye using Firebase ML kit Detector in Java but I want the Camera Preview run on background and detect the eyes' position without showing in my screen.
The xml file is mentioned bellow. I' ve changed the visibility to invisible or gone but with no success.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal"
android:visibility="visible">
<com.example.eyetrackerdemo.CameraSourcePreview
android:id="@+id/preview"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.example.eyetrackerdemo.GraphicOverlay
android:id="@+id/barcodeOverlay"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.example.eyetrackerdemo.CameraSourcePreview>
</LinearLayout>
Do you have any idea what implementation should I follow. Further I want to record the video that running on background and save it in the device.