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
The Vega Graphics API provides functionality that allows apps to query the capabilities of the connected display. These capabilities include screen resolution, refresh rate, color depth and format, and HDR support. The API also considers the device’s support and returns the capabilities according to the device’s limitations.

Get started

Prerequisites

Vega apps can consume this package through the Vega SDK. For instructions on how to install the Vega SDK, see Vega SDK Setup.

Setup

The Vega Graphics Turbo Module is provided by the kepler-graphics npm package. Add the following library dependency to the dependencies section of your package.json file.

Permissions

The display API consists of both get methods and set methods. Apps that use the set methods via DisplayManager class require the security privilege com.amazon.graphics.privilege.display.manager it their app’s manifest.toml file under [needs] section as shown below.
The get methods do not require any privilege. Including com.amazon.graphics.privilege.display.manager allows the following set of operations:
  • Changing current screen resolution and refresh rate to one of the supported values.
  • Changing other display properties like color depth, color format, HDR mode, and ALLM.

Usage

The following is a list of supported use cases:
  • Listening to display hotplug events.
  • Querying supported screen resolutions (width x height) and refresh rates of the display.
  • Querying supported HDR types/Transfer Functions, maximum HDCP level, ccreen density (DPI) of the display.
  • Querying currently active screen resolution, refresh rate, color depth, color rormat, HDR mode, Low Latency Mode (ALLM) for the display.
  • Listening to change events for the display properties.
The following sections provide sample code for some of the use cases.

Import the required components

To use the Vega Graphics API, import the required components from @amazon-devices/kepler-graphics. Import the interfaces and types should the kepler-graphics package in a source code file as shown below:
The preceeding import shows all of the potential components. You need only import the components for the methods that your app consumes.

Check display status

To check if a display is connected to the device, use the following method.

Display hotplug events

Get callback events when display panels connect or disconnect. The IDisplayControllerListener.onAddDisplay() and IDisplayControllerListener.onRemoveDisplay() callback methods provide those events as shown below.

Get the current screen resolution and refresh rate

The Display.getCurrentConfig() method returns the currently active configuration as an IDisplayConfig object. The members of the IDisplayConfig object provide the screen resolution (width x height), screen density, supported refresh rates, and more.

Check HDR support

The following example code shows how to check whether the display and the device suport HDR.
NOTE: The supported HDR types retrieved in the example code represent the current active display configuration (resolution) only. Other display configurations obtained through Display.getAllSupportedConfigs() might list other HDR types. You can only use those HDR types when the current active configuration changes to that particular display configuration through DisplayManager.requestConfigChange() method.

Query other display properties

Listen for change events

The following code example shows apps can use IDisplayListener callback interface to listen for changes to the following:
  • Display properties like screen resolution
  • Refresh rate, color depth/space
  • HDCP level
  • HDR mode
  • Low Latency Mode

FAQs

Q1: Why is a display supported HDR type not listed in the IDisplayConfig.supportedHdrType array?

In addition to the display properties, the method implementation considers the device capabilities when reporting the supported types. If the device does not support certain HDR type, for example “Dolby Vision”, then the list reported by IDisplayConfig.supportedHdrType does not contain it.

Q2: How to unsubscribe for the listener callbacks?

The methods Display.addDisplayListener() and DisplayController.addListener() return a ISubscription object. You use the object to unsubscribe the listener by calling the unsubscribe() method. See the following code example.

Q3: Why does supportedHdrType return multiple duplicated values like

HDR types correlate with refresh rates. In this scenario, there are five different refresh rates, each with its corresponding HDR type support information. For instance, at a refresh rate of 60 millihertz (mHz), the HDR support type is 1, which corresponds to HdrType.NONE.

API Reference

Classes

  • Display — Class that retrieves properties of the primary display.
  • DisplayController — DisplayController specific operations are done through this
  • DisplayManager — DisplayManager provides APIs to change the display configuration/settings.

Interfaces

Enumerations

  • AisrState — Defines values for AI Super Resolution state for display.
  • BufferPixelFormat — Buffer Pixel Format specifies the memory layout and bits used to store the
  • ColorDepth — Defines all possible color depths in a display.
  • ColorGamut — Defines list of Color gamut types.
  • ColorSpace — Defines Different color space types in a display.
  • HdcpLevel — Defines all possible HDCP levels that could be supported by a display.
  • HdrMode — Defines values for High dynamic range mode for display
  • HdrType — Defines list of supported underlying HDR technologies
  • LlmState — Defines all possible low latency mode (LLM) states that could be supported by a display.
  • TransferFunction — Defines list of display Transfer Functions

Last modified on July 22, 2026