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 IWindow3

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

Methods

setKeyboardFocus()

void setKeyboardFocus()
Request the window manager to set keyboard focus on this window instead of any other windows owned by this app component. Please note, this doesn’t automatically give keyboard focus to this window. At any point of time, there might be more than one app component considered in the foreground state. Each of these components may have more than one window. Window manager always determines the app component which should have the keyboard focus based on system policy. Once an app component is determined to have focus, by default, the window with the highest z-order among all the windows of that app component will have keyboard focus. If the app wants to override this default behavior for keyboard focus window, it may call this API to indicate that this window is the one which should have keyboard focus when this app component is determined to have focus. This request is reset as soon as a new window gets created by the app or another window of this app component gets touch or pointer focus. setKeyboardFocus can only be set in case of parent-child window for use-cases where the app wants to explicitly set the focus on some of its child windows for input handling.

Throws

  • DeviceError — if IWindow is not in valid state.
  • InvalidArgumentError — if it can’t have input focus based on it’s role definition. See [WindowRole].

Last modified on October 29, 2026