android - 反应本机提示用户从 App Store 下载应用程序
问题描述
当应用程序已安装并在浏览器中打开 URL 时,我需要让 react native 应用程序提示我下载linkedIn 应用程序
我想要做的是一旦它打开它浏览器提示用户从 iOS 和 android 的 App Store 下载。可以的话请指教谢谢!
Linking.canOpenURL('https://www.linkedin.com/in/williamhgates').then(supported => {
if (supported) {
Linking.openURL('https://www.linkedin.com/in/williamhgates');
} else {
console.log("Don't know how to open URI: " + 'https://www.linkedin.com/in/williamhgates');
}
});
解决方案
推荐阅读
- python - Python selenium webdriver select href 选择部分文本
- java - 使用 RowCoder 编码 JSON 字符串
- node.js - MongoDB旅游罗宾逊预订模式
- mongodb - 在 Windows 中更改和移动 MongoDB 数据目录
- mongodb - MongoDB - 整个集合的唯一索引
- javascript - Zip.js 在下载过程中解压(可能使用 StreamSaver.js)
- java - 在 Thymeleaf 中格式化 LocalDateTime
- ssl - ZeroSSL 积分(这些相同的域,但我不能更新)
- windows - 如何使用 Flutter Desktop (Windows) 隐藏 cmd 窗口
- json - fromJson 类方法的空安全性