In the android we can see that there is a default "google search" on the launcher. And I found out that using setting, we can set the searchable items. For example amazon kindle, music, or browser.
The question is, how can I add my app into the searchable items in the google search? Are there any APIs I can use?
Exactly, the first thing you do is provide a searchable.xml
resource to Android. How this is done is described here.
Next, you have to declare an Activity to be searchable in your Manifest, like so:
<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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With