Instantly share code, notes, and snippets.

Embed
What would you like to do?
val surfaceView = findViewById<SurfaceView>(...)
surfaceView.holder.addCallback(object : SurfaceHolder.Callback {
override fun surfaceCreated(holder: SurfaceHolder) {
// We do not need to specify image format, and it will be considered of type PRIV
// Surface is now ready and we could use it as an output target for CameraSession
}
...
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment