2

Problem facing:

In the app, there is a link, let's say https://example.com/campaign which is an app link. Most of the time we want it to be opened in app. We have set autoVerify in AndroidManifest's intent-filter. However, there is a requirement that if the campaign is created by a third party, we need to open the link in an external web browser.

Our code:

const supported = await Linking.canOpenURL(url);
if (supported && isThirtyParty(url)) {
    Linking.openURL(url);
}

What we expect:

Opening the url in an external browser

What we have It triggered the Linking url listener which is calling a deep link handler.

Linking.addEventListener('url', deepLinkHandler)

It makes sense as we put an autoVerify there. Is there a way to open it in an external browser?

Horst
  • 1,733
  • 15
  • 20

0 Answers0