I\'m trying to send a text message to a WhatsApp contact from a react-native apps , i found that i can do it through Linking
Linking.openURL(\'whatsapp://send?t
You can use this method to send whatsApp message direct to a number.
Example link: https://wa.me/919234567812?text=%7B0%7D+Balaji+CTest
export const sendWhatsAppMessage = link => {
if (!isUndefined(link)) {
Linking.canOpenURL(link)
.then(supported => {
if (!supported) {
Alert.alert(
'Please install whats app to send direct message to students via whats
app'
);
} else {
return Linking.openURL(link);
}
})
.catch(err => console.error('An error occurred', err));
} else {
console.log('sendWhatsAppMessage -----> ', 'message link is undefined');
}
};