Ad

How To Go Directly To The App Store By Clicking On The Dynamic Link When The User Has Not Installed The Application?

Currently, Dynamic Link is used normally in the React-native app. However, the Dynamic Link is not redirected to the app-store when the user has not installed the app.

createShortDynamicLink(contentKey, title, subtitle, youTubeVideoId) {
  const dynamicLinkDomain = __DEV__
    ? 'test.page.link'
    : 'test.page.link';

  const link =
    new firebase.links.DynamicLink(`https://test.com/contents/${contentKey}`, dynamicLinkDomain)
      .social.setImageUrl(`https://img.youtube.com/vi/${youTubeVideoId}/hqdefault.jpg`) // make size over 200*200
      .social.setDescriptionText(subtitle)
      .social.setTitle(title)
      .android.setPackageName(DeviceInfo.getBundleId())
      .ios.setBundleId(DeviceInfo.getBundleId());

  return firebase.links()
    .createShortDynamicLink(link, 'UNGUESSABLE');
}

https://firebase.google.com/docs/dynamic-links/use-cases/web-to-apphttps://rnfirebase.io/docs/v5.x.x/links/reference/SocialParameters I used this docs..

Ad

Answer

You need to set fallback links. You can find more options about properties in official page.

Ad
source: stackoverflow.com
Ad