react-native-app-link icon indicating copy to clipboard operation
react-native-app-link copied to clipboard

Where can I find app url?

Open ivankdev opened this issue 4 years ago • 3 comments

ok there is example of usage like

import AppLink from 'react-native-app-link';

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

appName, appStoreId, appStoreLocale, playStoreId - more or less clear where to get

Question: Where can we find url parameter - obviously it should be like whatsapp://? But how as example it should be for some another JustEatApp https://play.google.com/store/apps/details?id=com.justeat.app.uk&hl=ru&gl=US ?

How you detect deeplink to open another app itself, not playstore with app?

ivankdev avatar Jan 14 '21 09:01 ivankdev

@gastondisacco any clues?

ivankdev avatar Jan 14 '21 09:01 ivankdev

It depends on the app you're trying to link to. Some apps have documentation on deep-linking into them via their URL scheme like Lyft: https://developer.lyft.com/docs/deeplinking

FiberJW avatar Jan 14 '21 10:01 FiberJW

If all you know is the package name, and your only platform is Android, you could try sending an intent: https://reactnative.dev/docs/linking#sendintent

Untested Example:

Linking.sendIntent('com.justeat.app.uk');

FiberJW avatar Jan 14 '21 10:01 FiberJW