当前正在尝试使用Expo从我的React Native应用中打开whatsapp
。我有以下代码:
let url = 'whatsapp://app';
Linking.openURL(url).then((data) => {
console.log('WhatsApp Opened');
}).catch((err) => {
console.log(err);
alert('Make sure Whatsapp installed on your device');
});
我得到的错误是:
Error: Could not open URL 'whatsapp://app': No Activity found to handle Intent { act=android.intent.action.VIEW dat=whatsapp://app flg=0x10000000 }
但是,当我将网址更改为send
时,它可以正常打开whatsapp吗?
whatsapp://send?phone=3464478983
我正在尝试仅打开whatsapp
参数而没有打开send