2

I'm defining one of my activities as being searchable:

// manifest.xml
<meta-data
  android:name="android.app.default_searchable"
  android:value=".MyActivity" />

When the user hits the search hard key, the OS shows an edit field where the user can enter a query, and I get called back with whatever text the user entered and do my search.

The next time I hit the search key, it looks like the OS has stored my previous query, building a list of all my previous search terms. Where is the OS storing this history of search terms? I'm wondering if it's in a secure location, because the history can be sensitive for privacy,

---------- update -------------------

To be more specific, this is the process by which I'm adding the suggestions:

SearchRecentSuggestions suggestions = new SearchRecentSuggestions(
  context,
  "com.me.myprovider", 
  DATABASE_MODE_QUERIES);
suggestions.saveRecentQuery("the query", null);

http://developer.android.com/guide/topics/search/adding-recent-query-suggestions.html

Thanks

user291701
  • 38,411
  • 72
  • 187
  • 285

1 Answers1

1

Ok it's stored here:

data/data/app.package.name/databases/databasename.db
user291701
  • 38,411
  • 72
  • 187
  • 285
  • Which is an sqlite database by the way. You can access it just like any other SQL database using the sqlite3 program in your device terminal (either by using adb or a terminal emulator), provided you have root access... – ToVine Jul 15 '14 at 17:52