Jovo is not only about the common denominator. In this section, you will learn more about how to access features that are specific to the platforms Amazon Alexa and Google Assistant.
To learn more about how to make most out of the platform-specific features, it's helpful to understand how the Jovo cross-platform architecture works.
The Jovo app object (this
inside app.js
) figures out which platform the user is conversing with, and then uses this information to either call the functions of the alexaSkill
or googleAction
object.
As Amazon Alexa and Google Assistant both have platform specific features, you can access them directly by calling the alexaSkill
or googleAction
objects. By using those classes, keep in mind that, in the end, there needs to be a function call where an emit happens for the platforms you're using. For example, in the tell, ask, endSession, and raw JSON response calls.
These emit methods can also be accessed directly with the platform specific objects, so you don't have to use this.tell
when developing only for one platform:
// Example
let alexa = this.alexaSkill();
alexa.tell('Hello World!');
Want to see which platform your user is currently interacting with? With getType
, you can get exactly this.
this.getType();
This is going to return a type that looks like this:
// For Amazon Alexa
AlexaSkill
// For Google Assistant
GoogleAction
Find an introduction to how Amazon Alexa works here: Getting Started > Voice App Basics > Amazon Alexa.
You can access the alexaSkill
object like this:
let alexa = this.alexaSkill();
You can find the following Alexa specific features on the page Platform Specifics > Amazon Alexa:
- Alexa Audioplayer Skills
- Dialog Mode
- Render Templates for Echo Show
- Shopping and To Do Lists
- Account Linking
- User location
Find an introduction to how Google Assistant works here: Getting Started > Voice App Basics > Google Assistant.
You can access the googleAction
object like this:
let google = this.googleAction();
You can find the following Google Assistant specific features on the page Platform Specifics > Google Assistant:
- Google Assistant Cards
- Suggestion Chips
- User location
- Account Linking