Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
This library enables Amazon Device Messaging Service functionality in React Native for Vega apps. Amazon Device Messaging (ADM) allows you to:
  • Send messages to Amazon devices that are running your app
  • Deliver messages from your cloud service to apps installed on Amazon devices

Get started

Setup

  1. Add the following library dependencies to the dependencies section of your package.json file.
  1. To access ADM, add the following privilege and services in your manifest.toml.

Usage

To use the Amazon Device Messaging service, you must:
  • Declare your components and processes in your manifest.toml file.
  • Register your app with the service in your App.ts file.
  • Add code to handle task execution.
  • Add code to register and handle the ADM messages.
  1. In your manifest.toml, declare a headless task to receive ADM messages and use as the component ID. IMPORTANT: Replace with your specific package id.
  1. In your App.ts, register your app with the Device Messaging service and receive a registration ID.
  1. Create a task.js and register the HeadlessTask with HeadlessEntryPointRegistry.
  1. Create an AdmHeadlessTask.ts file. The basic structure of the file has the following format.
  1. In AdmHeadlessTask.ts, implement the AmazonDeviceMessagingHandler interface in your headless task to handle ADM messages.
  1. Pass the handler as an argument to the AdmHeadlessTask.
  1. Call AmazonDeviceMessagingServer.registerHandler() to register the implementation of AmazonDeviceMessagingHandler named handler.
  1. After calling the registerHandler method, call waitForMessageHandlerCompletionAsync.
  1. Wait for the completion of waitForMessageHandlerCompletionAsync. If the method doesn’t throw an error, it indicates successful handling of the message. If there is a failure when handling the message, ADM doesn’t reattempt the message delivery.
NOTE: The waitForMessageHandlerCompletionAsync method can throw an error when the handler doesn’t process the message within the time specified by waitDuration or it fails to process the message. These errors are reported to the Lifecycle Manager and it is up to your app to handle them.

Example AdmHeadlessTask.ts

Classes

Modules


Last modified on February 19, 2026