2

The url I want to deep link is in the following format: https://abc.example.com

My intent filter in the particular activity looks like this:

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"/>
<data android:host="abc.example.com"/>
<data android:pathPattern="/"/>
</intent-filter>

On doing a google browser search, my activity gets deep linked fine. However, a search in the Google app launcher (local search) does not work. This is what I've coded in the activity in the onStart and onStop:

public void onStart() {
    super.onStart();
    client.connect();
    Action viewAction = Action.newAction(
            Action.TYPE_VIEW, 
            "Title", 
            Uri.parse("android-app://my-app-package-name/https/abc.example.com")
    );
    AppIndex.AppIndexApi.start(client, viewAction);
}

Is there something missing in the intent filter or in the uri that needs to be added/modified to get the Google App search working?

1 Answers1

0

the 'title' argument when creating the ViewAction should be concise and with good keywords in respect to the content it is linked too.

And the URL should be the web page URL and not the deep link. You have more information regarding API calls in here.

Also, only after you opened the app content for some times, while the local Search be working completely as well as the autocomplete.

Stan Ct
  • 366
  • 1
  • 6