![](/img/trans.png)
[英]Is it possible to share both text message and image using expo-sharing?
[英]Sharing image with EXPO
我搜索了很多,看起来这个过程在使用 Expo 时并不直接
看来我需要在本地下载文件,然后共享它
import {Share} from 'react-native';
const imageURL = "https://i.imgur.com/7RhCHg2.png";
const url = await downloadAsync(imageURL , cacheDirectory + "tmp.png");
console.log(url); // it prints a local image file
Share.share({url : url.uri , message : "Event Invitation" });
预期的行为
该应用程序应共享图像以及消息“活动邀请”
当前行为
应用程序只分享消息“活动邀请”,它看不到图像或分享它
内容“url”仅适用于 iOS。 如果你想分享图像 android,你可以看看这个链接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.