Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

React Native url response in app browser cannot find as null

$
0
0

Im trying to extract a url from an in-app browser and I am having some trouble any ideas are welcome!

The link will open successfully but when I click the cancel button on the in-app browser the link returns as null.

      try {        const isAvailable = await InAppBrowser.isAvailable()        if (isAvailable) {          InAppBrowser.open(url, {            // iOS Properties            dismissButtonStyle: 'cancel',            preferredBarTintColor: 'gray',            preferredControlTintColor: 'white',            // Android Properties            showTitle: true,            toolbarColor: '#6200EE',            secondaryToolbarColor: 'black',            enableUrlBarHiding: true,            enableDefaultShare: true,            forceCloseOnRedirection: true,          }).then((response) => {            console.log("JSON REsponse:",JSON.stringify(response))            console.log("JSON REsponse:",JSON.stringify(response))            Linking.getInitialURL().then(initialUrl => {            console.log("test:",initialUrl as string);             });          })

Viewing all articles
Browse latest Browse all 6287

Trending Articles