How can I get Alexa working on my iOS app?

不想你离开。 提交于 2019-12-04 14:56:11

Based on Amazon documentation there are two ways to interact with Alexa:

Sounds like you want to implement the app thru the Companion method.

As far as the JSON goes, i am currently resolving that issue now, (will post answer once I have it resolved).

Basically you have to use AVFoundation to capture audio from iPhone and send 2 https messages to Alexa (One message with JSON Body & the second message with audio captured as body.) Bases on Documentation

  1. Companion App (You have a device (such as a smart speaker) that you want to add Alexa to. So, you build in support for AVS. Great! Now you need a way to authorize it and associate it with the user's account. This is the "companion app" approach. The companion app connects to your smart product and allows the user to login and authorize the speaker to use Alexa and connect to their Amazon account.)

    Mobile OR Website

  2. AVS App (You don't have a device you need to authorize - instead you want to speak to Alexa from within your Android/Iphone application.)

    Android or Iphone

You can find a swift example on github on how to implement a iOS AVS client

https://github.com/chintan1891/iOS-Alexa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!