2015-04-07 45 views
2

我試圖在鏈接中存在「tel:」標記時打開我自己的應用程序。 所以我用一個意圖過濾器是這樣的:Android Intent在其他應用程序中打開

<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窗口,再加上我的應用,該應用我已經在後臺打開)。

我該如何告訴意圖(重新)打開我的應用程序,而不是在瀏覽器(或觸發意圖的其他應用程序)內?

我打開使用科爾多瓦webintent插件應用程序:

https://github.com/Initsogar/cordova-webintent.git 

實現的JavaScript內有以下電話:

window.plugins.webintent.onNewIntent(returnTelIntent); 
window.plugins.webintent.getUri(returnTelIntent); 
function returnTelIntent() {}; 
+0

你能告訴我們,應該打開你的應用程序的代碼? – k3b

+0

添加了插件和cordova的電話 – Dinkheller

+0

有沒有人找到解決方案?我有完全相同的問題... –

回答

相關問題