detect/prevent keyboard input on Google Action

Viewed 39

I am trying to develop a game that needs to have only voice input. If the user enters text then it will ruin the game expirience. Is that any way to prevent the user from using a keyboard input on a Google Action?

1 Answers

This depends on what you are using for your actions on google development. If you are using Dialogflow or the legacy actions sdk you can check for the input type of the request. If any request matched the INPUT_TYPE_KEYBOARD you could ignore the request using a webhook.

For the new version of the actions sdk with action builder I cannot find any mention of this type existing in the documentation or sdk overview. So I'm not sure if that would also work in the new version.

Another way to do this would be by preventing your action to be deployed to platforms that have a keyboard. You can do this in the settings of your action, but this means that the action will not be available on phones and other devices even for users that would want to use voice.

Related