Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where can I find app url? #22

Open
ivankdev opened this issue Jan 14, 2021 · 3 comments
Open

Where can I find app url? #22

ivankdev opened this issue Jan 14, 2021 · 3 comments

Comments

@ivankdev
Copy link

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
Copy link
Author

@gastondisacco any clues?

@FiberJW
Copy link
Owner

FiberJW commented Jan 14, 2021

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
Copy link
Owner

FiberJW commented Jan 14, 2021

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');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants