哪里Android商店搜索词的历史为我们的搜索功能的活动? [英] Where does android store search term history for our search-enabled activities?

查看:206
本文介绍了哪里Android商店搜索词的历史为我们的搜索功能的活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我定义我的活动之一,是搜索的:

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.

下一次我打了搜索键,它看起来像OS已经存储了我的previous查询,构建我所有的previous搜索词的列表。哪里OS存储搜索字词的这段历史?我想知道,如果它是在一个安全的位置,因为历史可以为隐私的敏感,

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

感谢

推荐答案

确定它存储在这里:

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

这篇关于哪里Android商店搜索词的历史为我们的搜索功能的活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆