Linking.openURL()

#1

I’m using Linking.openURL to open external links from a webview. This works fine on ios, but on android it doesn’t do anything. I am able to log the url that is being clicked, but Linking.openURL is not opening it.

Any ideas?

#2

can you post your code here?
even better, if you can make an example on https://snack.expo.io/ that will help get to the bottom of this.

#4

Hi @ljafri14,

Yes show us your code and error :wink:

What the result of =>

Linking.canOpenURL(url).then(supported => {
  if (!supported) {
    console.log('Can\'t handle url: ' + url);
  } else {
    return Linking.openURL(url);
  }
}).catch(err => console.error('An error occurred', err));

Info ==> official doc Linking

1 Like