Perhaps I am wrong, but to my understanding, this should be done with a new window which does not belong to the activity. It could be generated from a foreground service which will keep a reference to its instance. This way, the window will "survive" even when your activity is paused.
The drawback is that since Android 6, and on some devices before, drawing over other apps is seen as dangerous, so the permission has to be handled differently. Don't know if because it is a "special one", but it is not included in runtimePermissions library.
Try this example, which uses a workaround. I have tested it with Android 5.1 and 6.0 and works properly . Not sure if it will work with all devices.