jelly bean search key

天涯浪子 提交于 2019-11-29 14:43:26

问题


In my Android app I enable my specific app-search to be triggered via the search key in a number of my activities using this mechanism from the manifest

    <meta-data 
        android:name="android.app.default_searchable"
        android:value=".Search.SearchActivity" />

with the appropriate search activity. This all worked fine until recently.

With the Jelly Bean update the Search Key now always starts Google NOW search functionality.

On this site: http://www.android.com/about/jelly-bean/ I found in the "Google Search" section this statement:

"For devices with a hardware search key, you can tap it to launch Google Search."

Has Google taken over all use of this key completely, or is there a way to recover it?

If I can't recover it, then it's UI design changes in almost all activities to add a Search menu option or action button....


回答1:


This has been done specifically to circumvent patent issue. This has been mostly done only in USA, where apple recently got an injunction on galaxy nexus. So all Android phones in USA will show this behavior from now on. So most of the apps in jelly bean have a on screen search button.




回答2:


If you have a cyanogenmod based phone (e.g. jellytime for HTC DHD like me), the old behaviour is only a setting away:

Menu/Systemsettings/System/Hardware keys/Search/In-App-Search

But this change wasted quite some of my time for debugging my app and researching to find this solution. Needless to say I hate patents, especially ridiculous ones: obvious behaviour like an OS sending a hardware key event to an application can be patented???



来源:https://stackoverflow.com/questions/11931395/jelly-bean-search-key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!