0

I have a Composable function that create a Box. And inside the box i have three layers of composable view.

// Custom composable function, that i want to take screenshoot
ScreenshotBox() {
   // An AndroidView that provide ArSceneView (CameraView)
   ARScene() 

   // On top of ARSceneView to draw 2D line
   AndroidView(
       factory = { context ->
             return@AndroidView LayoutInflater.from(context).inflate(R.layout.layout_measuring_frame, null)
     },
     modifier = Modifier.fillMaxSize()
   )

 //a card On top of all layers, to display the measurement value
 Column() {
     MeasurementResultCard(
                number = "1",
                meters = viewModel.measurementResultValueOfFirst.value,
                color = colorResource(id = R.color.first_point)
                    )
      }
}

after taking a screenshot i get 2D lines that i have drawn on top of ARScene and the card with the result of measurement value, But i don't get ARScene contents that i could see through the camera. Instead of camera view i get black screen.

How can i take a screenshot in this case??

My expected screenshot should be like this expected screenshot

But i get like this actual screenshot

Yusuf Md
  • 1
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 10 '23 at 14:29

0 Answers0