简体   繁体   English

让我的应用与Google Home中的Google Assistant对话

[英]letting my app talk to google assistant in google home

I have developed an android app that consumes an API. 我已经开发了使用API​​的android应用。 It plays music each time the API sends a request to the app. 每次API向应用发送请求时,它都会播放音乐。 I want to install this app on the Google home device, In other words, I want the google home device to play the music whenever it receives a request from the API...How can I do that? 我想在Google家用设备上安装此应用,换句话说,我希望Google家用设备在收到来自API的请求时播放音乐...该怎么办?

What you're trying to do has a number of problems, and a few involved with your perception of how things work on a Home device and with the Assistant. 您尝试做的事情有很多问题,并且有一些问题涉及您对家用设备和助手如何工作的看法。

  • The Google Home doesn't run Android, and you can't "install" your app on it. Google Home无法运行Android,因此您无法在其上“安装”您的应用。 In fact, you don't "install" apps on a Home device at all. 实际上,您根本不需要在家庭设备上“安装”应用程序。 Instead, they act more like a web browser and access their Actions that run in the cloud. 相反,它们的行为更像是Web浏览器,并访问其在云中运行的操作。

  • The Assistant platform and Actions on Google are mostly conversation driven, and primarily driven by the user initiating the conversation. Google上的助手平台和操作主要是由对话驱动的,并且主要由发起对话的用户驱动。 Notifications are fairly limited. 通知是相当有限的。 This is to put users in control. 这是为了控制用户。

  • However, Home devices are also Cast enabled devices. 但是,家用设备也是支持Cast的设备。 So you may be able to have your mobile device be triggered through the API, and have it issue a Cast command to the device begin playback. 因此,您可以通过API触发移动设备,并向设备发出Cast命令,以开始播放。 There are restrictions on how you can initiate casting from a mobile device, however, so this may not be a good solution in your case. 但是,从移动设备开始投射的方式受到限制,因此,这可能不是一个好的解决方案。

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

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