getTemporarySharableURI

abstract fun getTemporarySharableURI(    mxcUrl: String?,     fileName: String,     mimeType: String?,     elementToDecrypt: ElementToDecrypt?): Uri?

Use this URI and pass it to intent using flag Intent.FLAG_GRANT_READ_URI_PERMISSION (if not other app won't be able to access it).


open fun getTemporarySharableURI(messageContent: MessageWithAttachmentContent): Uri?