App Indexing Android - “<link>” in “<head

2019-05-03 10:47发布

问题:

We are struggling with the app indexing topic from google. The plan is to insert a tag in the -area of a website (crwaled from google) like this:

android-app://com.testApp/myCustomScheme/car/ford

and after that to visit this website with the smartphone and the app should open. But it isn't work...

AndroidManifest:

In the AndroidManifest we inserted following code:

<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>

The appPackage is: "com.testApp".

HTML-Code:

<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" />
...

Problems:

When i visit the website with this code, my app isn't opening.

After testing the deeplink with the deeplink-test-tool from google everything works perfectly (https://developers.google.com/app-indexing/webmasters/test)

Maybe i have a wrong understanding of this feature... but everytime i visit this website with my mobile-brwoser (and the app is installed) the app should start at the same moment, am i right?

Is it necessary to do any further action in the google search-console?

UPDATE:

@ArunL 's answer is a part of the whole process you have to do to have a working solution. Thanks for your information and help.

Very helpful for the correct implementation was this guide from google itself: http://search-codelabs.appspot.com/codelabs/web-deep-linking#1

Another helpful tool was the webmaster-tool from Google: https://www.google.com/webmasters/tools/

There you can upload a LOCAL .apk to test/fetch your deeplink-implementation with a real apk which is not in "production / live"

Also you can test your impl with your .apk which is live on Play Store.

Thanks for your time, Ilias

回答1:

It'll work only from google search results page. If your website is properly indexed and appears in google search results, check if exists in the website's page source in google's cached content: http://webcache.googleusercontent.com/search?q=cache:yourwebsite.com.

Also, you might need to move your apk to PRODUCTION if it's in BETA TESTING in Google Play Developer Console.