Multi surface conversations


#1

Hi guys,

Is it possible to have multi surface conversations on the google device as explained in the link below?

https://developers.google.com/actions/assistant/surface-capabilities

I want to be able to start a conversation on google home, and continue on my phone. Is this possible?

Regards,
Afam


#2

Hey @Afamefuna_Anigbo!

Not yet, but I built something today that has to be tested on other devices first. I hope to release it tomorrow :slight_smile:


#3

Just published the feature to NPM.

Here’s an example:


app.setHandler({
    async LAUNCH() {

        const availableSurfaces = this.$googleAction.getAvailableSurfaces();

        if (availableSurfaces.includes('actions.capability.SCREEN_OUTPUT')) {
            this.$googleAction.newSurface(
                ['actions.capability.SCREEN_OUTPUT'],
                'Let\'s move you to a screen device for cards and other visual responses',
                'Title')
        }
    },

    ON_NEW_SURFACE() {

        if (this.$googleAction.isNewSurfaceConfirmed()) {
            this.tell('Hello Smartphone');
        } else {
            this.tell('Hello Speaker');
        }
    }

});

#4

Thanks @AlexSwe!

Will try this out and revert!

Regards,
Afam