tagit
- Forum posts: 1
Jan 16, 2011, 5:39:21 PM via Website
Jan 16, 2011 5:39:21 PM via Website
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" />
-------------------------------------------------------------------------------------------
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" />
-------------------------------------------------------------------------------------------
— modified on Jan 19, 2011, 4:14:54 PM
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.