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 IWindow4

interface IWindow4
Extends IWindow3 Revision 4 of IWindow. Please see [IWindow], [IWindow2] and [IWindow3]. One can retrieve IWindow4 interface by calling window.TryQueryInterface<IWindow4>() assuming ‘window’ object implemented IWindow4 interface.

Methods

getPosX()

i32 getPosX()
Return X position of window. This is w.r.t the top left corner of the current display where the window is positioned. Origin in case of top level window and w.r.t parent window in case of child windows.

Returns

i32 X position

Throws


getPosY()

i32 getPosY()
Return Y position of window. This is in w.r.t Display origin in case of top level window and w.r.t parent window in case of child windows.

Returns

i32 Y position

Throws


isChildWindow()

bool isChildWindow()

Returns

bool Whether current window is a child window.

Throws


setFullScreen()

void setFullScreen()
Make a request to let display server to set current Window to full screen. Window will be set to fullscreen state and the size will set to screen size. [IWindow#addResizeListener] will be called when size changed. Any setSize is ignored after this unless [IWindow4#unsetFullScreen] is called. Clients can subscribe [IWindow#addResizeListener] and call this method, after window set to fullscreen and size changed, the callback of addResizeListener will be triggered which has new window size information. This call is asynchronous call.

Throws


unsetFullScreen()

void unsetFullScreen()
Make a request to let display server to set current Window to non-full screen. Window will be restore to previous size. [IWindow#addResizeListener] will be called when size changed. This call is asynchronous call.

Throws


updateChildWindowZorder()

void updateChildWindowZorder(IWindow* refWindow, ZorderPosition pos)
Update window zorder

Parameters

refWindow
IWindow* — Required The reference window has to be already a child of the parent window or the parent itself. “refWindow” is only used to indicate the relative z-order position of this child window relative to the reference window.
pos
ZorderPosition — Required Child window creation parameter “ABOVE_ZPOS” indicates position above reference window & “BELOW_ZPOS” indicates position below reference window.

Throws


setSecureWindowState()

void setSecureWindowState(bool secure)
Set window security state.

Parameters

secure
bool — Required when set to true, window is treated as presenting secure content. By default window is created as non-secure. Any attempt to take a screenshot when a secure window is visible on the screen will fail.

Throws


addGameControllerEventListener()

com.amazon.apmf.ISubscription* addGameControllerEventListener(IGameControllerEventListener* listener)
Adds window game controller event listener. If a client doesn’t know how to handle (or doesn’t want to handle) game controller specific events then it shouldn’t subscribe for IGameControllerEventListener, otherwise their process will be killed due to ANR. Not subscribing for EvtGameController will allow system to convert a set of ‘primary’ game controller events into a set of ‘secondary’ key board events (need to subscribe for IKeyEvent though). This mechanism automatically enables interactive applications to receive basic navigational key events from game controller hardware without actually writing any game controller specific code. To know more about the mapping of game controller primary events into ‘secondary’ key board events, please see https://developer.amazon.com/docs/fire-tv/game-controller-input.html#primary_and_secondary Once subscribed, the listener will continue to receive gaming events until ISubscription#unsubscribe() is called or until the event source is destroyed.

Parameters

listener
IGameControllerEventListener* — Required IGameControllerEventListener interface

Returns

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

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