开发者

Where does android store search term history for our search-enabled activities?

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.开发者_StackOverflowsaveRecentQuery("the query", null);

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

Thanks


Ok it's stored here:

data/data/app.package.name/databases/databasename.db
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜