【发布时间】:2019-04-24 17:14:28
【问题描述】:
我已经使用FileSystem.downloadAsync保存了我想在本地共享的文件
Share.share 适用于 iOS。如何分享我在 Android 上本地保存的图像?
我试过了
- https://github.com/lucasferreira/react-native-send-intent
- https://github.com/react-native-community/react-native-share
这两种解决方案不似乎都适用于 Expo。
我正在使用 react-native 版本:https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz
FileSystem.downloadAsync(url, FileSystem.documentDirectory+filename).then(({uri})=>{
if(Platform.OS == "android"){
// ???
}
else{
Share.share({url:uri});
}
})
我有什么遗漏吗?
【问题讨论】:
标签: android react-native expo