提交 e8dd1c23 authored 作者: JarvanMo's avatar JarvanMo

comment on share file through provider

上级 3e6a5169
...@@ -246,12 +246,15 @@ internal interface FluwxShareHandler : CoroutineScope { ...@@ -246,12 +246,15 @@ internal interface FluwxShareHandler : CoroutineScope {
val sourceFile = WeChatFile.createWeChatFile(map, assetFileDescriptor) val sourceFile = WeChatFile.createWeChatFile(map, assetFileDescriptor)
val sourceByteArray = sourceFile.readByteArray() val sourceByteArray = sourceFile.readByteArray()
// if (supportFileProvider && targetHigherThanN) {
// wxFileObject.filePath = getFileContentUri(sourceByteArray.toCacheFile(context, sourceFile.suffix))
// } else {
if (ContextCompat.checkSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) { if (ContextCompat.checkSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
wxFileObject.filePath = sourceByteArray.toExternalCacheFile(context, sourceFile.suffix)?.absolutePath wxFileObject.filePath = sourceByteArray.toExternalCacheFile(context, sourceFile.suffix)?.absolutePath
} else { } else {
permissionHandler?.requestStoragePermission() permissionHandler?.requestStoragePermission()
} }
// }
msg.thumbData = readThumbnailByteArray(call) msg.thumbData = readThumbnailByteArray(call)
val req = SendMessageToWX.Req() val req = SendMessageToWX.Req()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论