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

React Native Expo - Open URL in browser package

$
0
0

I am trying to open URL in a specific browser using package name in Android. I am using Expo's WebBrowser.openBrowserAsync()

Per documentation, you can pass the browser package name.

https://docs.expo.io/versions/v37.0.0/sdk/webbrowser/#webbrowseropenbrowserasyncurl

package (optional) (string) -- (Android only). Package name of a browser to be used to handle Custom Tabs

So, I tried using the code below, but its showing a browser selection dialog. How can I open it automatically in Chrome without prompting for the browser selection dialog?

WebBrowser.openBrowserAsync('https://google.com', { package: 'com.android.chrome' });

Viewing all articles
Browse latest Browse all 29880

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>