简体   繁体   English

Google上的操作askForNewSurface不切换

[英]Actions On Google askForNewSurface not switching

I'm using the actions on google nodejs library to use askForNewSurface to switch to a device with a screen when I need to send information in a card. 当我需要在卡中发送信息时,我正在使用Google nodejs库上的操作来使用askForNewSurface切换到带有屏幕的设备。

My problem is that askForNewSurface appears to run successfully but the conversation never switches to another device. 我的问题是askForNewSurface似乎可以成功运行,但是对话永远不会切换到其他设备。

Actions on google simulator Google模拟器上的动作

This occurs both in the actions on google simulator and on actual google home devices, the device states that they'll switch and ends the conversation but nothing happens after. 无论是在Google模拟器上还是在实际的Google家庭设备上的操作中,设备均指出它们将切换并结束对话,但此后没有任何反应。

This is the code I'm using to prompt the switch: 这是我用来提示切换的代码:

const hasScreen = app.hasAvailableSurfaceCapabilities(app.SurfaceCapabilities.SCREEN_OUTPUT);
if (hasScreen) {
    app.data.newSurfaceTransfer = cardData;
    app.askForNewSurface(cardData.sendToScreenMessage, cardData.sendToScreenContext, [app.SurfaceCapabilities.SCREEN_OUTPUT]);
}

I'm aware of this post and I don't believe it applies in my situation because I'm testing this in english (united states). 我知道此帖子 ,我认为它不适用于我的情况,因为我正在用英语(美国)对其进行测试。

These are my dependency versions 这些是我的依赖版本

"@types/node": "^9.3.0",
"actions-on-google": "^1.7.0",
"body-parser": "^1.18.2",
"dotenv": "^4.0.0",
"express": "^4.16.2",
"firebase": "^4.8.1",
"nodemon": "^1.14.10",
"request": "^2.81.0",
"rx-http-request": "^1.2.0",
"rxjs": "^5.5.6"

Thanks in advance for any assistance or guidance! 在此先感谢您的协助或指导!

Bart , comment above, made the correct assessment. 上面评论的 Bart做出了正确的评估。 I had turned off notifications for the google app on my phone. 我已经关闭了手机上Google应用的通知。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM