android – Methods to set pc fallback url in firebase dynamic hyperlink in react native?

[ad_1]

I’m utilizing firebase dynamic hyperlink in my react native cell software, the whole lot is working effectively as I need.
One factor I’m not capable of implement that’s, I’ve created one HTML preview web page to indicate preview on different social media. I’ve set fallback url for iOS, android. once I share that hyperlink it really works effectively in android and iOS , when person not put in app then it redirect to my web site web page. However in pc once I hit that it not redirect me to my web site web page it open solely preview web page which I’m passing in hyperlink parameter.

If I’m use

otherPlatform:{
   fallbackUrl:DEEPLINK_FALLBACK
 }

Then it really works however the preview not present the by default preview is displaying of fallbackUrl url of OtherPlatform.

That is the whole code I’m utilizing to generate dynamic hyperlink in my react native app.

 const buildVideoLink = async () => {
  attempt {
  const activityId = selectedPozzle?.activityId ? selectedPozzle?.activityId : ""
  const pozzleId = selectedPozzle?.pozzleId ? selectedPozzle?.pozzleId : ""

  
  const conentLink =  FEED_PREVIEW_URL + pozzleId + "/preview/"
  
  
  const hyperlink = await dynamicLinks().buildShortLink({
    hyperlink: conentLink + "?activityId="+activityId+"&pozzleId=" + pozzleId,
    domainUriPrefix: DEEPLINK_DOMAIN,
    otherPlatform:{
      fallbackUrl:DEEPLINK_FALLBACK
    },
    android: {
      packageName: ANDROID_PACKAGE,
      fallbackUrl:DEEPLINK_FALLBACK,
    },
    ios: {
      appStoreId: '12345678',
      bundleId: IOS_BUNDLE,
      fallbackUrl:DEEPLINK_FALLBACK,
    }
  }
  );
  console.log("Pozzle_share_link........", hyperlink)
  return hyperlink;
}
catch (error) {
}

}

[ad_2]

Leave a Reply