automatic/programatic opt-in for new QSB/Search Manager content provider

80 views Asked by At

I wrote a new Content Provider to serve a new Searchable Item class for the Search Manager.

As I understand now, user has to opt-in so that my new searchable item class is included in their global search.

Is there a way to automatically opt-in when my app is installed? Or to do this programmatically so that I can provide a dialog box where user can opt-in through my app easily?

1

There are 1 answers

0
CommonsWare On

Is there a way to automatically opt-in when my app is installed?

No.

Or to do this programmatically so that I can provide a dialog box where user can opt-in through my app easily?

No. However, you can try to invoke ACTION_SEARCH_SETTINGS to start up the search page of the Settings app, where the user can check the checkbox.