How to add my application to google local search?

In android, we see that on the launch bar there is a "Google search" by default. And I found out that using the setting, we can set the elements available for search. For example, Amazon Kindle, music or browser.

The question is, how can I add my application to search elements in a Google search? Are there any APIs I can use?

+5
source share
1 answer

Exactly, the first thing you do is provide a resource searchable.xmlfor Android. How this is done is described here .

Then you must declare an action that will be searchable in your manifest, for example:

<activity android:name="...">
  <intent-filter>
    <action android:name="android.intent.action.SEARCH" />
  </intent-filter>
  <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" />
</activity>
+4
source

All Articles