How to promote/open app from Google search website results?
Asked Answered
P

1

8

Background

When you search on Google's search engine website on an Android device (via Chrome web browser) something like "how to get to X" (where X is a geographic location, like a city name) , the first item that is shown is a card that allows to navigate to the location you've written.

When choosing to navigate, there are 2 options:

  • if the Android device has Google-Maps installed, it opens the app and navigates there.
  • if the Android device doesn't have Google-Maps installed, it goes to the play store to the app's page, to install it.

as shown below:

enter image description here

In addition, on some cases, for something, Google can put an extra textbox to search within the website it has found, to get the results on it. Such a thing occurs for the Hebrew website "Zap" (which compares prices of products) :

enter image description here

The question

  1. Is there a promotion-program or service or anything to promote a website/app/both this way (deep linking and search box)? If so, where should I start?

  2. Suppose you already have a website that can perform search queries, how do you do the check of whether the app is installed or not (inside the website, not via Google's search engine), and act accordingly? Can this be done only on Google Chrome app?

What should be done (code in android-app, website and others) in order to have those features?

Phenomena answered 27/4, 2015 at 14:9 Comment(0)
H
12

For your first question, what you might be looking for is what is called App Indexing. As Google itself describes it:

App Indexing lets Google index apps just like websites. Deep links to your Android app appear in Google Search results, letting users get to your native mobile experience quickly, landing exactly on the right content within your app.

Basically, the App Indexing API is the one responsible for informing the web of the deep links present in your application. So, first of all, you'll have to add those deeplinks to your mobile application. You can do that in android by specifying Intent Filters and defining a schema like described here and on iOS by defining URLTypes as described here.

Once you have your deeplinks working, you'll add the App Indexing API to your app through Google Play Services. Basically, you'll add calls to every onStart() and onStop() of the Activitys you're interested into indexing with code like:

// in onStart()
AppIndex.AppIndexApi.start(mClient, viewAction);

// in onStop()
AppIndex.AppIndexApi.end(mClient, viewAction);

You can also find more details for the API and how to set it up in detail here.

Since last month, you can also drive installs of your app through App Indexing, as noticed here.

PS: If you're interested, there are nice DevBytes videos about App Indexing here and here.


The search box in Google Chrome results is called Sitelinks Search Box, so if you do have already a querying mechanism on your website, all you have to do is implement the schema.org markup on it:

<script type="application/ld+json">
{
   "@context": "http://schema.org",
   "@type": "WebSite",
   "url": "https://www.example-petstore.com/",
   "potentialAction": {
       "@type": "SearchAction",
       "target": "https://query.example-petstore.com/search?q={search_term_string}",
       "query-input": "required name=search_term_string"
    }
}
</script>

After that, you'll have to wait a little for Google to update its crawlers with your new information. You can find detailed information about the markup with examples and troubleshooting here.

Herrera answered 3/5, 2015 at 15:29 Comment(5)
What about the part that goes to the play store webpage of the app, if the app isn't installed? Also, how do I tell the App-Indexing API which type of queries/commands the app supports?Phenomena
By implementing App Indexing, your app will automatically present an install button if it's not installed yet, the video link I left previously talked about that, but in any case, I've edited the answer to make it more clear. About the types of queries and commands for App Indexing, that's the job of Deep Links. The link I left earlier explains how to do it, by defining the schema into your AndroidManifest.xml file. There is also a codelab that might help you.Firstling
I don't understand how the "deep links" works. Suppose the app can only handle queries of telphone numbers, what should be done in order to tell Google Search to show the app only in case the query is of phone numbers?Phenomena
If you're just searching for numbers in Search, I fear there is no way to deep link directly, otherwise we would have an almost infinite number of apps trying to handle those links. You can define a deep link with your app schema and treat the numbers internally, so, for example, myapp://call=325458754 that would start a CallActivity with 325458754 as parameter. Also, you can define an Intent Filter to make your app a dialer, or even integrate it with Google NowFirstling
why infinite number of apps? not all texts that are entered are valid phone numbers... Also, not all are for calling. I could, for example , search for phone numbers to show information about the person based on it.Phenomena

© 2022 - 2024 — McMap. All rights reserved.