CreateVideoContract

class CreateVideoContract(videoType: String = "video/*") : ActivityResultContract<String?, Uri?>

private val registerDocumentContract = registerForActivityResult(CreateVideo()) { if (it == null) { //Operation cancelled or no application to handle the action! } else { val uri = it } }

call it as tryOrIgnore { registerDocumentContract.launch(videoName.mp4) } it's wrapped in try or ignore in case no app can handle the intent

Constructors

Link copied to clipboard
constructor(videoType: String = "video/*")

Functions

Link copied to clipboard
open override fun createIntent(context: Context, input: String?): Intent
Link copied to clipboard
open override fun getSynchronousResult(context: Context, input: String?): Nothing?
Link copied to clipboard
open override fun parseResult(resultCode: Int, intent: Intent?): Uri?