React Native Share singleShare 不工作。尝试了此处博客文章中提到的所有内容:
https://medium.com/androiddevelopers/package-visibility-in-android-11-cc857f221cd9
仍然没有运气。请帮忙。
代码快照:
let shareOptions = {
title: 'Share via WhatsApp',
message: 'Hey Check out this product',
type: 'image/jpeg',
url: urlString,
filename: 'Awesome_Product',
social: Share.Social.WHATSAPP,
whatsAppNumber: 'number',
};
Share.shareSingle(shareOptions)
.then(resp => {
console.log(resp);
})
.catch(_err => showToast('WhatsApp is not installed on the device.'));