Dialog throwing “Unable to add window — token null is not for an application” with getApplication() as context September 9, 2022 by Tarik Instead of getApplicationContext(), just use ActivityName.this.