Has anyone been able to make the askForNewSurface() working ? It's supposed to ask the user if s/he wants to proceed the conversation on another support but it seems to actually just silently fails, at least for me.
I tried with a french assistant on a french Google home linked to a french account also configured on a french android phone and it didn't work.
I tried to switch everything to english and it's a bit better as the "hasAvailableSurfaceCapabilities" returns true (which wasn't the case in french if my memory isn't too bad..), but it just stops on the askForNewSurface() call.
I made the assistant via the actions on google SDK following their documentation.
Here is the code :
if (assistant.hasSurfaceCapability(assistant.SurfaceCapabilities.SCREEN_OUTPUT)) {
if (!assistant.isNewSurface()) {
assistant.tell("I found no screen.");
} else {
assistant.tell("You seem to have a screen available !");
}
} else if (assistant.hasAvailableSurfaceCapabilities(assistant.SurfaceCapabilities.SCREEN_OUTPUT)) {
try {
let res = assistant.askForNewSurface("To display additional content", "Do you want proceed on this scree ?", [assistant.SurfaceCapabilities.SCREEN_OUTPUT]);
console.log(res);
}catch(e) {
console.error("ERROR askForNewSurface()");
console.log(e);
}
} else {
assistant.tell("Sorry i found no screen");
}
Of course the "console.error("ERROR askForNewSurface()");" is never fired. Everything seems fine, but nothing happens.
Any idea ?
Have a good day :)