Android SearchRecentSuggestions - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android SearchRecentSuggestions class.

This code example shows how to use the following methods:
public class LoremSuggestionProvider 
  extends SearchRecentSuggestionsProvider {
  private static String AUTH="com.commonsware.android.search.LoremSuggestionProvider";
     
  static SearchRecentSuggestions getBridge(Context ctxt) {
    return(new SearchRecentSuggestions(ctxt, AUTH,
                                        DATABASE_MODE_QUERIES));
  } 
     
  public LoremSuggestionProvider() { 
      super(); 
       
      setupSuggestions(AUTH, DATABASE_MODE_QUERIES);
  } 
} 
7
CodeRank
This code example shows how to use the following methods:clearHistory
        super(); 
        setupSuggestions(AUTHORITY, MODE);
    } 
     
    public static void clearHistory(Context context) {
		SearchRecentSuggestions suggestions = new SearchRecentSuggestions(context, 
				SearchHistoryProvider.AUTHORITY, SearchHistoryProvider.MODE);
        suggestions.clearHistory();
    } 
} 
5
CodeRank
This code example shows how to use the following methods:saveRecentQuery
 
	static void saveQuery(final Context context, final String query) {
		new Thread(new Runnable() {
			@Override 
			public void run() { 
				final SearchRecentSuggestions suggestions = new SearchRecentSuggestions(context,
						AUTHORITY, MODE);
				suggestions.saveRecentQuery(query, null);
			} 
		}).start();
	} 
 
	public SearchSuggestionsProvider() { 
		setupSuggestions(AUTHORITY, MODE);
	} 
} 
5
CodeRank
This code example shows how to use the following methods:clearHistory
        super(); 
        setupSuggestions(AUTHORITY, MODE);
    } 
     
    public static void clearHistory(Context context) {
		SearchRecentSuggestions suggestions = new SearchRecentSuggestions(context, 
				SearchHistoryProvider.AUTHORITY, SearchHistoryProvider.MODE);
        suggestions.clearHistory();
    } 
} 
5
CodeRank
This code example shows how to use the following methods:
 
  /** 
   * Creates and returns a helper for adding recent queries or clearing the recent query history. 
   */ 
  public static SearchRecentSuggestions newHelper(Context context) {
    return new SearchRecentSuggestions(context, AUTHORITY, MODE);
  } 
} 
4
CodeRank
This code example shows how to use the following methods:
    public static void clear(Context context) {
        suggestions(context).clearHistory();
    } 
 
    private static SearchRecentSuggestions suggestions(Context context) {
        return new SearchRecentSuggestions(context, AUTHORITY,
                DATABASE_MODE_QUERIES);
    } 
 
    /** 
     * Create suggestions provider for searched for repository queries 
     */ 
    public RepositorySearchSuggestionsProvider() { 
        setupSuggestions(AUTHORITY, DATABASE_MODE_QUERIES);
    } 
} 
4
CodeRank
This code example shows how to use the following methods:clearHistory
        super(); 
        setupSuggestions(AUTHORITY, MODE);
    } 
     
    public static void clearHistory(Context context) {
		SearchRecentSuggestions suggestions = new SearchRecentSuggestions(context, 
				TorrentSearchHistoryProvider.AUTHORITY, TorrentSearchHistoryProvider.MODE);
        suggestions.clearHistory();
    } 
} 
5
CodeRank
This code example shows how to use the following methods:
    public static void clear(Context context) {
        suggestions(context).clearHistory();
    } 
 
    private static SearchRecentSuggestions suggestions(Context context) {
        return new SearchRecentSuggestions(context, AUTHORITY,
                DATABASE_MODE_QUERIES);
    } 
 
    /** 
     * Create suggestions provider for searched for issue queries 
     */ 
    public IssueSearchSuggestionsProvider() { 
        setupSuggestions(AUTHORITY, DATABASE_MODE_QUERIES);
    } 
} 
4
CodeRank
This code example shows how to use the following methods:
    private static Integer mode;
    private static String authority;
     
    private static SearchRecentSuggestions getSuggestions() {
        if (suggestions == null) {
            suggestions = new SearchRecentSuggestions(ConfigurationManager.getInstance().getContext(), authority, mode);
        } 
        return suggestions;
    } 
 
    public static void saveRecentQuery(String query, String line2) {
        try { 
            getSuggestions().saveRecentQuery(query, line2);
        } catch (Exception e) {
            LoggerUtils.error("SuggestionProviderUtil.saveRecentQuery() exception", e);
        } 
    } 
 
    public static void clearHistory() { 
        try { 
4
CodeRank
This code example shows how to use the following methods:
    new SearchRecentSuggestions(this.a, "com.google.android.gmail.SuggestionProvider", 1).clearHistory();
  } 
 
  public final void f() 
  { 
    new SearchRecentSuggestions(this.a, "com.google.android.maps.SearchHistoryProvider", 1).clearHistory();
    Uri localUri = Uri.parse("content://com.google.android.maps.SearchHistoryProvider/history");
    this.a.getContentResolver().delete(localUri, null, null);
  } 
 
  public final void g() 
  { 
    new SearchRecentSuggestions(this.a, "com.android.vending.SuggestionsProvider", 1).clearHistory();
  } 
} 
 
/* Location:           C:\Users\sandrocheng.21KUNPENG\Desktop\classes_dex2jar\ 
 * Qualified Name:     com.ijinshan.cleaner.n 
 * JD-Core Version:    0.6.2 
 */ 
4
CodeRank

Related Android SearchRecentSuggestions Questions & Answers:

See Code Examples for Android SearchRecentSuggestions Methods: