diff --git a/Libraries/Linking/Linking.js b/Libraries/Linking/Linking.js index bcb885b0a9c50a..309ce5824be261 100644 --- a/Libraries/Linking/Linking.js +++ b/Libraries/Linking/Linking.js @@ -57,6 +57,13 @@ class Linking extends NativeEventEmitter { * See https://facebook.github.io/react-native/docs/linking.html#openurl */ openURL(url: string): Promise { + // Android Intent requires protocols http and https to be in lowercase. + // https:// and http:// works, but Https:// and Http:// doesn't. + if (url.toLowerCase().startsWith('https://')) { + url = url.replace(url.substr(0, 8), 'https://'); + } else if (url.toLowerCase().startsWith('http://')) { + url = url.replace(url.substr(0, 7), 'http://'); + } this._validateURL(url); return LinkingManager.openURL(url); }