Android - Intent for custom voice action

梦想的初衷 提交于 2019-11-30 07:17:52

As I understand you want Google Voice Search application to launch your application when you say a special key phrase. I think that at the present moment there is no possibility to add your functionality in the Google Voice Search application (there is no API for this).

However, you can implement your own Voice Search application in the following way:

  1. You can create an AppWidget and put it on the desktop.
  2. When a user click on this AppWidget you can call your service and from this service launch voice recognition activity.
  3. This activity will return the result of the recognition (http://developer.android.com/resources/articles/speech-input.html) which can be processed in the service. During this you can compare a result of the recognition with yours predefined strings for application launching and if there is a match then you can simply call needed application.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!