简体   繁体   中英

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.

My problem is that askForNewSurface appears to run successfully but the conversation never switches to another device.

Actions on google simulator

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.

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. I had turned off notifications for the google app on my phone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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