'shareSingle from react-native-share does not work for WhatsApp in Android 11
React Native Share singleShare is not working. Tried out everything as mentioned in the blog post here:
https://medium.com/androiddevelopers/package-visibility-in-android-11-cc857f221cd9
Still no luck. Please help.
Code snapshot:
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.'));
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
