Hi im stuck on this one.
Setting up a RecentSearchProvider as such
public class MyRecentSuggestionProvider extends SearchRecentSuggestionsProvider {
public final static int MODE = DATABASE_MODE_QUERIES;
public static String AUTHORITY = "com.xxxxx.authority";
public MyRecentSuggestionProvider() {
super();
setupSuggestions(AUTHORITY, MODE);
}
}
However I would like to set the Authority from res/strings ie.
setupSuggestions(getContext().getResources().getString(R.string.authority), MODE);
Though this gets a null pointer exception.
Any suggestions as to how to get about this?
Aiden
Took me a while but i found a great way to do this.
As my app can be built against many targets, with different package names i did this.
Hope this helps someone