How to Use Google Android M Voice API on the Android App Development?
A month and a half back Google announced Android M at the I/O conference. Mobile Payments, Power and Charging, Finger Print support, and other Web Experience-related advantages are all people have been waiting for.
Now, it's glad that just a few days ago, there came the news, especially for the developers from the google developers, the Google devs. It says that applications can now be developed so as to have a dialog between the user and the system. Talking directly, Google has come up with the “Voice Interaction API”.
Although the name explains much about its use, we shall discuss the broader view for this very special API and how it is different from the general voice-related APIs.
We have seen Voice searches or Voice Text conversion in the Android applications to date. But imagine an event where the application would like to respond back to the end-user. Voice Interaction API supports that part of the functionality.
The user gives commands to the application, which in turn confirms the action providing a list of options to select from, How does a developer implement that is another deep yet not so difficult concept.
Rapid and smooth completion of any tasks with mere commands is what Google Voice Actions helps us at, You don’t need a clumsy mess of APIs and plugins for this. Just one API and you are through with the implementation of the functionality.
Let’s see something about the inbuilt System Voice Actions.
It is a 3 step process that forms the basis for the actions to implement, Determine the intent, handle it in the app and lastly report what API does. This explains that initially an intent filter is created which defines the action that needs to be performed.
Later when the app receives the intent, the action must be performed. And lastly, the “end()” method must be called along with an appropriate action type.
These include some of the most commonly used actions that have to deal with the implanted applications of your phone.
Here are the built-in ones:
- Search actions
- Communication Actions to initiate a phone call
- Media actions to play music, take a picture or record a video,
- Fitness action to start/stop a run, bike ride, or show heart rate
- Alarm action to set alarm or timer
- Open actions to open a URL or an application.
There is a bit more to support Custom Voice Actions. Here you are allowed to create new commands. For that, you need to create use cases of your own, depending on the type of use of your application.
Technology is advancing and Android will never lag behind in the race. With this brand-new API, there has come a new turn for “Android Application Development.” There will be more user convenience tending to more customer attraction. So go for it!