我想在Google即时快速搜索框中搜索我的应用.我按照一些例子但它仍然无效.官方文件根本不清楚如何使这个案例有效.
现在在检查了这些stackoverflow问题之后,我开始想知道这个功能是否仍然可供开发人员使用?
我确实看到一些应用程序仍然在快速搜索框设置中的"手机搜索"列表中.如果是这样,任何人都可以为我做点什么?我的可搜索配置xml如下
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/app_name"
android:hint="@string/search_hint"
android:searchSuggestAuthority="@string/search_authority"
android:searchSuggestIntentAction="android.intent.action.VIEW"
android:searchSuggestIntentData="content://some_search_authority"
android:includeInGlobalSearch="true">
</searchable>
Run Code Online (Sandbox Code Playgroud)
在这个AndroidManifest.xml文件中,我确实已经meta-data指定了SearchableActivity例如
<activity ...>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
Run Code Online (Sandbox Code Playgroud)