Detect HDMI source change

:warning: Before you continue


Before submitting a bug report, please review our troubleshooting documentation at Troubleshoot Issues | Vega Troubleshooting

If you still want to file a bug report, please make sure to fill in all the details below and provide the necessary information.

NOTE: PLEASE ONLY REPORT A SINGLE BUG USING THIS TEMPLATE.
If you’re experiencing multiple issues, please file a separate report for each.


:backhand_index_pointing_right: Bug Description


1. Summary

I am trying to stop video playback when user change HDMI source. I am trying to find a way to detect when HDMI source has changed and I have looked at some of the old posts which suggested to use @amazon-devices/kepler-graphics or useAddKeplerAppStateListenerCallback which has been deprecated so i am now using useKeplerAppStateManager but none of the suggested ways work

Bug Severity
Select one that applies

  • Impacts operation of app
  • Blocks current development
  • Improvement suggestion
  • Issue with documentation (If selected, please share the doc link and describe the issue)
  • Other

2. Steps to Reproduce

  1. Connect vega device to HDMI 1 of TV and switch to HDMI 1
  2. Start my app on vega device
  3. Switch to HDMI 2 on my TV

3. Observed Behavior

Explain what actually happened, noting any discrepancies or malfunctions.

Nothing. No console logs were printed

4. Expected Behavior

Describe what you expected the SDK to do under normal operation.

Any of the below
1. Console log printed to inform me that display is added or removed
2. Console log printed to inform the that app state has changed from foreground to background
3. Console log printed to inform me that display has changed

4.a Possible Root Cause & Temporary Workaround

Fill out anything you have tried. If you don’t know, N/A is acceptable

N/A

5. Logs or crash report

N/A

6. Environment

Please fill out the fields related to your bug below:

  • SDK Version: 0.22.6006

  • App State: [Foreground/Background]

  • OS Information:

    ##################################################
    #####     Welcome to Developer mode Shell    #####
    ##################################################
    sh(com.amazon.dev.shell):/$ cat /etc/os-release
    NAME="OS"
    OE_VERSION="4.0.0"
    OS_MAJOR_VERSION="1"
    OS_MINOR_VERSION="1"
    RELEASE_ID="14"
    OS_VERSION="1.1"
    BRANCH_CODE="TV Ship day60"
    BUILD_DESC="OS 1.1 (TV Ship day60/4460)"
    BUILD_FINGERPRINT="4.0.227617.0(3072cab629675a74)/4460N:user-external/release-keys"
    BUILD_VARIANT="user-external"
    BUILD_TAGS="release-keys"
    BUILD_DATE="Fri Feb 20 16:02:43 UTC 2026"
    BUILD_TIMESTAMP="1771603363"
    VERSION_NUMBER="1401010446050"
    sh(com.amazon.dev.shell):/$ 
    

7. Example Code Snippet / Screenshots / Screengrabs

Include any relevant code or component setup in React Native that can help reproduce the bug.

  useEffect(() => {
    const displayControllerListener: IDisplayControllerListener = {
      onAddDisplay: (id) => {
        console.log("IDisplayControllerListener::onAddDisplay - ", id);
        // Any initialization when new display is connected.
      },
      onRemoveDisplay: (id) => {
        console.log("IDisplayControllerListener::onRemoveDisplay - ", id);
        // Any cleanup required.
        // Please note the `Display` and `DisplayManager` methods do not work
        // when the display is disconnected.
      },
    };

    // Register the listener callback object to receive events.
    const displayControllerSubscription = DisplayController.addListener(displayControllerListener);

     const handleAppStateChange = (appStateStatus: KeplerAppStateStatus) => {
      console.log('handleAppStateChange:appStateStatus', appStateStatus)
    };
    const appStateChangeSubscription = addAppStateListener('change', handleAppStateChange);


    const handleDisplayChange = (appDisplayStatus: KeplerAppDisplayStatus) => {
      console.log('handleDisplayChange:appDisplayStatus', appDisplayStatus)
    };
    const displayChangeSubscription = addAppStateListener('displayChange', handleDisplayChange);
    

    return () => {
      displayControllerSubscription.unsubscribe();
      appStateChangeSubscription.remove();
      displayChangeSubscription.remove();
    }
  }, []);

:backhand_index_pointing_right: Additional Context


Any Additional Context you would like to provide?
*Add any other relevant information, such as recent updates to the SDK, dependencies, or device OS that may affect the bug.
*
I have added

[[needs.privilege]]
id = "com.amazon.graphics.privilege.display.manager"

Hi @DavidW,

Thank you for the detailed bug report on the HDMI source change detection issue.

Our team is investigating this issue and will provide an update as soon as we have more information.

Thanks for helping us improve the Vega platform.

Warm regards,
Aishwarya