public static void clearRecentHistory ( Context context ) { SearchHistoryDatabase database = SearchHistoryDatabase . getInstance ( context ) ; SearchHistoryDatabase . deleteAllData ( database ) ; }
If the search history is being displayed in the search results section you should provide a setting for the user to clear their search history . Calling this method will remove all entries from the database .