使用Android中的Bundle ID打开其他应用程序,使用React Antial



是否可以使用我需要打开的应用程序的Bundle ID打开我的应用程序中的另一个应用程序?如果是,该怎么做?

您无法打开应用程序中的其他应用程序,但可以重定向到其他应用程序(第三方应用程序),例如WhatsApp,Instagram或任何其他应用程序

 const url = 'whatsapp://';
             Linking.canOpenURL(url).then(supported=> {
                if (!supported) {
                    console.log('Can't handle url: ' + url);
         }else{
                    return Linking.openURL(url);
        }
         }).catch(err =>
         console.error('An error occurred', err));

最新更新