Is there a way in Android to detect if the software (a.k.a. \"soft\") keyboard is visible on screen?
I had a similar problem. I needed to react to the Enter button on screen (which hid the keyboard). In this case you can subscribe to the OnEditorAction of the text view the keyboard was opend with - if you have multiple editable boxes, then subscribe to all of them.
In your Activity you have full control of the keyboard, so at no point will you face the problem whether the keyboard is opened or not, if you listen to all opening and closing events.