【发布时间】:2015-06-11 20:02:48
【问题描述】:
只要链接中有“tel:”标签,我就会尝试打开自己的应用程序。 所以我正在使用这样的意图过滤器:
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<action android:name="android.intent.action.VIEW" />
<data android:scheme="tel" />
</intent-filter>
但是当点击链接时,我的应用程序会在浏览器中打开(查看所有打开的应用程序时,我可以在浏览器中看到 myApp 窗口,以及我已经在后台打开的应用程序)。
如何告诉意图(重新)打开我的应用程序,而不是在浏览器(或触发意图的其他应用程序)内?
我使用 cordova webintent 插件打开应用程序:
https://github.com/Initsogar/cordova-webintent.git
通过以下调用在 javascript 中实现:
window.plugins.webintent.onNewIntent(returnTelIntent);
window.plugins.webintent.getUri(returnTelIntent);
function returnTelIntent() {};
【问题讨论】:
-
你能告诉我们应该打开你的应用程序的代码吗?
-
添加了插件和对cordova的调用
-
有人找到解决方案了吗?我遇到了完全相同的问题...
-
向上。我遇到了完全相同的问题
-
加倍。我从 app1 内启动 app2,而 app2 在 app1 内打开 - 而不是作为新窗口。我需要将 app2 启动到它自己的窗口中。
标签: android android-intent cordova-plugins tel