"Android Translation article" the most convenient way to build voice search and your app

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.