captureAndShare

abstract fun captureAndShare(view: SurfaceView, text: String? = null, onSuccess: (Uri) -> Unit)

Captures the current frame of the specified SurfaceView and launches a system share dialog.

Parameters

view

The SurfaceView to capture.

text

Optional text to include in the share intent.

onSuccess

Callback invoked with the Uri of the saved image upon successful completion.