![](/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.