droibit / react-native-custom-tabs

Chrome Custom Tabs for React Native.
https://www.npmjs.com/package/react-native-custom-tabs
Apache License 2.0
187 stars 108 forks source link

need urlChange listener when the url changes in custom tab #27

Open john1jan opened 6 years ago

john1jan commented 6 years ago

Is there any callback method which we can use and check when the url changes in custom tabs

john1jan commented 6 years ago

@droibit any update on this ?

ghost commented 6 years ago

@john1jan What would be the use case for that? I think the rationale behind the decision to leave out such functionality from Custom Tabs (as well as from Safari View Controller in iOS) was to ensure the privacy of the user i.e. the application has no way to capture information from URLs, forms etc.

ataillefer commented 6 years ago

Indeed for privacy reasons, for the Chrome Custom Tabs for instance the only navigation callback you can get are defined here: https://developer.chrome.com/multidevice/android/customtabs in the Custom Tabs Connection Callback section.

t1amat9409 commented 6 years ago

@LunarSweeper use case would be, let's say you're are using a payment gateway that doesn't have support for mobile yet, and you want to listen for redirection, whether to your success/error url.