简体   繁体   English

如果目标应用已运行,Firebase 动态链接将不起作用

[英]Firebase Dynamic Links does not work if the target app have run

I setup Firebase Dynamic Links in my project.我在我的项目中设置了Firebase 动态链接 At a glance everything works.一目了然,一切正常。 But there is one exception.但有一个例外。 When I click the link my app starts and processes it.当我点击链接时,我的应用程序会启动并处理它。 But if my app have already run and I click the link the app is appearing on the screen and it doesn't process the link because the intent in the FirebaseDynamicLinks listener is null.但是,如果我的应用程序已经运行并且我单击该应用程序出现在屏幕上的链接,并且它不会处理该链接,因为FirebaseDynamicLinks侦听器中的意图为空。 I have only one Activity with singleTask launchMode and I subscribe for the FirebaseDynamicLinks in two places: onCreate() and onNewIntent().我只有一个带有 singleTask launchMode 的Activity ,我在两个地方订阅了FirebaseDynamicLinks :onCreate() 和 onNewIntent()。 I use the latest version of the library - 19.1.1 Can anybody explain me what I'm doing wrong?我使用最新版本的库 - 19.1.1 谁能解释一下我做错了什么?

It was my mistake.这是我的错误。
In the onNewIntent(Intent) method I used Activity.getIntent() instead of incoming parameter.onNewIntent(Intent)方法中,我使用Activity.getIntent()而不是传入参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM