简体   繁体   English

Google助手通知

[英]Google assistant notification

请向我介绍一些Google助手通知的现成示例,我是一个技术人员,我已经开发了具有dialogflow的应用程序(尚不支持通知),我同时拥有google home和移动助手,只想查看实际的google action通知。

There's this very detailed guide by Google with ready made code that you can easily adapt to your needs. Google提供了非常详尽的指南 ,其中包含现成的代码,您可以轻松地适应自己的需求。

It offers code for Dialogflow as well as for the plain ActionsSDK. 它提供了Dialogflow以及普通ActionsSDK的代码。

Basically the steps are: 基本上,这些步骤是:

  • Ask for permission 请求许可
  • React to it in your fulfillment code (confirming the user's decision) 在您的履行代码中对此做出反应(确认用户的决定)
  • Notifying Google's backend when it should send a notification to the user (you need a JSON web token). 在应向用户发送通知时通知Google的后端(您需要JSON网络令牌)。 This last step has to be done on some backend which knows about when to send notifications 最后一步必须在知道何时发送通知的某些后端上完成

Those steps are outlined in more detail on the linked site and there's also described how to obtain the token. 这些步骤在链接的站点上有更详细的概述,并且还描述了如何获取令牌。

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

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