最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - React Native: Opening URLs in Android (Equivalent to LinkingIOS.openURL) - Stack Overflow

programmeradmin5浏览0评论

I'm aware that when using React Native to develop for iOS, I have access to the LinkingIOS and WebView modules to work with URLs. Is there any sort of equivalent for Android? All I'm looking to do is open the URL in the device's browser.

I know that the contributors are working on implementing WebView in Android: .html#views

But is there anything I can use in the meantime?

Again, All I need is an equivalent to LinkingIOS.openUrl(url) for Android.

I'm aware that when using React Native to develop for iOS, I have access to the LinkingIOS and WebView modules to work with URLs. Is there any sort of equivalent for Android? All I'm looking to do is open the URL in the device's browser.

I know that the contributors are working on implementing WebView in Android: https://facebook.github.io/react-native/docs/known-issues.html#views https://github./facebook/react-native/issues/2701

But is there anything I can use in the meantime?

Again, All I need is an equivalent to LinkingIOS.openUrl(url) for Android.

Share Improve this question asked Oct 2, 2015 at 21:43 michaelgmcdmichaelgmcd 2,4492 gold badges20 silver badges24 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 3

Try this module https://github./ivanph/react-native-webintent for opening urls in the default browser.

With the latest release of React Native (0.21), they provide module Linking to handle ining as well as outgoing web url.

This can work both on Android and iOS without platform specific.

There is IntentAndroid to open URL.

Example

IntentAndroid.openURL(url)

Please refer to official doc for more info https://facebook.github.io/react-native/docs/intentandroid.html#content

发布评论

评论列表(0)

  1. 暂无评论