How to implement search view autocomplete in actionbar using http request?
<p>I've added <a href="https://developer.android.com/reference/android/widget/SearchView.html" rel="nofollow noreferrer">search view</a> widget to my action bar and would like to handle autocomplete feature. After writing more then 3 letters it should fulfill http request to my web API which will return json result and should show search widget suggestions.
But in <a href="https://developer.android.com/guide/topics/search/adding-custom-suggestions.html" rel="nofollow noreferrer">documentation</a> is observed the case with content providers. How can I organize autocomplete feature?</p>

<p>Added search view in menu xml file:</p>

<pre><code>    &lt;item android:id="@+id/search"
    android:icon="@drawable/ic_search_white_24dp"
    android:title="Search"
    [namespace]:showAsAction="always"
    [namespace]:actionViewClass="android.widget.SearchView" /&gt;
</code></pre>

<p>Associates searchable configuration with the SearchView:</p>

<pre><code>public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.navigation, menu);

    SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
    SearchView searchView = (SearchView) menu.findItem(R.id.search).getActionView();
    searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));

    return super.onCreateOptionsMenu(menu);
}
</code></pre>

<p>Added searchable configuration:</p>

<pre><code>&lt;searchable xmlns:android="http://schemas.android.com/apk/res/android"
    android:label="@string/app_name"
    android:hint="@string/search_hint"
    android:searchSuggestAuthority="com.my.domain.searchable_activity" /&gt;
</code></pre>

<p>And ultimately added empty responsible activity.</p>