Explicitly set mime type when sharing PDFs

This commit is contained in:
William Brawner 2024-09-04 20:00:45 -06:00
parent eb29dffbc1
commit d14b747ff1
Signed by: wbrawner
GPG key ID: 8FF12381C6C90D35

View file

@ -41,7 +41,7 @@ fun File.buildShareIntent(context: Context): Intent =
"com.wbrawner.skerge.pdfprovider",
this@buildShareIntent
)
data = uri
setDataAndTypeAndNormalize(uri, "application/pdf")
putExtra(Intent.EXTRA_STREAM, uri)
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
}, name)