我们正在尝试实施Google's App Indexing功能。我们已经添加了深层链接到我们的网站在以下格式REL-备用标记:在Deep Link中使用&符号进行索引编制索引
android-app://id.of.the.app/scheme/?screen=Product&product=123456
现在,我们得到内容不相符抓取错误。如果我使用QR码从here进行测试,一切正常。但是,如果我打开抓取错误,请单击“打开应用程序页面”并使用adb命令进行测试,我可以看到从&开始的所有内容都不会传递到应用程序,因此无法加载我的产品数据。我怀疑这是抓取程序如何检查应用程序的内容,这就是我们得到内容不匹配错误的原因。
另外,如果我使用Search Console中的“Google抓取方式”,它看起来像从&符号中的所有内容都会被截断。
我检查易趣,因为它正在与他们的应用程序,这就是他们所使用的链接:他们已经编码的符号与&
android-app://com.ebay.mobile/ebay/link/?nav=item.view&id=221559043026&referrer=http%3A%2F%2Frover.ebay.com%2Froverns%2F1%2F711-13271-9788-0%3Fmpcl%3Dhttp%253A%252F%252Fwww.ebay.com%252Fitm%252FRoxy-Fairness-Backpack-Womens-Red-RPM6-%252F221559043026%253Fpt%253DLH_DefaultDomain_0
,但如果我这样做,并测试它的“取像谷歌“功能它也不起作用。
这些用户似乎有同样的问题,但他们不同意的解决方案(如果他们发现一个):
https://productforums.google.com/forum/#!msg/webmasters/5r7KdetlECY/enYknTVkYU4J https://productforums.google.com/forum/#!topic/webmasters/lswyXKlS-Ik
我很感激您的任何想法。
更新1
这就是我如何解释的Android应用程序内部的深层链接:
Uri data = getIntent().getData();
String scheme = data.getScheme();
if (scheme.equals("scheme")) {
String screen = data.getQueryParameter("screen");
if (screen.equals("Product")) {
String product = data.getQueryParameter("product");
// Open Product and give it product number as intent data
}
}
更新2
下面是我们的Manifest.xml的相关部分:
<activity
android:name="id.of.the.app.StartActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_title"
android:windowSoftInputMode="adjustPan|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:scheme="scheme" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
你如何获得&后面的内容? –
我更新了我的问题,并添加了一些关于深度链接在android应用程序中的处理方式 –
我没有收到您的问题,我直接使用网页和adb命令。你能分享你如何得到“抓取错误”吗? –