androidbroadcastreceivergoogle-voice

Implement Google Voice Actions in Android


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?


Solution

  • 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 intent android.media.action.MEDIA_PLAY_FROM_SEARCH.… When your activity receives this intent, you can find the user’s search query inside the SearchManager.QUERY string extra.