How can I implement the fairly new Voice Actions
from Google, in Android?
I'm thinking about the possibility to listen to the Listen to
action as used by some music application.
Is there a specific broadcast my app must register as a receiver to?
Asked
Active
Viewed 2,125 times
1

tshepang
- 12,111
- 21
- 91
- 136

mariusgreve
- 2,621
- 6
- 23
- 31
1 Answers
2
This is explained in 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.

Josh Lee
- 171,072
- 38
- 269
- 275