When I use google voice search, I can say "Send Text" and google will launch my SMS program.
I can say "Listen to" and google will start my default music app.
Is it possible for my app to register it's own "special phrase" such as: "MyApp DoSomething" and then have google launch MyApp with the "DoSomething" as a type of parameter I can capture and do something with?
To be a little bit more clear - I'm aware that the user can launch MyApp, then I can provide an action that starts the Voice Input, but I'd like the google voice search app to be able to start my application when certain key phrases are spoken.
An intent is a task or an action that a user requests to be fulfilled by a voice application. An intent can span multiple dialog steps and responses to be fulfilled.
Starting activities or services. To start an activity, use the method startActivity(intent) . This method is defined on the Context object which Activity extends. The following code demonstrates how you can start another activity via an intent.
Custom intents also have intent parameters, which you can map to parameters in your corresponding fulfillment. Unlike BIIs, custom intents require query patterns to describe example queries that a user might say. This approach differs from built-in intents, which each model common ways that users express that intent.
Android Intent is the message that is passed between components such as activities, content providers, broadcast receivers, services etc. It is generally used with startActivity() method to invoke activity, broadcast receivers etc. The dictionary meaning of intent is intention or purpose.
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With