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
Native
Skip to main content

Interface IDisplayManager2

interface IDisplayManager2
Extends IDisplayManager Version 2 of [IDisplayManager]

Methods

commitStates()

i32 commitStates()
Request the display manager to commit all pending states. Please note, [IDisplayManager2#commitStates] has to be called for any changes (made via [IDisplayManager]) to be applied. IDisplayManager state changing API will only update the pending states and [IDisplayManager2#commitStates] will actually try to apply all the pending states change requests made since last commitStates() call. The benefit of having a single commit call is that fact that clients can apply multiple dependent states together on display hardware. Client can know the result of the commit request through [IDisplayManagerListener#onCommitSuccess] or [IDisplayManagerListener#onCommitFailure]. This API requires the client to have com.amazon.graphics.privilege.display.manager application privilege.

Returns

i32 a commit ID for this commitStates request.

Throws

  • DeviceError — if the display device is not in active state
  • SecurityError — if client doesn’t have the required set of application privileges [IDisplayManager]

addDisplayManagerListener()

com.amazon.apmf.ISubscription* addDisplayManagerListener(IDisplayManagerListener* listener)
Add IDisplayManagerListener. The listener will continue to receive events until [ISubscription#unsubscribe] is called or until the event source is destroyed.

Parameters

listener
IDisplayManagerListener* — Required [IDisplayManagerListener] interface

Returns

com.amazon.apmf.ISubscription* ISubscription related to this listener interface

Throws

  • NullPointerError — if any input argument is null pointer while a non-null one is expected
  • DeviceError — if the display device is not in active state
  • OutOfMemoryError — if device is out of memory [IDisplayListener]

Last modified on October 29, 2026