Charley Erd
Charley Erd

Reputation: 103

Google nest hub not displaying link button but Actions Console simulator is

The simulator for dialogflow is displaying all the content of a Basic Card object as expected per google assistant simulator; however the google nest hub is displaying everything but the button that provides the link that I want users to see. My response works just fine, its just this button not displaying that's holding me back from the desired result.

I've tried searching for why the nest hub specifically might not display card buttons, but it may be not a thoroughly explored area.

    const functions = require('firebase-functions');
    const {dialogflow,BasicCard, Button,Image} = require('actions-on-google');
    const WELCOME_INTENT = 'Default Welcome Intent';
    const FALLBACK_INTENT = 'Default Fallback Intent';
    const CKD_MEALS_INTENT = 'ckdMealsIntent';
    const CKD_MEALS_TYPE_ENTITY = 'ckdMeals';
    
    
    
    
    
    
    const app = dialogflow();
    
    app.intent(WELCOME_INTENT, (conv) => {
        conv.ask("Welcome to the quote generator! Ask for a quote about happinness, friendship, or inspiration");
    });
    app.intent(FALLBACK_INTENT, (conv) => {
        conv.ask("I didn't understand your request");
    });
    app.intent(CKD_MEALS_INTENT, (conv) => {
        const meal_type = conv.parameters[CKD_MEALS_TYPE_ENTITY].toLowerCase();
        if (meal_type == "vegetarian") {
                   conv.ask("Here's a suggestion for a vegetarian meal:"); // this Simple Response is necessary
                   conv.ask(new BasicCard({
                        image: new Image({
                         url: 'https://user-images.githubusercontent.com/41710701/62001145-0ddf1580-b0af-11e9-84cf-607f6ef980c7.png', //url of your image.
                         alt: 'Image alternate text',
                     }),
             }));
        }
        else if (meal_type == "budget"){
                  conv.ask("Here's a suggestion for a budget meal:");
                  conv.ask(new BasicCard({
                  subtitle: 'This is a subtitle',
                  title: 'Beef Burritos',
                  buttons: new Button({
                    title: 'This is a button',
                    url: 'https://www.davita.com/diet-nutrition/recipes/beef-lamb-pork/beef-burritos',
                  }),
                  image: new Image({
                    url: 'https://user-images.githubusercontent.com/41710701/62010589-715e5700-b132-11e9-96e5-730b30d55d7e.jpg',
                    alt: 'Image alternate text',
                  }),
               
                }));
    
    
    
        }
        else if (meal_type == "easy"){
        conv.ask("Here's a suggestion for a easy-to-make meal:");
        }
        else{
        conv.ask("Life can only be understood backwards, but it must be lived forwards.");
        }
    });
    exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);

enter image description here

I expected to see the button not only on the actions call simulator(link attached to the button works and everything on sim), but on the google nest hub as well. The nest hub displays everything but the button, simple as that. No error messages whatsoever in simulator.

Upvotes: 2

Views: 592

Answers (2)

Daniel Xu
Daniel Xu

Reputation: 23

I'm facing the same issue that Nest hub doesn't display the button and also looking for an answer. My basic cards are defined in DialogFlow. According to Google's documentation the basic card should work as usual on a smart display like Nest hub. You can check the sample code in this link https://developers.google.com/actions/assistant/responses#nodejs and hope it'll shed some light to your path.

Regards, Daniel Xu

Upvotes: 0

jacobytes
jacobytes

Reputation: 3261

It is showing the button because you are viewing the simulator as a phone. When you use your code the simulator and switch to smart display view. You get the response for smart displays and that doesnt show the button. Meaning that buttons aren't supported for smart displays at this stage.

enter image description here

The other way to create a button that links to an URL would be linkOut suggestion, but as Prisoner mentioned, these won't work since smart displays don't fully support browsers as of right now.

Upvotes: 4

Related Questions