android - 如何在 Android 上使用深度链接打开我的应用程序?
问题描述
我正在使用深度链接打开我的应用程序,在 iPhone 上,当您将 URL 放入浏览器myapp://my-view/params
(
解决方案
你怎么打开链接
尝试这个
import { Linking, Alert } from "react-native";
const url= "slack://open?team=123456";
const supported = await Linking.canOpenURL(url);
if (supported) {
// Opening the link with some app, if the URL scheme is "http" the web link should be opened
// by some browser in the mobile
await Linking.openURL(url);
} else {
Alert.alert(`Don't know how to open this URL: ${url}`);
}
推荐阅读
- julia - 对于集合(不可变)和字符串(可变),“===”的行为似乎不符合 Julia 中的文档(至少 v1.5)
- python - 根据 dict.values() 删除字典元素
- javascript - gulp.pipe() 和 src() 不是函数
- ansible - 在 Ansible 中启用并重新启动 crontab
- python - 当我满足特定条件时,如何在 i 的任一侧组合 Python 列表元素
- python - 按索引行复制/复制行 Pandas/Numpy
- javascript - 在网络浏览器中显示 D3.js 示例(菜鸟问题)
- sql-server - DATEDIF 报告生成器我可以做 OR 或在哪里
- c# - 替换数据集中的数据
- powerapps - 如果使用 textinput 过滤 PowerApps Dropdown onChange 则不会触发