使用Expo从React Native应用程序中打开Whatsapp

当前正在尝试使用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

songxiayehu 回答:使用Expo从React Native应用程序中打开Whatsapp

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3084988.html

大家都在问