• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps 

tagit

Lurker
Hi, I am trying to implement recent Query Suggestions into my app, but got stuck in a “Failed to find provider info ” error
please give some help

code as below:

-------------------------------------------------------------------------------------------
//searchable.xml

<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:searchSuggestAuthority = "testing.advancedsearch.mysuggestionprovider"
android:searchSuggestSelection=" ?"
>
</searchable>

-------------------------------------------------------------------------------------------
// content provider class

package testing.advancedsearch;

import android.content.SearchRecentSuggestionsProvider;

public class MySuggestionProvider extends SearchRecentSuggestionsProvider {
public final static String AUTHORITY = "testing.advancedsearch.mysuggestionprovider";
public final static int MODE = DATABASE_MODE_QUERIES;

public MySuggestionProvider() {
setupSuggestions(AUTHORITY, MODE);
}
}

-------------------------------------------------------------------------------------------

// manifest.xml

<provider android:name=".MySuggestionProvider"
android:authorities = "testing.advancedsearch.mysuggestionprovider" />

-------------------------------------------------------------------------------------------
 
Back
Top Bottom