0

Hi I want to implement google app indexing for android. But the documentation is confusing. Months ago I implemented local autocompletion using the following guide: https://codelabs.developers.google.com/codelabs/app-indexing/#0

Now I want to enable google search feature, the doc claims that google systems will crawl my manifest file and based on intent-filters will do the indexing, here is a fragment of that doc:

https://developers.google.com/app-indexing/android/publish#add-app-indexing-api-calls

So I'm confused, what is the difference between this two links? Should I have both of them in my code or the previous link is just the old version of doing things ?

mdavid
  • 563
  • 6
  • 20

1 Answers1

0

There is no difference in both the guides you mentioned. Except that in the 1st guide, you are capturing the result of AppIndex.AppIndexApi.start and writing it to log. And in the 2nd one, you are not.

Compare the onStart() method in both of them. You are first connecting to GoogleApi client. Then calling the start method of AppIndexApi.

Sasank Mukkamala
  • 1,504
  • 13
  • 22
  • So I just should choose one of them, right? But in the first one deep link structure is specified manually. Does the second one do this automatically? – mdavid Feb 01 '16 at 16:26
  • No. This has to be done manually in both the cases. No difference there too. Look for `mUrl` in the 2nd link. – Sasank Mukkamala Feb 01 '16 at 16:52
  • But I don't know which guide to use – mdavid Feb 01 '16 at 16:58
  • Like I said, both are same. No difference. You will have to mention the url manually. In the 2nd link, the link is for a webpage, this can also be an app uri. – Sasank Mukkamala Feb 01 '16 at 17:00
  • I have answered your original question. If you have already implemented app indexing using the 1st guide and it is working fine, then you don't have to change anything. Please mark this as an accepted answer if you are satisfied. If you have other doubts about app indexing, you should start a new question. – Sasank Mukkamala Feb 01 '16 at 17:02
  • But my implementation is just for local autocompletion. So for ranking my website pages I should use second one, right? And the indexing for web search google will do automatically by crawling the manifest – mdavid Feb 01 '16 at 17:14
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/102269/discussion-between-mdavid-and-sasank). – mdavid Feb 01 '16 at 17:18