Device Capabilities
Note
This page applies for Google Assistant bots only
Google Actions can run on both phones and Google Home. When developing, it is useful to know the capabilities of a user's device. For example, you would not want to serve up an image to a user on a Google Home as it has no screen. To help, you'll find two properties set on context.session:
- hasScreen
- hasAudio
if (context.user.hasScreen) {
// Respond with rich content
} else {
// Respond with text
}
Updated over 4 years ago