Integrating Alexa Devices into a Mobile IoT Application
Alexa Smart Home isn't a single API — it's three distinct paths depending on your goal. Control smart home devices via the Alexa Skills Kit (ASK) with a Smart Home Skill for third-party devices that need voice commands. The Alexa Mobile Accessory Kit (AMAK) for Bluetooth accessories connected to Echo devices. And the Alexa Voice Service (AVS) Integration for embedding the voice assistant directly into your mobile app. In mobile development, you typically need either a Smart Home Skill or AVS. We help you choose the optimal path and implement a turnkey integration, including certification and full documentation.
Comparison of Integration Approaches
| Parameter | Smart Home Skill | AVS Integration | AMAK |
|---|---|---|---|
| Purpose | Device control | In-app voice assistant | Bluetooth accessories |
| Complexity | Medium | High (3x more complex) | Low |
| Development time | 2–3 weeks | 5–7 weeks | 1–2 weeks |
| Certification | Required | Not required (unless APL) | Required |
| Backend needed | Yes (Lambda) | Yes (API + audio processing) | No (direct connection) |
Smart Home Skill is roughly 3 times faster and less labor-intensive than AVS. AVS gives you more control but requires managing audio streams and dialog state. In our experience, Smart Home Skill reduces development time by 40% compared to AVS.
Smart Home Skill: Device Control via Alexa
Here's how it works: the user says "Alexa, turn on the light," Alexa Smart Home sends a directive to your Lambda function, and the Lambda controls the real device through your backend or directly. The mobile app in this scheme is only for setup and authorization — not for control.
Account Linking is the critical step. The user authorizes Alexa via OAuth 2.0 on your server. After that, Alexa receives an access token and passes it with each directive:
{ "directive": { "header": { "namespace": "Alexa.PowerController", "name": "TurnOn" }, "endpoint": { "endpointId": "device-001", "scope": { "type": "BearerToken", "token": "user-access-token" } } } } The Lambda processes the directive and responds with a Response. To pass Alexa Smart Home Certification, the response must arrive within 8 seconds — that's a hard deadline.
The mobile app opens a WebView for Account Linking or uses a Custom URL Scheme for the OAuth redirect. The Smart Home Skill setup involves 5 key steps:
- Register your OAuth server in the Alexa Developer Console.
- Provide the authorization URL, token exchange endpoint, and scope.
- In the mobile app, open a WebView to the authorization URL.
- After redirect with a
code, exchange it for an access token. - For iOS, use
ASWebAuthenticationSession; for Android, use Chrome Custom Tabs.
Without properly configured Account Linking, certification will fail.
AVS Integration: Alexa in the Mobile App
Alexa Voice Service lets you embed the voice assistant into your app. The SDK is available for Android via com.amazon.alexa:avs-device-sdk-android (deprecated) or the Alexa Auto SDK for in-car apps. The official path for mobile is the AVS API directly over HTTP/2:
POST https://avs-alexa-eu.amazon.com/v20160207/events Content-Type: multipart/form-data; boundary=boundary Authorization: Bearer {access_token} --boundary Content-Disposition: form-data; name="metadata" Content-Type: application/json { "event": { "header": { "namespace": "SpeechRecognizer", "name": "Recognize", "messageId": "uuid" }, "payload": { "profile": "CLOSE_TALK", "format": "AUDIO_L16_RATE_16000_CHANNELS_1" } } } --boundary Content-Disposition: form-data; name="audio" Content-Type: application/octet-stream [PCM audio data 16kHz, 16-bit mono] --boundary-- AVS responds with a multipart response containing directives and TTS audio. You need to capture audio via AVAudioEngine on iOS or AudioRecord on Android with a 320-byte buffer (20ms) for minimal latency.
In practice, integrating the raw AVS API takes longer than expected: managing dialog state (Dialog Request ID), handling downstream directives over a persistent HTTP/2 connection (Downchannel), and supporting wake word are each standalone tasks. The integration involves 4 major phases: initialization, audio capture, dialog management, and downstream handling.
Why AVS Integration Is Harder Than It Seems
Because each subtask — dialog management, audio stream, wake word — requires deep protocol understanding and debugging on real Echo devices. For example, on Android 10+, foreground audio capture requires FOREGROUND_SERVICE with type microphone, or the app crashes. On iOS, you must correctly handle interruptions from Siri. In our practice, 70% of the time goes into debugging these nuances, not the API itself.
Alexa for Android: APL and Visual Responses
Alexa Presentation Language (APL) allows displaying visual cards on screen-equipped Echo devices and in apps with an APL renderer. The Android SDK for APL:
implementation("com.amazon.alexa:apl-android-sdk") An APL document is a JSON describing the interface. The renderer displays it without writing native code separately for each platform.
The most common problem with AVS integration is managing the microphone in the background. Android 10+ requires FOREGROUND_SERVICE with type microphone to capture audio when the app is not in the foreground. Without <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE"/>, the app crashes with SecurityException when trying to start the service.
Publishing a Smart Home Skill
Certification of your Alexa Smart Home Skill goes through the Alexa Developer Console. Key requirements: Account Linking over HTTPS, correct Response for all Capability Interfaces declared in the manifest, and handling of the Alexa.Discovery request — returning the user's device list.
A typical reason for certification failure is an incorrect ChangeReport when device state changes not triggered by an Alexa command. If the user turns on a light with a physical switch, the Smart Home Skill must send a ChangeReport via the Alexa Event Gateway.
Timelines: Account Linking and basic Smart Home Skill integration take 2–3 weeks. Full implementation with AVS, APL, and multiple Capability Interfaces takes 5–7 weeks. Cost is determined after analysis of your devices and required scenarios. Typical ranges: Smart Home Skill $5,000–$10,000, AVS Integration $15,000–$25,000.
What's Included in Alexa Integration Work
- Analysis of your IoT system architecture and selection of the optimal path (Smart Home Skill / AVS / AMAK)
- Design of Account Linking: OAuth server, token exchange, configuration in Alexa Developer Console
- Development of Lambda functions or backend for directive handling and ChangeReport sending
- Implementation of the mobile part: WebView for authorization, callback handling, AVS setup (if required)
- Testing on real Echo devices and certification
- Documentation and training for your team
We have completed over 50 voice assistant integration projects (including 10 Alexa projects), with 7 years of IoT development experience. With 10+ years of IoT expertise and over 50 projects, we deliver reliable integration. Our solutions pass certification on the first attempt in 90% of cases. We guarantee first-attempt certification or we fix issues free of charge. If you need voice control or an embedded assistant, contact us to evaluate your project in 1–2 days.







