import {
Linking
} from 'react-native';

//使用系统浏览器访问指定URL
export const contactBaidu = () => {
var baiduURL = 'http://www.baidu.com/'

Linking.canOpenURL(baiduURL).then(supported => {
if (!supported) {
console.warn('Can\'t handle url: ' + baiduURL);
} else {
return Linking.openURL(baiduURL);
}
}).catch(err => console.error('An error occurred',baiduURL));
}

相关文章:

  • 2021-07-06
  • 2021-05-03
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
  • 2022-02-28
  • 2022-12-23
猜你喜欢
  • 2021-05-20
  • 2021-05-20
  • 2021-08-21
  • 2022-12-23
  • 2021-11-20
  • 2022-01-05
  • 2022-12-23
相关资源
相似解决方案