I need to make the user able to pick only documents types (ex: pdf, docs, xls) from phone storage using the new Activity Result API, but the problem is that when I launch the contract like the following code
private val getContent = registerForActivityResult(ActivityResultContracts.GetContent()) { uri: Uri? ->
...
}
fun pickDocument() = getContent.launch("*/*")
user become able to select any file type including images, videos, ...