'React Native Linking simultaneously for mail AND sms
Is it possible to Linking.openUrl() for both mail and sms ? I'd like my user to choose between those app and prefill information in the body.
Linking.openURL('mailto:[email protected]?subject=SendMail&body=Description')
does suggest mail apps
Linking.openURL('sms:number?body=Description')
does suggest sms apps
Is there a way to have both app proposed to the user while being prefilled with Description ?
Solution 1:[1]
Sounds like you are looking for "Share" functionality.
See the official React Native Share Docs, or this popular third party library.
Solution 2:[2]
FOR mail
Linking.openURL('mailto:[email protected]?subject=SendMail&body=Description')
FOR sms
Linking.openURL('sms:number?body=yourMessage?subject=SendMail&body=Description')
If this information not enough; you should be 3.part package like;
https://github.com/flexible-agency/react-native-email-link
or
React Native Share.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Steven Bell |
| Solution 2 | Burak Odaba? |
