r/GoogleAssistantDev • • Jun 25 '19

Custom visual output

Is there any way to have a custom visual output in Google Action?

Also, is there any list that let users to choose multiple options?

3 Upvotes

10 comments sorted by

4

u/afirstenberg GDE Jun 25 '19

For custom visual outputs, check out the Interactive Canvas, which will give you full HTML/CSS/JS control over a screen. (Currently in developer preview, and initially available for games, but it sounds like the team is interested in seeing good non-game uses.)

None of the lists provide a multi-select, but I'd venture at least part of the reason is that this is significantly more difficult for a touch screen, where you'd require a confirmation button to distinguish between selecting one and selecting more. I'm also not sure it maps well to supplementing a voice conversation. There are workarounds (let them select one, prompt if they'd like anything else, etc), but I can see why that might not be optimal for many use cases.

1

u/__godfather__ Jun 25 '19

Thanks! Yeah, but keep reprompting can be frustrating for the user. Also, do you know how can I tell something without ending the session? Like ask does not end the session, but it also waits for the user's voice response.

1

u/afirstenberg GDE Jun 25 '19

What do you mean by telling something, but not waiting for a response?

1

u/__godfather__ Jun 25 '19

Like in Google Action, we have two ways of voice responses. conv.ask or conv.close. Similarly, in other frameworks/libraries, we usually have tell("Your name is dot") or ask("what is your name").

If I do .close or .tell, it will tell something, but it will close/end the session.

If I do .ask, it will tell something, keep the microphone open and waits for the users respond. It will not close/end the session.

Now, how can I say something to the user, without closing/ending the session? and without keeping the microphone active?

1

u/afirstenberg GDE Jun 25 '19

how can I say something to the user, without closing/ending the session? and without keeping the microphone active?

This is the part I keep getting confused about. What would the user experience of this be? If the microphone closes, but the session remains "open"... what happens? How does the user get back to the session? Why do you want this?

1

u/__godfather__ Jun 25 '19 edited Jun 25 '19

Like think about google assistant on an android app. The problem with .tell is that it actually closes the app right after the response. But I don't want to close the app. Think about this made-up scenario:

++ Hey Google, ask test app to open the garage door.

-- Greetings! Let me know whenever you got to the garage door, and I'll open it.

      **after like 5 minutes**

++ I got to the garage door.

-- Sure, opening the garage door.

However, if I use .tell it will close the app. So the next time user needs to say Hey google, tell test app that I just got to the garage door. It's too much and makes things more difficult for the user. I simply want to keep the app open. If I can basically use .tell without closing the app, the user can say their intent next time, without saying hey google, (app invocation) again.

4

u/afirstenberg GDE Jun 26 '19

Ok, so how should it work if you want to keep your Action open. And I want to keep my action open. And so does every other action? How long should you be allowed to keep your action going and does it block others?

This seems like a good idea when it is just my Action that I care about - but it gets complicated when you need to juggle more.

It also has the problem that it means the Assistant is always listening and trying to match an Intent - not just listening for a hotword. This is a privacy issue.

To answer your question, however, no, there isn't a way to do this directly. There are some things you can do to keep an Action running, such as send Media, and this serves to actively remind the person that your Action is still going, and it does close the microphone when it does so (requiring the user to at least prefix it with "Hey Google".

3

u/DarcSwan Jun 26 '19

Imagine if you could only have one app open on your phone.. Spotify being like, oh no, the user having to switch back to our app to search for a new song is too hard. We’ll just make sure they can’t use email or maps until they’re finished listening to music...

Yeah. Nah.

1

u/__godfather__ Jun 26 '19

Lmao! Well, except in phone apps, the user exit the app when they decide. While when someone is using an Action, Google Assistant exit the app, and the user is not in control of exiting the app. :)) But yeah not keeping the Action open totally makes sense because otherwise there would be a chaos and the user would get confused and angry! =))

1

u/__godfather__ Jun 26 '19

That makes sense! Thanks for your help.