从应用程序内打开时,阻止 Firebase 动态链接重定向到浏览器

问题描述

我们希望用户完成他们的个人资料,因此会弹出应用内消息,如果他们接受,则会将他们重定向到编辑个人资料页面。它正在工作,但它重定向到浏览器,返回应用程序,然后完成到个人资料页面的导航。有没有办法去掉浏览器重定向

enter image description here

我尝试在 AndroidManifest.xml 中设置意图过滤器

<intent-filter>
    <data android:host="@string/firebaseDynamicLinkDomain" android:scheme="http"/>
    <data android:host="@string/firebaseDynamicLinkDomain" android:scheme="https"/>
</intent-filter>

这里是我们初始化的地方

export const initialize = async () => {
  try {
    dispoSEOnLink = dynamicLinks().onLink(handleLink);
  } catch (e) {
    throw e;
  }
};

然后处理链接

const handleLink = (link: string) => {
    if (link.url === 'https://mykomae.page.link/edit-profile') {
      navigatetoEditProfile('profile');
    }
};

所以它可以运行,但看起来很糟糕,我希望避免这种行为。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...