Android 申请作为 Amazon Echo 的新设备

Android application as new device for Amazon Echo

我花了至少两天的时间找东西,没有结果,也许你能帮帮我。

我正在使用 Amazon Echo Dot,我想构建一些可以由 Alexa 控制的 android 应用程序。所以我需要知道是否有可能实现接下来的事情:

1) Alexa

将我的应用识别为新的智能设备

2) 例如按下某个按钮 当我说“Alexa. Switch something in my app”时我是我的应用程序

如果可能的话,有人可以提供一些文档链接吗?

如果我理解正确,当 Alexa 在我的 WiFi 网络中搜索新的智能设备时,她会向网络中的每个设备发送 JSON 格式的请求并等待 JSON 答复。这是对的吗?

I'm using Amazon Echo Dot and i want to build some android application which can be controlled by Alexa.

目前无法通过 Alexa 直接控制应用程序。

如果您真的只想使用"switch xy on"、"switch xy off",那么您可以创建一个智能家居技能。 Alexa 也要求此技能来发现设备。所以它可以用来通过特殊的应用程序找到你phone。

更多详情:https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/steps-to-create-a-smart-home-skill

但如果您想更加灵活,则必须创建一个 Alexa 技能来为您的应用实施支持的语音命令。如果该技能中的一个意图在完成语音识别后被用户调用或被 alexa 后端系统最终调用,那么您可以执行例如对您的应用后端服务或 Android 通知系统进行休息调用,以通知您的应用有关 call/user 的愿望。

流程应该如下所示:

"Alexa start MyFancyApp"
"Alexa press the green Button"
   --> AWS Lambda "MyFancyApp.PressGreenButton" function is called
   --> MyFancyApp - Backend Service:/User01/GreenButton/press is called
   --> App on you Android Phone is informed and switch the State
   --> AWS Lambda "MyFancyApp.PressGreenButton" receives the status code from app backend and informs the user via the Echo Device: Voice out "green button is pressed".

方法:https://developer.amazon.com/blogs/post/TxDJWS16KUPVKO/New-Alexa-Skills-Kit-Template-Build-a-Trivia-Skill-in-under-an-Hour

注意:您必须使用 Amazon Alexa 上的帐户链接来识别用户。