如何在 Android 中实现来自 Google 的全新语音操作
?
我正在考虑是否可以听一些音乐应用程序使用的 Listen to
操作。
我的应用是否必须注册为接收器才能接收特定的广播?
最佳答案
这在 Android Developers Blog: Supporting the new music Voice Action 中有解释:
In your
AndroidManifest.xml
, just register one of your activities for the new intentandroid.media.action.MEDIA_PLAY_FROM_SEARCH
.… When your activity receives this intent, you can find the user’s search query inside theSearchManager.QUERY
string extra.
关于android - 在 Android 中实现 Google 语音操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3555466/