react-native-share method shareSingle opening Play Store in Android 11

1.3k Views Asked by At

When I use the following method it's should open the Whatsapp for share the message, but it open the Google Play in the page of the Whatsapp...

Share.shareSingle({
  title: 'Title Test',
  message: 'Message Test',
  social: Share.Social.WHATSAPP,
})
.then(res => console.log(res))
.catch(err => {
  console.log(err);
});

In then console return: {"message": null, "success": true}

I'm using...
React Native: 0.64.0
React Native Share: 6.2.3
Android 11

When I use the example of the React Native Share it's work success, but I don't understand why don't work in my application!

1

There are 1 best solutions below

2
On BEST ANSWER

I solve this problem!

In the Android 11 some information about other apps are "blocked", using the method Share.isPackageInstalled I realized that return not installed, then to "unblock" this we need use <queries> in AndroidManifest.xml for more details read here.
Implement queries in AndroidManifest