我们正在努力解决谷歌的应用程序索引主题。
该计划是在网站的 - 区域中插入一个标签(从 google 获取),如下所示:
android-app://com.testApp/myCustomScheme/car/ford
然后用智能手机访问该网站,应用程序应该打开。但这是行不通的...
Android 清单:
在AndroidManifest中我们插入以下代码:
<intent-filter android:label="test">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="myCustomScheme"
android:host="car"
android:pathPrefix="/ford"/>
</intent-filter>
应用程序包是:“com.testApp”。
HTML 代码:
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge;chrome=1">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no">
<link rel="alternate" href="android-app://com.testApp/myCustomScheme/car/ford" />
...
问题:
当我使用此代码访问网站时,我的应用程序无法打开。
使用谷歌的 Deeplink-test-tool 测试深度链接后,一切正常(https://developers.google.com/app-indexing/webmasters/test https://developers.google.com/app-indexing/webmasters/test)
也许我对这个功能的理解有误......但是每次我用我的移动浏览器访问这个网站(并且安装了应用程序),应用程序应该在同一时刻启动,对吗?
是否有必要在谷歌搜索控制台中执行任何进一步的操作?
UPDATE:
@ArunL 的答案是你必须做的整个过程的一部分,以获得一个可行的解决方案。感谢您的信息和帮助。
谷歌本身的指南对于正确实施非常有帮助:http://search-codelabs.appspot.com/codelabs/web-deep-linking#1 http://search-codelabs.appspot.com/codelabs/web-deep-linking#1
另一个有用的工具是 Google 的网站管理员工具:https://www.google.com/webmasters/tools/ https://www.google.com/webmasters/tools/
在那里,您可以上传本地 .apk,以使用不在“生产/实时”中的真实 apk 来测试/获取您的深层链接实现
您还可以使用 Play 商店上发布的 .apk 测试您的 impl。
谢谢你的时间,
伊利亚斯