So basically all Graphical User Interface is rendered on a Window. One example is that of an Activity
, from the official documentation:
Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View)
Another example would be that of an AlertDialog
.
A screen in Android may have multiple windows. For example, you can use two activities in the multi-window Android feature. Sometimes a window can contain other windows.
Here is a question with some good answers regarding what a Window is.
To answer your question, each Window has a unique identifier. This identifier is called a Window Token. So, the significance of a "WindowToken" is to uniquely identify a Window.
There is another method, namely getApplicationWindowToken()
, which can be used to get the identifier for the top-most Window.