We will use here the most generic of them all: OPEN_APP_FEATURE. Adding of an App ActionĪmong the built-in intents provided by Google, we can find a lot of generic actions such as START_EXERCISE, CREATE_TAXI_RESERVATION or GET_ACCOUNT, each one enabling the launching of a specific feature in our application with the appropriate parameters. You will also notice the presence of an intent-filter in the manifest to handle deep links. You will find there an AppActionsActivity which sets 3 listeners on 3 buttons allowing the launching of each feature.
#GOOGLE VOICE ACTIONS TUTORIAL CODE#
The code being very simple and of no specific interest, it is not shown here but the code is available on GitHub. Implementation of a simple App Actionįirst, let’s build a basic application. Then, we will see the “Custom Conversations” part in a later article. They can also provide visual interactions that will never require the launching of the application.įirst, we will focus on the “Solutions” part in order to understand the concept of a simple App Action through its implementation in an application.
![google voice actions tutorial google voice actions tutorial](https://androidtutorial.net/wp-content/uploads/2018/01/Google-Assistant-start-screen.jpg)
These actions are build by the developer through DialogFlow and allow us to create “real” conversations with the Assistant. The “ Custom Conversations” part, way more interesting from a developer perspective.Also, they can only be used to launch features in our applications with very few visual responses. However, they will not let us build conversations with the Assistant. These actions are built-in intents that will allow us to build interactions in no time.
![google voice actions tutorial google voice actions tutorial](https://android-advice.com/wp-content/uploads/2012/02/Google-Voice-Action-Remote-for-Google-TV.jpg)
The “ Solutions” part which contains actions provided by Google to simplify everything for us.
#GOOGLE VOICE ACTIONS TUTORIAL ANDROID#
We will focus on the two that are relative to the Android development for our application: There are many possibilities to build these actions. Google offers to the developers the possibility to build their own interactions by using actions called App Actions that are intents holding a request to establish a link with our application. To put it simply, when the request of a user matches a specific grammar, the Assistant extracts the request parameters into entities and generate Android Deep Link URLs using the mapping given into the actions.xml file.Ī lot of interactions, that we know of, already exist such as launching a video on YouTube or a song on Spotify, the displaying of an itinerary on Google Maps, the setting of a timer in our Clock application or the simple triggering of an internet search.īut then, can I, Android developper, build my own interactions on the Assistant? The answer is yes, but to a certain extent. It is based on Natural Language Processing (NLP) and artificial intelligence in order to transform a vocal input into a request that a computer program can interpret. We can for instance use it by a long press on the “Home” button of our smartphone or simply by saying “Ok Google” or “Hey Google”. Its main goal is to improve the discoverability and the interactions of our applications and websites.
![google voice actions tutorial google voice actions tutorial](https://www.inovex.de/wp-content/uploads/2018/05/actions-on-google-tutorial.png)
Though popular on smartphones, it is present on more than a billion different devices such has speakers, smart screens, cars, TVs and connected watches. The Google Assistant is a conversational interface that we interact with, mainly using our voice.