I'm using IME.ShowKeyboard to show Google keyboard when selecting an EditText. If I switch to another app (move my app to background) when the keyboard is open and return to my app , the keyboard can no more be closed with IME.HideKeyboard.
Any hints on how to solve this?
I already tried. Without this, the Keyboard cannot be closed even I close the app. Seems that when Activity_Pause is triggered IME.HideKeyboard does not have any effect. If I later use IME.ShowKeyboard, I can get the keyboard I need (text or numbers), but still cannot be closed.
Unfortunately I'm not able to reproduce this behavior in a simple project. In a simple app, when the app goes back to foreground, the keyboard is automatically closed. In my app the keyboard can be removed only by force stopping the Gboard app from Android settings.