androidautosuggestquick-search

Disable recent query suggestions in Android's global Quick Search Box?


I've implemented a ContentProvider to add custom suggestions to my applications Quick Search Box. It works great within my app. However I also included it into the global search and it works different there. Whenever I start a search in the global search and I select one of my suggestions, this suggestion is saved and presented the next time I open the global search. What I don't like is that my current suggestions are below the ones I clicked before.

Is there a way to disable this behavior?

I am currently thinking of integrating recent suggestions in my ContentProvider to provide both - recent and custom suggestions. Though I am afraid this will result in having the same suggestions twice - first from the global search and then from my ContentProvider...

Any advice?


Solution

  • To answer my own question, it is possible by providing the SUGGEST_NEVER_MAKE_SHORTCUT value in the SUGGEST_COLUMN_SHORTCUT_ID column.

    As usual this is described in the Android developer documentation here.