Search code examples
androidandroid-searchmanager

Hide search provider from google search app?


I have multiple search providers in my app. The thing with search providers is that they appear in the google search app/widget. Is there anyway to only display one of these providers instead of all of them? =)


Solution

  • I am not sure why you would bother having search providers that you do not want to have displayed.

    That being said, you can disable their components via PackageManager and setComponentEnabledSetting(). A disabled ContentProvider should not show up for the user to enable or in the actual search UI -- if it does, that'd be an Android bug IMHO. However, I do not know if re-enabling the provider will also require the user to go in and re-select it in the Search portion of the Settings app.