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 IWindow2

interface IWindow2
Extends IWindow Revision 2 of IWindow.

Methods

addKeyEventListener()

com.amazon.apmf.ISubscription* addKeyEventListener(IKeyEventListener* listener)
Adds window key events listener. The listener will continue to receive events until ISubscription#unsubscribe() is called or until the event source is destroyed.

Parameters

listener
IKeyEventListener* — Required IKeyEventListener Listener interface

Returns

com.amazon.apmf.ISubscription* ISubscription related to this listener interface [IKeyEventListener]

Throws

  • DeviceError — if IWindow is not in valid state
  • NullPointerError — if any input argument is null pointer while a non-null one is expected

addTouchEventListener()

com.amazon.apmf.ISubscription* addTouchEventListener(ITouchEventListener* listener)
Adds window touch events listener. The listener will continue to receive events until ISubscription#unsubscribe() is called or until the event source is destroyed.

Parameters

listener
ITouchEventListener* — Required ITouchEventListener Listener interface

Returns

com.amazon.apmf.ISubscription* ISubscription related to this listener interface [ITouchEventListener]

Throws

  • DeviceError — if IWindow is not in valid state
  • NullPointerError — if any input argument is null pointer while a non-null one is expected

addPointerEventListener()

com.amazon.apmf.ISubscription* addPointerEventListener(IPointerEventListener* listener)
Adds window pointer events listener. The listener will continue to receive events until ISubscription#unsubscribe() is called or until the event source is destroyed.

Parameters

listener
IPointerEventListener* — Required IPointerEventListener Listener interface

Returns

com.amazon.apmf.ISubscription* ISubscription related to this listener interface [IPointerEventListener]

Throws

  • DeviceError — if IWindow is not in valid state
  • NullPointerError — if any input argument is null pointer while a non-null one is expected

Last modified on October 29, 2026