全局搜索无法在Android 4.4中正常运行 [英] Global search not working as expected in Android 4.4

查看:118
本文介绍了全局搜索无法在Android 4.4中正常运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个具有两个都扩展了SearchRecentSuggestionsProvider的搜索建议提供程序的应用程序,并且已使用以下Intent过滤器和元数据在清单文件中正确设置了它:

I've got an application that has two search suggestion providers that both extend SearchRecentSuggestionsProvider, and I've set it up correctly in the manifest file with the following Intent filter and meta-data:

<intent-filter>
   <action android:name="android.intent.action.SEARCH" />
</intent-filter>

<meta-data
   android:name="android.app.searchable"
   android:resource="@xml/searchable_tv" />

可搜索资源包括android:includeInGlobalSearch="true",所以应该没问题.

The searcable resource includes android:includeInGlobalSearch="true", so that should be fine.

我显然也在那里有一个提供者:

And I've obviously got a provider there as well:

<provider
   android:name="com.miz.contentprovider.TvShowContentProvider"
   android:authorities="com.miz.contentprovider.TvShowContentProvider"
   android:exported="true" />

这一切在使用Google搜索应用程序的Android 4.3中都可以正常工作,但是我刚刚将所有设备更新为Android 4.4,并且不再能够在应用程序中搜索内容.对于在操作系统更新之前可以运行的其他应用程序(即Google Play音乐)也是如此.

This all worked just fine in Android 4.3 using the Google search application, but I've just updated all my devices to Android 4.4 and I am no longer able to search content within my application. Same thing goes for other applications that worked before the OS update, i.e. Google Play Music.

我在XDA开发人员上发现了一个线程,如果有帮助,它也对此进行了提及: http://forum.xda-developers.com/showthread.php?p=47472102

I've found a thread on XDA developers that mentions this as well, if it helps: http://forum.xda-developers.com/showthread.php?p=47472102

有人知道发生了什么或如何解决?

Does anyone have any idea what's happening or how it can be fixed?

更新:我可以确认它仅在装有Android 4.4的设备上发生.我已经在使用最新Google搜索更新的Android 4.3设备上进行了测试,并且可以按预期运行.看来这是Google更新中的错误.

Update: I can confirm that it only occurs on devices with Android 4.4. I've tested on an Android 4.3 device using the latest Google Search update, and it works as expected. Looks like it's a bug in Google's update.

推荐答案

我在AOSP中发现了此提交,这可能与以下方面有关: https://android.googlesource.com/platform/packages/apps/QuickSearchBox/+/ecf356c15143ab0583c64682de16d94a57f7dd/a>

I found this commit in AOSP, which might be related: https://android.googlesource.com/platform/packages/apps/QuickSearchBox/+/ecf356c15143ab0583c64682de16d94a57f7dd1c

提交消息告诉我们该功能是由于性能原因而被删除的(鉴于它引用了内部票证ID,而我在官方Bugtracker上未找到与此相关的问题,因此可能为真或不正确)

The commit message tells us that this feature was removed due to performance reasons (which might or might not be true, given that it references an internal ticket id and I didn't find a related issue about this on the official bugtracker).

这篇关于全局搜索无法在Android 4.4中正常运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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