Search code examples
androidapplication-settingsappsettingsgoogle-searchsearchable

Enabling my application to show up in the Android Global Search


I have an application that I have made searchable, and I want to include it in the Google Search bar by default, or give my users the option of enabling it from within my application. I have already exposed it by adding android:includeInGlobalSearch into my searchable.xml, but how would I enable it from my settings within the application?

I know I can also launch the Settings.ACTION_SEARCH_SETTINGS activity and have them select it, but how would I shift the focus/scroll to my application if it is below the initial fold?


Solution

  • AFAIK, you can't. The user has to enable it, you can't force them to. You can' control the focus scroll either, best you could do is experiment with different names and see how this affects sorting.