I have a link that leads to a pdf
file. I need to use Android Sharesheet
to open this file with existing applications for pdf files on my phone.
I have this code, but when this dialog opens, it does not show what I need:
val share = Intent.createChooser(Intent().apply {
action = Intent.ACTION_SEND
putExtra(Intent.EXTRA_TEXT, "https://testsite.com/english.pdf")
flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
}, null)
context.startActivity(share)