Alexa Device Integration in Mobile IoT App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Alexa Device Integration in Mobile IoT App
Complex
~5 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Alexa Device Integration into Mobile IoT App

Alexa Smart Home — not one API, but three different paths depending on task. Managing smart home through Alexa Skills Kit (ASK) with Smart Home Skill — for third-party devices wanting voice command support. Alexa Mobile Accessory Kit (AMAK) — for Bluetooth accessories connected to Echo devices. Alexa Voice Service (AVS) Integration — embedding voice assistant directly in mobile app. Usually mobile development needs either Smart Home Skill or AVS.

Smart Home Skill: Device Control via Alexa

Working scheme: user says "Alexa, turn on light," Alexa Smart Home sends directive to developer Lambda function, Lambda controls real device via backend or directly. Mobile app in this scheme — configuration and authorization point, not control.

Account Linking — key step. User authorizes Alexa via OAuth 2.0 on developer server. Alexa then gets 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"
      }
    }
  }
}

Lambda processes directive and responds. For successful Alexa Smart Home Certification Response must arrive within 8 seconds — hard deadline.

Mobile app opens WebView for Account Linking or uses Custom URL Scheme for OAuth redirect:

// iOS: handle OAuth callback
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
    guard let url = URLContexts.first?.url,
          url.scheme == "myapp",
          url.host == "alexa-auth" else { return }

    let components = URLComponents(url: url, resolvingAgainstBaseURL: false)
    let code = components?.queryItems?.first(where: { $0.name == "code" })?.value
    // Exchange code for token via backend
}

AVS Integration: Alexa in Mobile App

Alexa Voice Service lets embed voice assistant in app. SDK available for Android via com.amazon.alexa:avs-device-sdk-android (deprecated) or via Alexa Auto SDK for automotive apps. Official path for mobile — AVS API directly via 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 multipart response containing directives and TTS audio. Audio stream must be captured via AVAudioEngine on iOS or AudioRecord on Android with 320-byte buffer (20ms) for minimal latency.

In practice pure AVS API integration takes longer than appears: dialog state management (Dialog Request ID), downstream directive handling via long-lived HTTP/2 (Downchannel), wake word support — separate task each.

Alexa for Android: APL and Visual Responses

Alexa Presentation Language (APL) lets display visual cards on screened Echo devices and apps with APL renderer. Android SDK for APL:

implementation("com.amazon.alexa:apl-android-sdk:2024.1")

APL document — JSON describing interface. Renderer displays it without writing native code per platform.

Most common AVS integration problem — microphone management in background. Android 10+ requires FOREGROUND_SERVICE with microphone type for audio capture when app not foreground. Without <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE"/> app crashes with SecurityException on service start.

Smart Home Skill Publication

Certify Alexa Smart Home Skill via Alexa Developer Console. Main requirements: Account Linking via HTTPS, correct Response for all declared Capability Interfaces, handle Alexa.Discovery request — return user's device list.

Typical certification rejection reason — incorrect ChangeReport on state change not from Alexa command. If user turned on light with physical switch, Smart Home Skill should send ChangeReport via Alexa Event Gateway.

Timeline: Account Linking and basic Smart Home Skill — 2-3 weeks. Full implementation with AVS, APL and multiple Capability Interfaces — 5-7 weeks. Cost calculated after analyzing devices and scenarios.