I need to do a very simple thing - find out if the software keyboard is shown. Is this possible in Android?
There is a direct method to find this out. And, it does not require any Layout changes.
So, it works in immersive fullscreen mode, too.
The trick is that you try to hide or show the soft keyboard and capture the result of that try.
No panic, this does not really show or hide the keyboard. We just ask for the state.
To stay up-to-date, you can simply repeat the operation, e.g. every 200 milliseconds, using a Handler.
You find an implementation here: https://stackoverflow.com/a/27567074/2525452