简体   繁体   中英

React Native Linking External App

Question

Inside my react native app, I want to launch an external app called "Taco Shop". I am using the package react-native-app-link. I want to launch this app from within my app, but if not installed, take the user to the app store.

Code

var url = "tacoshop://";  <-----NO CLUE WHERE OR HOW I GET THIS URL
var appName = 'Taco Shop';
var appStoreId = 'id1185454813';
var playStoreId = 'io.simplyorder.tacoshop';


AppLink.maybeOpenURL(url, { appName, appStoreId, playStoreId }).then(() => {
  // do stuff
})
.catch((err) => {
  // handle error
});

It launches the google play/app store, but does not launch the actual app when installed. How do I find the URL above of the taco shop app to launch directly if installed?

Taco Shop needs to implement Deep Links. It doesn't look like it does. To fake Deep Links for an app that doesn't have deep links implemented, you can use something like this to do so: https://portal.deeplink.me/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM