Reprint Please specify source: http://blog.csdn.net/zhaokaiqiang1992
If you want your users to say "Ok,google" and then search for something in your app, how many lines of code do you need? In fact, it doesn't take a few lines of code.
From now on, you just need to be in yourAndroidManifest.xml文件里面添加一点点代码,你就可以让你的搜索界面连接到Google上
<activity android:name= ". Searchableactivity "> <intent-filter> <action android:name=" Com.google.android.gms.actions.SEARCH_ACTION "/> <category android:name=" Android.intent.category.DEFAULT "/> </intent-filter></activity>
Once you have done this, your application will receive a Search_action request intent that contains the Searchmanager.query parameter.
在google,我们一直在寻找创新的方式来帮助提高手机搜索,并且驱动用户回到你的应用里面。比如说,现在用户可以直接说:“帮我在Eat24上找pizza”或者是“帮我在网站上找旅馆”。
这个特性可以在英文环境的设备上运行,设备系统要求在4.1版本以上,需要Google App 3.5版本以上的运行环境。更重要的是,用户可以从任何屏幕上进行热词搜索,这可以为用户的搜索命令和你的APP之间创建最便捷的通道!
原文地址:http://android-developers.blogspot.com/2014/10/the-fastest-route-between-voice-search.html
"Android Translation article" the most convenient way to build voice search and your app