应用链接无法在移动浏览器中使用Intent

时间:2019-02-22 22:49:10

标签: android android-intent deep-linking

我正在尝试直接从网络浏览器(如果是移动设备)打开应用程序(数字钱包应用程序)

我已经提到了以下链接

Make a link in the Android browser start up my app?

Launch custom android application from android browser

为供您参考,我正在使用集成支付网关(数字钱包)在我的网站中,该支付网关具有 QR码(扫描并付款)之类的付款方式,另一个是深层应用程序链接,所以我要实现的是,如果网站,那么付款类型将是 QR代码(已实现),但如果是移动设备,则将是深层应用链接 (由数字钱包支付网关提供)。

这是manifest.xml文件中可用的Intent过滤器,但我无法对其进行编辑(因为该应用程序来自第三方)。

enter image description here

我的目的是,如果用户通过移动浏览器访问并在我的网站上付款?然后我想使用深层链接(由付款网关提供)重定向到数字钱包应用程序以完成付款。

这是Halalah数字钱包支付网关中提供的深层链接 https://halalah.sa/wp-content/uploads/2018/12/HalalaH-Deep-Linking-Guide.pdf

  

halalahewallet:// transaction?terminal = HG00001&amount = 0.02&referenceNo = london50&billNo = london123&memo = memo

为此,我尝试了以下代码作为链接

<a href="intent://transaction?terminal=HG00001&amount=0.01&referenceNo=london501&billNo=london1231&memo=memo#Intent;scheme=halalahewallet;package=sa.halalah.halalah;end">Pay using App</a>

尽管我在上面安装并配置了该应用程序,但我在测试上述代码时却没有将参数值付诸行动(因此应用程序不会启动执行付款,而是转到其Play商店页面)。 / p>

我使用带有上述深层链接uri的深层链接测试器应用(https://play.google.com/store/apps/details?id=com.manoj.dlt&hl=en)进行了检查-它启动了网站,没有任何问题,我想问题是来自网络浏览器还是我的上述意图代码引起的?我想直接使用所需参数从浏览器启动该应用程序以执行付款。

1 个答案:

答案 0 :(得分:0)

尝试在标签中添加 target =“ _ blank”

<a target="_blank" id="deepLink" href="HalalaHeWallet://Transaction?terminal=HG00001&amount=0.02&referenceNo=refNumber&billNo=billNumber&memo=memo&callback=slack://open" class="btn btn-primary btn-block mt-2 ">pay throw Halalah App</a>

,有关Halalah集成的更多信息,请查看以下链接: https://github.com/halalah/HalalaH-Integration-Guides

相关问题