307

I am getting the following tool tip in AndroidManifest.xml:

App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent-filler. See issue explanation for more details.

Adds deep links to get your app into the Google index, to get installs and traffic to your app from Google Search.

enter image description here

Can anyone explain why it is so?

Community
  • 1
  • 1
Pratik Butani
  • 51,868
  • 51
  • 228
  • 375
  • To see it in action, see here: https://stackoverflow.com/questions/56631387/what-is-the-end-result-if-i-add-action-view-in-my-app/56668348?noredirect=1#comment99925280_56668348 – user1506104 Jun 20 '19 at 14:27

5 Answers5

240

From official documentation :

To enable Google to crawl your app content and allow users to enter your app from search results, you must add intent filters for the relevant activities in your app manifest. These intent filters allow deep linking to the content in any of your activities. For example, the user might click on a deep link to view a page within a shopping app that describes a product offering that the user is searching for.

Using this link Enabling Deep Links for App Content you'll see how to use it.

And using this Test Your App Indexing Implementation how to test it.

The following XML snippet shows how you might specify an intent filter in your manifest for deep linking.

<activity
    android:name="com.example.android.GizmosActivity"
    android:label="@string/title_gizmos" >
    <intent-filter android:label="@string/filter_title_viewgizmos">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
        <data android:scheme="http"
              android:host="www.example.com"
              android:pathPrefix="/gizmos" />
        <!-- note that the leading "/" is required for pathPrefix-->
        <!-- Accepts URIs that begin with "example://gizmos” -->
        <data android:scheme="example"
              android:host="gizmos" />

    </intent-filter>
</activity>

To test via Android Debug Bridge

$ adb shell am start
        -W -a android.intent.action.VIEW
        -d <URI> <PACKAGE>

$ adb shell am start
        -W -a android.intent.action.VIEW
        -d "example://gizmos" com.example.android
Philip Belgrave-Herbert
  • 4,340
  • 2
  • 30
  • 38
Mk.Sl.
  • 2,769
  • 1
  • 9
  • 11
  • 5
    @user25 scheme is the uri scheme, scheme can be http, https, ftp etc – Bhargav Sep 22 '16 at 07:16
  • 89
    well all of this for specific apps, then why show that warning? not all apps need this, not all apps are webview of some sites. Google is so annoying.. – user924 Jun 30 '18 at 13:39
  • 64
    It can be suppressed anyway with tools:ignore="GoogleAppIndexingWarning" – ecle Aug 27 '18 at 02:32
  • 12
    Curious that the warning says you need an `ACTION-VIEW` intent-filter, yet the solution involves `action.VIEW`. Likewise, following the link in Android Studio takes you to a webpage where `ACTION-VIEW` does not appear. The least they could do with obtrusive warnings is give you accurate messages and help pages. – John Perry Oct 20 '18 at 16:29
  • 7
    @ecle Where does one put this option? / Never mind; I found it: One has to add `xmlns:tools="http://schemas.android.com/tools"` to the `manifest` tag, then add `tools:ignore...` to the `application` tag. – John Perry Oct 20 '18 at 16:31
  • Why `-d "example://gizmos"` doesn't work, but `-d "http://www.example.com/gizmos"` works ? – NickUnuchek Feb 19 '19 at 08:33
  • Update: https://developer.android.com/studio/write/app-link-indexing – FindOutIslamNow Nov 03 '19 at 03:27
  • I agree that it is pretty insane that this warning is presented by default. Unless you are showing some website-like content, this does not make any sense at all. – Mike76 Nov 05 '19 at 15:30
195

You can remove the warning by adding the below code in <intent-filter> inside <activity>

<action android:name="android.intent.action.VIEW" />
Bibin Johny
  • 3,017
  • 1
  • 9
  • 16
  • 6
    This work's for me. I think this is the answer what I'm looking for. – Mahmudur Rahman Nov 10 '18 at 18:21
  • 13
    This appears to be the correct solution if you don't want to enable app indexing. Rather than just removing the warning via `tools:ignore="GoogleAppIndexingWarning"`. I added it as a sibling to `` in the main activity. – Daniel F Dec 05 '18 at 12:11
  • 4
    but why we need this line in code blindly ? any specific reason ? – Ghanshyam Nayma Jan 13 '19 at 05:20
  • 2
    @Ghanshyam, This is for app indexing on google search. ie, this enables your app to be shown on google search results. – Bibin Johny Jan 25 '19 at 13:47
  • 15
    @GhanshyamNayma adding this line just removes the warning. Without the extra code needed to add actual app indexing. Not exactly best practice, but I understand that warnings are annoying. I would just go with `tools:ignore="GoogleAppIndexingWarning"` instead because then you won't be adding an empty ACTION_VIEW. It might not cause any issues, but you always want to be safe. – Carson J. Feb 14 '19 at 17:43
  • 8
    ah so THIS is why so many random apps are showing up for ACTION_VIEW now... eesh – CCJ Jul 18 '19 at 18:58
136
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.app"
tools:ignore="GoogleAppIndexingWarning">

You can remove the warning by adding xmlns:tools="http://schemas.android.com/tools" and tools:ignore="GoogleAppIndexingWarning" to the <manifest> tag.

Andy Weinstein
  • 2,460
  • 3
  • 16
  • 26
Pat Lee
  • 1,411
  • 1
  • 6
  • 10
25

Adding this intent filter to one of the activities declared in app manifest fixed this for me.

<activity
    android:name=".MyActivity"
    android:screenOrientation="portrait"
    android:label="@string/app_name">

    <intent-filter>

       <action android:name="android.intent.action.VIEW" />

    </intent-filter>

</activity>
Oladipo Olasemo
  • 1,890
  • 22
  • 27
1

this solution work only .if your want to ignore this Warning

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:ignore="GoogleAppIndexingWarning"
    package="com.example.saloononlinesolution">
benten
  • 109
  • 1
  • 9