사용자가 smart home 작업을
Google Assistant에서 연결 해제하면 이행에서
action.devices.DISCONNECT
인텐트를 수신합니다. 이 인텐트는 Assistant이 이 사용자를 위해 더 이상 인텐트를 전송하지 않으며 클라우드 서비스가 기기에 대해
Google Home Graph API (동기화 요청 및
Report State) 호출을 중지해야 함을 나타냅니다.
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"inputs": [{
"intent": "action.devices.DISCONNECT",
}]
}JSON
{}Node.js
const {smarthome} = require('actions-on-google'); const app = smarthome(); // ... app.onDisconnect((body, headers) => { // TODO Disconnect user account from Google Assistant // You can return an empty body return {}; });
자바
@Override public void onDisconnect( @NotNull DisconnectRequest disconnectRequest, @Nullable Map<?, ?> map) { // TODO Disconnect user account from Google Assistant // This function does not return anything }
자세한 내용은 DISCONNECT 인텐트 참고 문서를 확인하세요.