Code example for SearchManager

Methods: getSuggestions

0
    } 
 
    public Cursor getSuggestions(Context context, String query) {
        SearchManager searchManager =
                (SearchManager) context.getSystemService(Context.SEARCH_SERVICE);
        return searchManager.getSuggestions(mSearchable, query);
    } 
 
    public boolean supportsSuggestions() { 
        return !TextUtils.isEmpty(mSearchable.getSuggestAuthority());
    } 
 
    public void close() { 
    } 
 
    public boolean supportsVoiceSearch() { 
        return getName().equals(SearchEngine.GOOGLE);
    } 
 
    @Override 
    public String toString() {