我們正在嘗試實施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命令。你能分享你如何得到「抓取錯誤」嗎? –